jpayne@69: /* Generated by Cython 3.0.11 */ jpayne@69: jpayne@69: /* BEGIN: Cython Metadata jpayne@69: { jpayne@69: "distutils": { jpayne@69: "define_macros": [ jpayne@69: [ jpayne@69: "BUILDING_WHEEL", jpayne@69: null jpayne@69: ] jpayne@69: ], jpayne@69: "depends": [ jpayne@69: "/project/htslib/htslib/bgzf.h", jpayne@69: "/project/htslib/htslib/cram.h", jpayne@69: "/project/htslib/htslib/faidx.h", jpayne@69: "/project/htslib/htslib/hfile.h", jpayne@69: "/project/htslib/htslib/hts.h", jpayne@69: "/project/htslib/htslib/kstring.h", jpayne@69: "/project/htslib/htslib/sam.h", jpayne@69: "/project/htslib/htslib/tbx.h", jpayne@69: "/project/htslib/htslib/vcf.h", jpayne@69: "/project/htslib/htslib/vcfutils.h", jpayne@69: "/project/pysam/htslib_util.h", jpayne@69: "/project/pysam/pysam_stream.h" jpayne@69: ], jpayne@69: "extra_compile_args": [ jpayne@69: "-Wno-unused", jpayne@69: "-Wno-strict-prototypes", jpayne@69: "-Wno-sign-compare", jpayne@69: "-Wno-error=declaration-after-statement" jpayne@69: ], jpayne@69: "extra_link_args": [ jpayne@69: "-Wl,-rpath,$ORIGIN" jpayne@69: ], jpayne@69: "include_dirs": [ jpayne@69: "pysam", jpayne@69: "/project/pysam", jpayne@69: "/project/htslib", jpayne@69: "/project/samtools", jpayne@69: "/project/samtools/lz4", jpayne@69: "/project/bcftools", jpayne@69: "/project" jpayne@69: ], jpayne@69: "language": "c", jpayne@69: "libraries": [ jpayne@69: "z", jpayne@69: "lzma", jpayne@69: "bz2", jpayne@69: "z", jpayne@69: "m", jpayne@69: "curl", jpayne@69: "crypto", jpayne@69: "chtslib.cpython-37m-x86_64-linux-gnu", jpayne@69: "cutils.cpython-37m-x86_64-linux-gnu" jpayne@69: ], jpayne@69: "library_dirs": [ jpayne@69: "/project/pysam", jpayne@69: "/project", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam", jpayne@69: "build/lib.linux-x86_64-cpython-37/pysam" jpayne@69: ], jpayne@69: "name": "pysam.libcvcf", jpayne@69: "sources": [ jpayne@69: "pysam/libcvcf.pyx" jpayne@69: ] jpayne@69: }, jpayne@69: "module_name": "pysam.libcvcf" jpayne@69: } jpayne@69: END: Cython Metadata */ jpayne@69: jpayne@69: #ifndef PY_SSIZE_T_CLEAN jpayne@69: #define PY_SSIZE_T_CLEAN jpayne@69: #endif /* PY_SSIZE_T_CLEAN */ jpayne@69: #if defined(CYTHON_LIMITED_API) && 0 jpayne@69: #ifndef Py_LIMITED_API jpayne@69: #if CYTHON_LIMITED_API+0 > 0x03030000 jpayne@69: #define Py_LIMITED_API CYTHON_LIMITED_API jpayne@69: #else jpayne@69: #define Py_LIMITED_API 0x03030000 jpayne@69: #endif jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: #include "Python.h" jpayne@69: jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) jpayne@69: #else jpayne@69: #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: #if PY_MAJOR_VERSION <= 2 jpayne@69: #define PyDict_GetItemWithError _PyDict_GetItemWithError jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get) jpayne@69: #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) jpayne@69: #endif jpayne@69: jpayne@69: #ifndef Py_PYTHON_H jpayne@69: #error Python headers needed to compile C extensions, please install development version of Python. jpayne@69: #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) jpayne@69: #error Cython requires Python 2.7+ or Python 3.3+. jpayne@69: #else jpayne@69: #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API jpayne@69: #define __PYX_EXTRA_ABI_MODULE_NAME "limited" jpayne@69: #else jpayne@69: #define __PYX_EXTRA_ABI_MODULE_NAME "" jpayne@69: #endif jpayne@69: #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME jpayne@69: #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI jpayne@69: #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." jpayne@69: #define CYTHON_HEX_VERSION 0x03000BF0 jpayne@69: #define CYTHON_FUTURE_DIVISION 1 jpayne@69: #include jpayne@69: #ifndef offsetof jpayne@69: #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) jpayne@69: #endif jpayne@69: #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) jpayne@69: #ifndef __stdcall jpayne@69: #define __stdcall jpayne@69: #endif jpayne@69: #ifndef __cdecl jpayne@69: #define __cdecl jpayne@69: #endif jpayne@69: #ifndef __fastcall jpayne@69: #define __fastcall jpayne@69: #endif jpayne@69: #endif jpayne@69: #ifndef DL_IMPORT jpayne@69: #define DL_IMPORT(t) t jpayne@69: #endif jpayne@69: #ifndef DL_EXPORT jpayne@69: #define DL_EXPORT(t) t jpayne@69: #endif jpayne@69: #define __PYX_COMMA , jpayne@69: #ifndef HAVE_LONG_LONG jpayne@69: #define HAVE_LONG_LONG jpayne@69: #endif jpayne@69: #ifndef PY_LONG_LONG jpayne@69: #define PY_LONG_LONG LONG_LONG jpayne@69: #endif jpayne@69: #ifndef Py_HUGE_VAL jpayne@69: #define Py_HUGE_VAL HUGE_VAL jpayne@69: #endif jpayne@69: #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX jpayne@69: #if defined(GRAALVM_PYTHON) jpayne@69: /* For very preliminary testing purposes. Most variables are set the same as PyPy. jpayne@69: The existence of this section does not imply that anything works or is even tested */ jpayne@69: #define CYTHON_COMPILING_IN_PYPY 0 jpayne@69: #define CYTHON_COMPILING_IN_CPYTHON 0 jpayne@69: #define CYTHON_COMPILING_IN_LIMITED_API 0 jpayne@69: #define CYTHON_COMPILING_IN_GRAAL 1 jpayne@69: #define CYTHON_COMPILING_IN_NOGIL 0 jpayne@69: #undef CYTHON_USE_TYPE_SLOTS jpayne@69: #define CYTHON_USE_TYPE_SLOTS 0 jpayne@69: #undef CYTHON_USE_TYPE_SPECS jpayne@69: #define CYTHON_USE_TYPE_SPECS 0 jpayne@69: #undef CYTHON_USE_PYTYPE_LOOKUP jpayne@69: #define CYTHON_USE_PYTYPE_LOOKUP 0 jpayne@69: #if PY_VERSION_HEX < 0x03050000 jpayne@69: #undef CYTHON_USE_ASYNC_SLOTS jpayne@69: #define CYTHON_USE_ASYNC_SLOTS 0 jpayne@69: #elif !defined(CYTHON_USE_ASYNC_SLOTS) jpayne@69: #define CYTHON_USE_ASYNC_SLOTS 1 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_PYLIST_INTERNALS jpayne@69: #define CYTHON_USE_PYLIST_INTERNALS 0 jpayne@69: #undef CYTHON_USE_UNICODE_INTERNALS jpayne@69: #define CYTHON_USE_UNICODE_INTERNALS 0 jpayne@69: #undef CYTHON_USE_UNICODE_WRITER jpayne@69: #define CYTHON_USE_UNICODE_WRITER 0 jpayne@69: #undef CYTHON_USE_PYLONG_INTERNALS jpayne@69: #define CYTHON_USE_PYLONG_INTERNALS 0 jpayne@69: #undef CYTHON_AVOID_BORROWED_REFS jpayne@69: #define CYTHON_AVOID_BORROWED_REFS 1 jpayne@69: #undef CYTHON_ASSUME_SAFE_MACROS jpayne@69: #define CYTHON_ASSUME_SAFE_MACROS 0 jpayne@69: #undef CYTHON_UNPACK_METHODS jpayne@69: #define CYTHON_UNPACK_METHODS 0 jpayne@69: #undef CYTHON_FAST_THREAD_STATE jpayne@69: #define CYTHON_FAST_THREAD_STATE 0 jpayne@69: #undef CYTHON_FAST_GIL jpayne@69: #define CYTHON_FAST_GIL 0 jpayne@69: #undef CYTHON_METH_FASTCALL jpayne@69: #define CYTHON_METH_FASTCALL 0 jpayne@69: #undef CYTHON_FAST_PYCALL jpayne@69: #define CYTHON_FAST_PYCALL 0 jpayne@69: #ifndef CYTHON_PEP487_INIT_SUBCLASS jpayne@69: #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) jpayne@69: #endif jpayne@69: #undef CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: #define CYTHON_PEP489_MULTI_PHASE_INIT 1 jpayne@69: #undef CYTHON_USE_MODULE_STATE jpayne@69: #define CYTHON_USE_MODULE_STATE 0 jpayne@69: #undef CYTHON_USE_TP_FINALIZE jpayne@69: #define CYTHON_USE_TP_FINALIZE 0 jpayne@69: #undef CYTHON_USE_DICT_VERSIONS jpayne@69: #define CYTHON_USE_DICT_VERSIONS 0 jpayne@69: #undef CYTHON_USE_EXC_INFO_STACK jpayne@69: #define CYTHON_USE_EXC_INFO_STACK 0 jpayne@69: #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC jpayne@69: #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_FREELISTS jpayne@69: #define CYTHON_USE_FREELISTS 0 jpayne@69: #elif defined(PYPY_VERSION) jpayne@69: #define CYTHON_COMPILING_IN_PYPY 1 jpayne@69: #define CYTHON_COMPILING_IN_CPYTHON 0 jpayne@69: #define CYTHON_COMPILING_IN_LIMITED_API 0 jpayne@69: #define CYTHON_COMPILING_IN_GRAAL 0 jpayne@69: #define CYTHON_COMPILING_IN_NOGIL 0 jpayne@69: #undef CYTHON_USE_TYPE_SLOTS jpayne@69: #define CYTHON_USE_TYPE_SLOTS 0 jpayne@69: #ifndef CYTHON_USE_TYPE_SPECS jpayne@69: #define CYTHON_USE_TYPE_SPECS 0 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_PYTYPE_LOOKUP jpayne@69: #define CYTHON_USE_PYTYPE_LOOKUP 0 jpayne@69: #if PY_VERSION_HEX < 0x03050000 jpayne@69: #undef CYTHON_USE_ASYNC_SLOTS jpayne@69: #define CYTHON_USE_ASYNC_SLOTS 0 jpayne@69: #elif !defined(CYTHON_USE_ASYNC_SLOTS) jpayne@69: #define CYTHON_USE_ASYNC_SLOTS 1 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_PYLIST_INTERNALS jpayne@69: #define CYTHON_USE_PYLIST_INTERNALS 0 jpayne@69: #undef CYTHON_USE_UNICODE_INTERNALS jpayne@69: #define CYTHON_USE_UNICODE_INTERNALS 0 jpayne@69: #undef CYTHON_USE_UNICODE_WRITER jpayne@69: #define CYTHON_USE_UNICODE_WRITER 0 jpayne@69: #undef CYTHON_USE_PYLONG_INTERNALS jpayne@69: #define CYTHON_USE_PYLONG_INTERNALS 0 jpayne@69: #undef CYTHON_AVOID_BORROWED_REFS jpayne@69: #define CYTHON_AVOID_BORROWED_REFS 1 jpayne@69: #undef CYTHON_ASSUME_SAFE_MACROS jpayne@69: #define CYTHON_ASSUME_SAFE_MACROS 0 jpayne@69: #undef CYTHON_UNPACK_METHODS jpayne@69: #define CYTHON_UNPACK_METHODS 0 jpayne@69: #undef CYTHON_FAST_THREAD_STATE jpayne@69: #define CYTHON_FAST_THREAD_STATE 0 jpayne@69: #undef CYTHON_FAST_GIL jpayne@69: #define CYTHON_FAST_GIL 0 jpayne@69: #undef CYTHON_METH_FASTCALL jpayne@69: #define CYTHON_METH_FASTCALL 0 jpayne@69: #undef CYTHON_FAST_PYCALL jpayne@69: #define CYTHON_FAST_PYCALL 0 jpayne@69: #ifndef CYTHON_PEP487_INIT_SUBCLASS jpayne@69: #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x03090000 jpayne@69: #undef CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: #define CYTHON_PEP489_MULTI_PHASE_INIT 0 jpayne@69: #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) jpayne@69: #define CYTHON_PEP489_MULTI_PHASE_INIT 1 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_MODULE_STATE jpayne@69: #define CYTHON_USE_MODULE_STATE 0 jpayne@69: #undef CYTHON_USE_TP_FINALIZE jpayne@69: #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) jpayne@69: #undef CYTHON_USE_DICT_VERSIONS jpayne@69: #define CYTHON_USE_DICT_VERSIONS 0 jpayne@69: #undef CYTHON_USE_EXC_INFO_STACK jpayne@69: #define CYTHON_USE_EXC_INFO_STACK 0 jpayne@69: #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC jpayne@69: #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_FREELISTS jpayne@69: #define CYTHON_USE_FREELISTS 0 jpayne@69: #elif defined(CYTHON_LIMITED_API) jpayne@69: #ifdef Py_LIMITED_API jpayne@69: #undef __PYX_LIMITED_VERSION_HEX jpayne@69: #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API jpayne@69: #endif jpayne@69: #define CYTHON_COMPILING_IN_PYPY 0 jpayne@69: #define CYTHON_COMPILING_IN_CPYTHON 0 jpayne@69: #define CYTHON_COMPILING_IN_LIMITED_API 1 jpayne@69: #define CYTHON_COMPILING_IN_GRAAL 0 jpayne@69: #define CYTHON_COMPILING_IN_NOGIL 0 jpayne@69: #undef CYTHON_CLINE_IN_TRACEBACK jpayne@69: #define CYTHON_CLINE_IN_TRACEBACK 0 jpayne@69: #undef CYTHON_USE_TYPE_SLOTS jpayne@69: #define CYTHON_USE_TYPE_SLOTS 0 jpayne@69: #undef CYTHON_USE_TYPE_SPECS jpayne@69: #define CYTHON_USE_TYPE_SPECS 1 jpayne@69: #undef CYTHON_USE_PYTYPE_LOOKUP jpayne@69: #define CYTHON_USE_PYTYPE_LOOKUP 0 jpayne@69: #undef CYTHON_USE_ASYNC_SLOTS jpayne@69: #define CYTHON_USE_ASYNC_SLOTS 0 jpayne@69: #undef CYTHON_USE_PYLIST_INTERNALS jpayne@69: #define CYTHON_USE_PYLIST_INTERNALS 0 jpayne@69: #undef CYTHON_USE_UNICODE_INTERNALS jpayne@69: #define CYTHON_USE_UNICODE_INTERNALS 0 jpayne@69: #ifndef CYTHON_USE_UNICODE_WRITER jpayne@69: #define CYTHON_USE_UNICODE_WRITER 0 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_PYLONG_INTERNALS jpayne@69: #define CYTHON_USE_PYLONG_INTERNALS 0 jpayne@69: #ifndef CYTHON_AVOID_BORROWED_REFS jpayne@69: #define CYTHON_AVOID_BORROWED_REFS 0 jpayne@69: #endif jpayne@69: #undef CYTHON_ASSUME_SAFE_MACROS jpayne@69: #define CYTHON_ASSUME_SAFE_MACROS 0 jpayne@69: #undef CYTHON_UNPACK_METHODS jpayne@69: #define CYTHON_UNPACK_METHODS 0 jpayne@69: #undef CYTHON_FAST_THREAD_STATE jpayne@69: #define CYTHON_FAST_THREAD_STATE 0 jpayne@69: #undef CYTHON_FAST_GIL jpayne@69: #define CYTHON_FAST_GIL 0 jpayne@69: #undef CYTHON_METH_FASTCALL jpayne@69: #define CYTHON_METH_FASTCALL 0 jpayne@69: #undef CYTHON_FAST_PYCALL jpayne@69: #define CYTHON_FAST_PYCALL 0 jpayne@69: #ifndef CYTHON_PEP487_INIT_SUBCLASS jpayne@69: #define CYTHON_PEP487_INIT_SUBCLASS 1 jpayne@69: #endif jpayne@69: #undef CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: #define CYTHON_PEP489_MULTI_PHASE_INIT 0 jpayne@69: #undef CYTHON_USE_MODULE_STATE jpayne@69: #define CYTHON_USE_MODULE_STATE 1 jpayne@69: #ifndef CYTHON_USE_TP_FINALIZE jpayne@69: #define CYTHON_USE_TP_FINALIZE 0 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_DICT_VERSIONS jpayne@69: #define CYTHON_USE_DICT_VERSIONS 0 jpayne@69: #undef CYTHON_USE_EXC_INFO_STACK jpayne@69: #define CYTHON_USE_EXC_INFO_STACK 0 jpayne@69: #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC jpayne@69: #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_FREELISTS jpayne@69: #define CYTHON_USE_FREELISTS 0 jpayne@69: #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) jpayne@69: #define CYTHON_COMPILING_IN_PYPY 0 jpayne@69: #define CYTHON_COMPILING_IN_CPYTHON 0 jpayne@69: #define CYTHON_COMPILING_IN_LIMITED_API 0 jpayne@69: #define CYTHON_COMPILING_IN_GRAAL 0 jpayne@69: #define CYTHON_COMPILING_IN_NOGIL 1 jpayne@69: #ifndef CYTHON_USE_TYPE_SLOTS jpayne@69: #define CYTHON_USE_TYPE_SLOTS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_TYPE_SPECS jpayne@69: #define CYTHON_USE_TYPE_SPECS 0 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_PYTYPE_LOOKUP jpayne@69: #define CYTHON_USE_PYTYPE_LOOKUP 0 jpayne@69: #ifndef CYTHON_USE_ASYNC_SLOTS jpayne@69: #define CYTHON_USE_ASYNC_SLOTS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_PYLONG_INTERNALS jpayne@69: #define CYTHON_USE_PYLONG_INTERNALS 0 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_PYLIST_INTERNALS jpayne@69: #define CYTHON_USE_PYLIST_INTERNALS 0 jpayne@69: #ifndef CYTHON_USE_UNICODE_INTERNALS jpayne@69: #define CYTHON_USE_UNICODE_INTERNALS 1 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_UNICODE_WRITER jpayne@69: #define CYTHON_USE_UNICODE_WRITER 0 jpayne@69: #ifndef CYTHON_AVOID_BORROWED_REFS jpayne@69: #define CYTHON_AVOID_BORROWED_REFS 0 jpayne@69: #endif jpayne@69: #ifndef CYTHON_ASSUME_SAFE_MACROS jpayne@69: #define CYTHON_ASSUME_SAFE_MACROS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_UNPACK_METHODS jpayne@69: #define CYTHON_UNPACK_METHODS 1 jpayne@69: #endif jpayne@69: #undef CYTHON_FAST_THREAD_STATE jpayne@69: #define CYTHON_FAST_THREAD_STATE 0 jpayne@69: #undef CYTHON_FAST_GIL jpayne@69: #define CYTHON_FAST_GIL 0 jpayne@69: #ifndef CYTHON_METH_FASTCALL jpayne@69: #define CYTHON_METH_FASTCALL 1 jpayne@69: #endif jpayne@69: #undef CYTHON_FAST_PYCALL jpayne@69: #define CYTHON_FAST_PYCALL 0 jpayne@69: #ifndef CYTHON_PEP487_INIT_SUBCLASS jpayne@69: #define CYTHON_PEP487_INIT_SUBCLASS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: #define CYTHON_PEP489_MULTI_PHASE_INIT 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_MODULE_STATE jpayne@69: #define CYTHON_USE_MODULE_STATE 0 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_TP_FINALIZE jpayne@69: #define CYTHON_USE_TP_FINALIZE 1 jpayne@69: #endif jpayne@69: #undef CYTHON_USE_DICT_VERSIONS jpayne@69: #define CYTHON_USE_DICT_VERSIONS 0 jpayne@69: #undef CYTHON_USE_EXC_INFO_STACK jpayne@69: #define CYTHON_USE_EXC_INFO_STACK 0 jpayne@69: #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC jpayne@69: #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_FREELISTS jpayne@69: #define CYTHON_USE_FREELISTS 0 jpayne@69: #endif jpayne@69: #else jpayne@69: #define CYTHON_COMPILING_IN_PYPY 0 jpayne@69: #define CYTHON_COMPILING_IN_CPYTHON 1 jpayne@69: #define CYTHON_COMPILING_IN_LIMITED_API 0 jpayne@69: #define CYTHON_COMPILING_IN_GRAAL 0 jpayne@69: #define CYTHON_COMPILING_IN_NOGIL 0 jpayne@69: #ifndef CYTHON_USE_TYPE_SLOTS jpayne@69: #define CYTHON_USE_TYPE_SLOTS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_TYPE_SPECS jpayne@69: #define CYTHON_USE_TYPE_SPECS 0 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_PYTYPE_LOOKUP jpayne@69: #define CYTHON_USE_PYTYPE_LOOKUP 1 jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: #undef CYTHON_USE_ASYNC_SLOTS jpayne@69: #define CYTHON_USE_ASYNC_SLOTS 0 jpayne@69: #elif !defined(CYTHON_USE_ASYNC_SLOTS) jpayne@69: #define CYTHON_USE_ASYNC_SLOTS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_PYLONG_INTERNALS jpayne@69: #define CYTHON_USE_PYLONG_INTERNALS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_PYLIST_INTERNALS jpayne@69: #define CYTHON_USE_PYLIST_INTERNALS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_UNICODE_INTERNALS jpayne@69: #define CYTHON_USE_UNICODE_INTERNALS 1 jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 jpayne@69: #undef CYTHON_USE_UNICODE_WRITER jpayne@69: #define CYTHON_USE_UNICODE_WRITER 0 jpayne@69: #elif !defined(CYTHON_USE_UNICODE_WRITER) jpayne@69: #define CYTHON_USE_UNICODE_WRITER 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_AVOID_BORROWED_REFS jpayne@69: #define CYTHON_AVOID_BORROWED_REFS 0 jpayne@69: #endif jpayne@69: #ifndef CYTHON_ASSUME_SAFE_MACROS jpayne@69: #define CYTHON_ASSUME_SAFE_MACROS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_UNPACK_METHODS jpayne@69: #define CYTHON_UNPACK_METHODS 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_FAST_THREAD_STATE jpayne@69: #define CYTHON_FAST_THREAD_STATE 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_FAST_GIL jpayne@69: #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) jpayne@69: #endif jpayne@69: #ifndef CYTHON_METH_FASTCALL jpayne@69: #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) jpayne@69: #endif jpayne@69: #ifndef CYTHON_FAST_PYCALL jpayne@69: #define CYTHON_FAST_PYCALL 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_PEP487_INIT_SUBCLASS jpayne@69: #define CYTHON_PEP487_INIT_SUBCLASS 1 jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x03050000 jpayne@69: #undef CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: #define CYTHON_PEP489_MULTI_PHASE_INIT 0 jpayne@69: #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) jpayne@69: #define CYTHON_PEP489_MULTI_PHASE_INIT 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_MODULE_STATE jpayne@69: #define CYTHON_USE_MODULE_STATE 0 jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030400a1 jpayne@69: #undef CYTHON_USE_TP_FINALIZE jpayne@69: #define CYTHON_USE_TP_FINALIZE 0 jpayne@69: #elif !defined(CYTHON_USE_TP_FINALIZE) jpayne@69: #define CYTHON_USE_TP_FINALIZE 1 jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030600B1 jpayne@69: #undef CYTHON_USE_DICT_VERSIONS jpayne@69: #define CYTHON_USE_DICT_VERSIONS 0 jpayne@69: #elif !defined(CYTHON_USE_DICT_VERSIONS) jpayne@69: #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030700A3 jpayne@69: #undef CYTHON_USE_EXC_INFO_STACK jpayne@69: #define CYTHON_USE_EXC_INFO_STACK 0 jpayne@69: #elif !defined(CYTHON_USE_EXC_INFO_STACK) jpayne@69: #define CYTHON_USE_EXC_INFO_STACK 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC jpayne@69: #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_FREELISTS jpayne@69: #define CYTHON_USE_FREELISTS 1 jpayne@69: #endif jpayne@69: #endif jpayne@69: #if !defined(CYTHON_FAST_PYCCALL) jpayne@69: #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) jpayne@69: #endif jpayne@69: #if !defined(CYTHON_VECTORCALL) jpayne@69: #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) jpayne@69: #endif jpayne@69: #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: #include "longintrepr.h" jpayne@69: #endif jpayne@69: #undef SHIFT jpayne@69: #undef BASE jpayne@69: #undef MASK jpayne@69: #ifdef SIZEOF_VOID_P jpayne@69: enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; jpayne@69: #endif jpayne@69: #endif jpayne@69: #ifndef __has_attribute jpayne@69: #define __has_attribute(x) 0 jpayne@69: #endif jpayne@69: #ifndef __has_cpp_attribute jpayne@69: #define __has_cpp_attribute(x) 0 jpayne@69: #endif jpayne@69: #ifndef CYTHON_RESTRICT jpayne@69: #if defined(__GNUC__) jpayne@69: #define CYTHON_RESTRICT __restrict__ jpayne@69: #elif defined(_MSC_VER) && _MSC_VER >= 1400 jpayne@69: #define CYTHON_RESTRICT __restrict jpayne@69: #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L jpayne@69: #define CYTHON_RESTRICT restrict jpayne@69: #else jpayne@69: #define CYTHON_RESTRICT jpayne@69: #endif jpayne@69: #endif jpayne@69: #ifndef CYTHON_UNUSED jpayne@69: #if defined(__cplusplus) jpayne@69: /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 jpayne@69: * but leads to warnings with -pedantic, since it is a C++17 feature */ jpayne@69: #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) jpayne@69: #if __has_cpp_attribute(maybe_unused) jpayne@69: #define CYTHON_UNUSED [[maybe_unused]] jpayne@69: #endif jpayne@69: #endif jpayne@69: #endif jpayne@69: #endif jpayne@69: #ifndef CYTHON_UNUSED jpayne@69: # if defined(__GNUC__) jpayne@69: # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) jpayne@69: # define CYTHON_UNUSED __attribute__ ((__unused__)) jpayne@69: # else jpayne@69: # define CYTHON_UNUSED jpayne@69: # endif jpayne@69: # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) jpayne@69: # define CYTHON_UNUSED __attribute__ ((__unused__)) jpayne@69: # else jpayne@69: # define CYTHON_UNUSED jpayne@69: # endif jpayne@69: #endif jpayne@69: #ifndef CYTHON_UNUSED_VAR jpayne@69: # if defined(__cplusplus) jpayne@69: template void CYTHON_UNUSED_VAR( const T& ) { } jpayne@69: # else jpayne@69: # define CYTHON_UNUSED_VAR(x) (void)(x) jpayne@69: # endif jpayne@69: #endif jpayne@69: #ifndef CYTHON_MAYBE_UNUSED_VAR jpayne@69: #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) jpayne@69: #endif jpayne@69: #ifndef CYTHON_NCP_UNUSED jpayne@69: # if CYTHON_COMPILING_IN_CPYTHON jpayne@69: # define CYTHON_NCP_UNUSED jpayne@69: # else jpayne@69: # define CYTHON_NCP_UNUSED CYTHON_UNUSED jpayne@69: # endif jpayne@69: #endif jpayne@69: #ifndef CYTHON_USE_CPP_STD_MOVE jpayne@69: #if defined(__cplusplus) && (\ jpayne@69: __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) jpayne@69: #define CYTHON_USE_CPP_STD_MOVE 1 jpayne@69: #else jpayne@69: #define CYTHON_USE_CPP_STD_MOVE 0 jpayne@69: #endif jpayne@69: #endif jpayne@69: #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) jpayne@69: #ifdef _MSC_VER jpayne@69: #ifndef _MSC_STDINT_H_ jpayne@69: #if _MSC_VER < 1300 jpayne@69: typedef unsigned char uint8_t; jpayne@69: typedef unsigned short uint16_t; jpayne@69: typedef unsigned int uint32_t; jpayne@69: #else jpayne@69: typedef unsigned __int8 uint8_t; jpayne@69: typedef unsigned __int16 uint16_t; jpayne@69: typedef unsigned __int32 uint32_t; jpayne@69: #endif jpayne@69: #endif jpayne@69: #if _MSC_VER < 1300 jpayne@69: #ifdef _WIN64 jpayne@69: typedef unsigned long long __pyx_uintptr_t; jpayne@69: #else jpayne@69: typedef unsigned int __pyx_uintptr_t; jpayne@69: #endif jpayne@69: #else jpayne@69: #ifdef _WIN64 jpayne@69: typedef unsigned __int64 __pyx_uintptr_t; jpayne@69: #else jpayne@69: typedef unsigned __int32 __pyx_uintptr_t; jpayne@69: #endif jpayne@69: #endif jpayne@69: #else jpayne@69: #include jpayne@69: typedef uintptr_t __pyx_uintptr_t; jpayne@69: #endif jpayne@69: #ifndef CYTHON_FALLTHROUGH jpayne@69: #if defined(__cplusplus) jpayne@69: /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 jpayne@69: * but leads to warnings with -pedantic, since it is a C++17 feature */ jpayne@69: #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) jpayne@69: #if __has_cpp_attribute(fallthrough) jpayne@69: #define CYTHON_FALLTHROUGH [[fallthrough]] jpayne@69: #endif jpayne@69: #endif jpayne@69: #ifndef CYTHON_FALLTHROUGH jpayne@69: #if __has_cpp_attribute(clang::fallthrough) jpayne@69: #define CYTHON_FALLTHROUGH [[clang::fallthrough]] jpayne@69: #elif __has_cpp_attribute(gnu::fallthrough) jpayne@69: #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] jpayne@69: #endif jpayne@69: #endif jpayne@69: #endif jpayne@69: #ifndef CYTHON_FALLTHROUGH jpayne@69: #if __has_attribute(fallthrough) jpayne@69: #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) jpayne@69: #else jpayne@69: #define CYTHON_FALLTHROUGH jpayne@69: #endif jpayne@69: #endif jpayne@69: #if defined(__clang__) && defined(__apple_build_version__) jpayne@69: #if __apple_build_version__ < 7000000 jpayne@69: #undef CYTHON_FALLTHROUGH jpayne@69: #define CYTHON_FALLTHROUGH jpayne@69: #endif jpayne@69: #endif jpayne@69: #endif jpayne@69: #ifdef __cplusplus jpayne@69: template jpayne@69: struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; jpayne@69: #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) jpayne@69: #else jpayne@69: #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY == 1 jpayne@69: #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) jpayne@69: #else jpayne@69: #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) jpayne@69: #endif jpayne@69: #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) jpayne@69: jpayne@69: #ifndef CYTHON_INLINE jpayne@69: #if defined(__clang__) jpayne@69: #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) jpayne@69: #elif defined(__GNUC__) jpayne@69: #define CYTHON_INLINE __inline__ jpayne@69: #elif defined(_MSC_VER) jpayne@69: #define CYTHON_INLINE __inline jpayne@69: #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L jpayne@69: #define CYTHON_INLINE inline jpayne@69: #else jpayne@69: #define CYTHON_INLINE jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: #define __PYX_BUILD_PY_SSIZE_T "n" jpayne@69: #define CYTHON_FORMAT_SSIZE_T "z" jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" jpayne@69: #define __Pyx_DefaultClassType PyClass_Type jpayne@69: #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ jpayne@69: PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) jpayne@69: #else jpayne@69: #define __Pyx_BUILTIN_MODULE_NAME "builtins" jpayne@69: #define __Pyx_DefaultClassType PyType_Type jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, jpayne@69: PyObject *code, PyObject *c, PyObject* n, PyObject *v, jpayne@69: PyObject *fv, PyObject *cell, PyObject* fn, jpayne@69: PyObject *name, int fline, PyObject *lnos) { jpayne@69: PyObject *exception_table = NULL; jpayne@69: PyObject *types_module=NULL, *code_type=NULL, *result=NULL; jpayne@69: #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 jpayne@69: PyObject *version_info; jpayne@69: PyObject *py_minor_version = NULL; jpayne@69: #endif jpayne@69: long minor_version = 0; jpayne@69: PyObject *type, *value, *traceback; jpayne@69: PyErr_Fetch(&type, &value, &traceback); jpayne@69: #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 jpayne@69: minor_version = 11; jpayne@69: #else jpayne@69: if (!(version_info = PySys_GetObject("version_info"))) goto end; jpayne@69: if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; jpayne@69: minor_version = PyLong_AsLong(py_minor_version); jpayne@69: Py_DECREF(py_minor_version); jpayne@69: if (minor_version == -1 && PyErr_Occurred()) goto end; jpayne@69: #endif jpayne@69: if (!(types_module = PyImport_ImportModule("types"))) goto end; jpayne@69: if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; jpayne@69: if (minor_version <= 7) { jpayne@69: (void)p; jpayne@69: result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, jpayne@69: c, n, v, fn, name, fline, lnos, fv, cell); jpayne@69: } else if (minor_version <= 10) { jpayne@69: result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, jpayne@69: c, n, v, fn, name, fline, lnos, fv, cell); jpayne@69: } else { jpayne@69: if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; jpayne@69: result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, jpayne@69: c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); jpayne@69: } jpayne@69: end: jpayne@69: Py_XDECREF(code_type); jpayne@69: Py_XDECREF(exception_table); jpayne@69: Py_XDECREF(types_module); jpayne@69: if (type) { jpayne@69: PyErr_Restore(type, value, traceback); jpayne@69: } jpayne@69: return result; jpayne@69: } jpayne@69: #ifndef CO_OPTIMIZED jpayne@69: #define CO_OPTIMIZED 0x0001 jpayne@69: #endif jpayne@69: #ifndef CO_NEWLOCALS jpayne@69: #define CO_NEWLOCALS 0x0002 jpayne@69: #endif jpayne@69: #ifndef CO_VARARGS jpayne@69: #define CO_VARARGS 0x0004 jpayne@69: #endif jpayne@69: #ifndef CO_VARKEYWORDS jpayne@69: #define CO_VARKEYWORDS 0x0008 jpayne@69: #endif jpayne@69: #ifndef CO_ASYNC_GENERATOR jpayne@69: #define CO_ASYNC_GENERATOR 0x0200 jpayne@69: #endif jpayne@69: #ifndef CO_GENERATOR jpayne@69: #define CO_GENERATOR 0x0020 jpayne@69: #endif jpayne@69: #ifndef CO_COROUTINE jpayne@69: #define CO_COROUTINE 0x0080 jpayne@69: #endif jpayne@69: #elif PY_VERSION_HEX >= 0x030B0000 jpayne@69: static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, jpayne@69: PyObject *code, PyObject *c, PyObject* n, PyObject *v, jpayne@69: PyObject *fv, PyObject *cell, PyObject* fn, jpayne@69: PyObject *name, int fline, PyObject *lnos) { jpayne@69: PyCodeObject *result; jpayne@69: PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); jpayne@69: if (!empty_bytes) return NULL; jpayne@69: result = jpayne@69: #if PY_VERSION_HEX >= 0x030C0000 jpayne@69: PyUnstable_Code_NewWithPosOnlyArgs jpayne@69: #else jpayne@69: PyCode_NewWithPosOnlyArgs jpayne@69: #endif jpayne@69: (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); jpayne@69: Py_DECREF(empty_bytes); jpayne@69: return result; jpayne@69: } jpayne@69: #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY jpayne@69: #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ jpayne@69: PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) jpayne@69: #else jpayne@69: #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ jpayne@69: PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) jpayne@69: #endif jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) jpayne@69: #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) jpayne@69: #else jpayne@69: #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) jpayne@69: #define __Pyx_Py_Is(x, y) Py_Is(x, y) jpayne@69: #else jpayne@69: #define __Pyx_Py_Is(x, y) ((x) == (y)) jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) jpayne@69: #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) jpayne@69: #else jpayne@69: #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) jpayne@69: #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) jpayne@69: #else jpayne@69: #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) jpayne@69: #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) jpayne@69: #else jpayne@69: #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) jpayne@69: #endif jpayne@69: #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) jpayne@69: #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY jpayne@69: #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) jpayne@69: #else jpayne@69: #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) jpayne@69: #endif jpayne@69: #ifndef CO_COROUTINE jpayne@69: #define CO_COROUTINE 0x80 jpayne@69: #endif jpayne@69: #ifndef CO_ASYNC_GENERATOR jpayne@69: #define CO_ASYNC_GENERATOR 0x200 jpayne@69: #endif jpayne@69: #ifndef Py_TPFLAGS_CHECKTYPES jpayne@69: #define Py_TPFLAGS_CHECKTYPES 0 jpayne@69: #endif jpayne@69: #ifndef Py_TPFLAGS_HAVE_INDEX jpayne@69: #define Py_TPFLAGS_HAVE_INDEX 0 jpayne@69: #endif jpayne@69: #ifndef Py_TPFLAGS_HAVE_NEWBUFFER jpayne@69: #define Py_TPFLAGS_HAVE_NEWBUFFER 0 jpayne@69: #endif jpayne@69: #ifndef Py_TPFLAGS_HAVE_FINALIZE jpayne@69: #define Py_TPFLAGS_HAVE_FINALIZE 0 jpayne@69: #endif jpayne@69: #ifndef Py_TPFLAGS_SEQUENCE jpayne@69: #define Py_TPFLAGS_SEQUENCE 0 jpayne@69: #endif jpayne@69: #ifndef Py_TPFLAGS_MAPPING jpayne@69: #define Py_TPFLAGS_MAPPING 0 jpayne@69: #endif jpayne@69: #ifndef METH_STACKLESS jpayne@69: #define METH_STACKLESS 0 jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) jpayne@69: #ifndef METH_FASTCALL jpayne@69: #define METH_FASTCALL 0x80 jpayne@69: #endif jpayne@69: typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); jpayne@69: typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, jpayne@69: Py_ssize_t nargs, PyObject *kwnames); jpayne@69: #else jpayne@69: #if PY_VERSION_HEX >= 0x030d00A4 jpayne@69: # define __Pyx_PyCFunctionFast PyCFunctionFast jpayne@69: # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords jpayne@69: #else jpayne@69: # define __Pyx_PyCFunctionFast _PyCFunctionFast jpayne@69: # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords jpayne@69: #endif jpayne@69: #endif jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: #define __Pyx_METH_FASTCALL METH_FASTCALL jpayne@69: #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast jpayne@69: #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords jpayne@69: #else jpayne@69: #define __Pyx_METH_FASTCALL METH_VARARGS jpayne@69: #define __Pyx_PyCFunction_FastCall PyCFunction jpayne@69: #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords jpayne@69: #endif jpayne@69: #if CYTHON_VECTORCALL jpayne@69: #define __pyx_vectorcallfunc vectorcallfunc jpayne@69: #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET jpayne@69: #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) jpayne@69: #elif CYTHON_BACKPORT_VECTORCALL jpayne@69: typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, jpayne@69: size_t nargsf, PyObject *kwnames); jpayne@69: #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) jpayne@69: #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) jpayne@69: #else jpayne@69: #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 jpayne@69: #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 0x030900B1 jpayne@69: #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) jpayne@69: #else jpayne@69: #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) jpayne@69: #endif jpayne@69: #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) jpayne@69: #elif !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) jpayne@69: static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { jpayne@69: return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; jpayne@69: } jpayne@69: #endif jpayne@69: static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; jpayne@69: #else jpayne@69: return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; jpayne@69: #endif jpayne@69: } jpayne@69: #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) jpayne@69: #if __PYX_LIMITED_VERSION_HEX < 0x030900B1 jpayne@69: #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) jpayne@69: typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); jpayne@69: #else jpayne@69: #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) jpayne@69: #define __Pyx_PyCMethod PyCMethod jpayne@69: #endif jpayne@69: #ifndef METH_METHOD jpayne@69: #define METH_METHOD 0x200 jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) jpayne@69: #define PyObject_Malloc(s) PyMem_Malloc(s) jpayne@69: #define PyObject_Free(p) PyMem_Free(p) jpayne@69: #define PyObject_Realloc(p) PyMem_Realloc(p) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) jpayne@69: #define __Pyx_PyFrame_SetLineNumber(frame, lineno) jpayne@69: #else jpayne@69: #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) jpayne@69: #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #define __Pyx_PyThreadState_Current PyThreadState_Get() jpayne@69: #elif !CYTHON_FAST_THREAD_STATE jpayne@69: #define __Pyx_PyThreadState_Current PyThreadState_GET() jpayne@69: #elif PY_VERSION_HEX >= 0x030d00A1 jpayne@69: #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() jpayne@69: #elif PY_VERSION_HEX >= 0x03060000 jpayne@69: #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() jpayne@69: #elif PY_VERSION_HEX >= 0x03000000 jpayne@69: #define __Pyx_PyThreadState_Current PyThreadState_GET() jpayne@69: #else jpayne@69: #define __Pyx_PyThreadState_Current _PyThreadState_Current jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) jpayne@69: { jpayne@69: void *result; jpayne@69: result = PyModule_GetState(op); jpayne@69: if (!result) jpayne@69: Py_FatalError("Couldn't find the module state"); jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) jpayne@69: #else jpayne@69: #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) jpayne@69: #include "pythread.h" jpayne@69: #define Py_tss_NEEDS_INIT 0 jpayne@69: typedef int Py_tss_t; jpayne@69: static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { jpayne@69: *key = PyThread_create_key(); jpayne@69: return 0; jpayne@69: } jpayne@69: static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { jpayne@69: Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); jpayne@69: *key = Py_tss_NEEDS_INIT; jpayne@69: return key; jpayne@69: } jpayne@69: static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { jpayne@69: PyObject_Free(key); jpayne@69: } jpayne@69: static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { jpayne@69: return *key != Py_tss_NEEDS_INIT; jpayne@69: } jpayne@69: static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { jpayne@69: PyThread_delete_key(*key); jpayne@69: *key = Py_tss_NEEDS_INIT; jpayne@69: } jpayne@69: static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { jpayne@69: return PyThread_set_key_value(*key, value); jpayne@69: } jpayne@69: static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { jpayne@69: return PyThread_get_key_value(*key); jpayne@69: } jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: #if PYPY_VERSION_NUM < 0x07030600 jpayne@69: #if defined(__cplusplus) && __cplusplus >= 201402L jpayne@69: [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] jpayne@69: #elif defined(__GNUC__) || defined(__clang__) jpayne@69: __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) jpayne@69: #elif defined(_MSC_VER) jpayne@69: __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) jpayne@69: #endif jpayne@69: static CYTHON_INLINE int PyGILState_Check(void) { jpayne@69: return 0; jpayne@69: } jpayne@69: #else // PYPY_VERSION_NUM < 0x07030600 jpayne@69: #endif // PYPY_VERSION_NUM < 0x07030600 jpayne@69: #else jpayne@69: static CYTHON_INLINE int PyGILState_Check(void) { jpayne@69: PyThreadState * tstate = _PyThreadState_Current; jpayne@69: return tstate && (tstate == PyGILState_GetThisThreadState()); jpayne@69: } jpayne@69: #endif jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) jpayne@69: #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) jpayne@69: #else jpayne@69: #define __Pyx_PyDict_NewPresized(n) PyDict_New() jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION jpayne@69: #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) jpayne@69: #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) jpayne@69: #else jpayne@69: #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) jpayne@69: #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS jpayne@69: #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) jpayne@69: static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { jpayne@69: PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); jpayne@69: if (res == NULL) PyErr_Clear(); jpayne@69: return res; jpayne@69: } jpayne@69: #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) jpayne@69: #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError jpayne@69: #define __Pyx_PyDict_GetItemStr PyDict_GetItem jpayne@69: #else jpayne@69: static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: return PyDict_GetItem(dict, name); jpayne@69: #else jpayne@69: PyDictEntry *ep; jpayne@69: PyDictObject *mp = (PyDictObject*) dict; jpayne@69: long hash = ((PyStringObject *) name)->ob_shash; jpayne@69: assert(hash != -1); jpayne@69: ep = (mp->ma_lookup)(mp, name, hash); jpayne@69: if (ep == NULL) { jpayne@69: return NULL; jpayne@69: } jpayne@69: return ep->me_value; jpayne@69: #endif jpayne@69: } jpayne@69: #define __Pyx_PyDict_GetItemStr PyDict_GetItem jpayne@69: #endif jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) jpayne@69: #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) jpayne@69: #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) jpayne@69: #else jpayne@69: #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) jpayne@69: #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) jpayne@69: #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) jpayne@69: #else jpayne@69: #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) jpayne@69: #endif jpayne@69: #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 jpayne@69: #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ jpayne@69: PyTypeObject *type = Py_TYPE((PyObject*)obj);\ jpayne@69: assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ jpayne@69: PyObject_GC_Del(obj);\ jpayne@69: Py_DECREF(type);\ jpayne@69: } jpayne@69: #else jpayne@69: #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #define CYTHON_PEP393_ENABLED 1 jpayne@69: #define __Pyx_PyUnicode_READY(op) (0) jpayne@69: #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) jpayne@69: #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) jpayne@69: #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) jpayne@69: #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) jpayne@69: #define __Pyx_PyUnicode_DATA(u) ((void*)u) jpayne@69: #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) jpayne@69: #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) jpayne@69: #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) jpayne@69: #define CYTHON_PEP393_ENABLED 1 jpayne@69: #if PY_VERSION_HEX >= 0x030C0000 jpayne@69: #define __Pyx_PyUnicode_READY(op) (0) jpayne@69: #else jpayne@69: #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ jpayne@69: 0 : _PyUnicode_Ready((PyObject *)(op))) jpayne@69: #endif jpayne@69: #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) jpayne@69: #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) jpayne@69: #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) jpayne@69: #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) jpayne@69: #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) jpayne@69: #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) jpayne@69: #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) jpayne@69: #if PY_VERSION_HEX >= 0x030C0000 jpayne@69: #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) jpayne@69: #else jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 jpayne@69: #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) jpayne@69: #else jpayne@69: #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) jpayne@69: #endif jpayne@69: #endif jpayne@69: #else jpayne@69: #define CYTHON_PEP393_ENABLED 0 jpayne@69: #define PyUnicode_1BYTE_KIND 1 jpayne@69: #define PyUnicode_2BYTE_KIND 2 jpayne@69: #define PyUnicode_4BYTE_KIND 4 jpayne@69: #define __Pyx_PyUnicode_READY(op) (0) jpayne@69: #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) jpayne@69: #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) jpayne@69: #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) jpayne@69: #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) jpayne@69: #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) jpayne@69: #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) jpayne@69: #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) jpayne@69: #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) jpayne@69: #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) jpayne@69: #else jpayne@69: #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) jpayne@69: #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ jpayne@69: PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: #if !defined(PyUnicode_DecodeUnicodeEscape) jpayne@69: #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) jpayne@69: #endif jpayne@69: #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) jpayne@69: #undef PyUnicode_Contains jpayne@69: #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) jpayne@69: #endif jpayne@69: #if !defined(PyByteArray_Check) jpayne@69: #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) jpayne@69: #endif jpayne@69: #if !defined(PyObject_Format) jpayne@69: #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) jpayne@69: #endif jpayne@69: #endif jpayne@69: #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)) jpayne@69: #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) jpayne@69: #else jpayne@69: #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) jpayne@69: #define PyObject_ASCII(o) PyObject_Repr(o) jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #define PyBaseString_Type PyUnicode_Type jpayne@69: #define PyStringObject PyUnicodeObject jpayne@69: #define PyString_Type PyUnicode_Type jpayne@69: #define PyString_Check PyUnicode_Check jpayne@69: #define PyString_CheckExact PyUnicode_CheckExact jpayne@69: #ifndef PyObject_Unicode jpayne@69: #define PyObject_Unicode PyObject_Str jpayne@69: #endif jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) jpayne@69: #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) jpayne@69: #else jpayne@69: #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) jpayne@69: #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: #define __Pyx_PySequence_ListKeepNew(obj)\ jpayne@69: (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) jpayne@69: #else jpayne@69: #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) jpayne@69: #endif jpayne@69: #ifndef PySet_CheckExact jpayne@69: #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030900A4 jpayne@69: #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) jpayne@69: #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) jpayne@69: #else jpayne@69: #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) jpayne@69: #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) jpayne@69: #endif jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) jpayne@69: #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) jpayne@69: #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) jpayne@69: #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) jpayne@69: #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) jpayne@69: #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) jpayne@69: #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) jpayne@69: #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) jpayne@69: #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) jpayne@69: #else jpayne@69: #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) jpayne@69: #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) jpayne@69: #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) jpayne@69: #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) jpayne@69: #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) jpayne@69: #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) jpayne@69: #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) jpayne@69: #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) jpayne@69: #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) jpayne@69: #endif jpayne@69: #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 jpayne@69: #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) jpayne@69: #else jpayne@69: static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { jpayne@69: PyObject *module = PyImport_AddModule(name); jpayne@69: Py_XINCREF(module); jpayne@69: return module; jpayne@69: } jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #define PyIntObject PyLongObject jpayne@69: #define PyInt_Type PyLong_Type jpayne@69: #define PyInt_Check(op) PyLong_Check(op) jpayne@69: #define PyInt_CheckExact(op) PyLong_CheckExact(op) jpayne@69: #define __Pyx_Py3Int_Check(op) PyLong_Check(op) jpayne@69: #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) jpayne@69: #define PyInt_FromString PyLong_FromString jpayne@69: #define PyInt_FromUnicode PyLong_FromUnicode jpayne@69: #define PyInt_FromLong PyLong_FromLong jpayne@69: #define PyInt_FromSize_t PyLong_FromSize_t jpayne@69: #define PyInt_FromSsize_t PyLong_FromSsize_t jpayne@69: #define PyInt_AsLong PyLong_AsLong jpayne@69: #define PyInt_AS_LONG PyLong_AS_LONG jpayne@69: #define PyInt_AsSsize_t PyLong_AsSsize_t jpayne@69: #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask jpayne@69: #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask jpayne@69: #define PyNumber_Int PyNumber_Long jpayne@69: #else jpayne@69: #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) jpayne@69: #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #define PyBoolObject PyLongObject jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY jpayne@69: #ifndef PyUnicode_InternFromString jpayne@69: #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) jpayne@69: #endif jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030200A4 jpayne@69: typedef long Py_hash_t; jpayne@69: #define __Pyx_PyInt_FromHash_t PyInt_FromLong jpayne@69: #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t jpayne@69: #else jpayne@69: #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t jpayne@69: #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t jpayne@69: #endif jpayne@69: #if CYTHON_USE_ASYNC_SLOTS jpayne@69: #if PY_VERSION_HEX >= 0x030500B1 jpayne@69: #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods jpayne@69: #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) jpayne@69: #else jpayne@69: #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) jpayne@69: #endif jpayne@69: #else jpayne@69: #define __Pyx_PyType_AsAsync(obj) NULL jpayne@69: #endif jpayne@69: #ifndef __Pyx_PyAsyncMethodsStruct jpayne@69: typedef struct { jpayne@69: unaryfunc am_await; jpayne@69: unaryfunc am_aiter; jpayne@69: unaryfunc am_anext; jpayne@69: } __Pyx_PyAsyncMethodsStruct; jpayne@69: #endif jpayne@69: jpayne@69: #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) jpayne@69: #if !defined(_USE_MATH_DEFINES) jpayne@69: #define _USE_MATH_DEFINES jpayne@69: #endif jpayne@69: #endif jpayne@69: #include jpayne@69: #ifdef NAN jpayne@69: #define __PYX_NAN() ((float) NAN) jpayne@69: #else jpayne@69: static CYTHON_INLINE float __PYX_NAN() { jpayne@69: float value; jpayne@69: memset(&value, 0xFF, sizeof(value)); jpayne@69: return value; jpayne@69: } jpayne@69: #endif jpayne@69: #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) jpayne@69: #define __Pyx_truncl trunc jpayne@69: #else jpayne@69: #define __Pyx_truncl truncl jpayne@69: #endif jpayne@69: jpayne@69: #define __PYX_MARK_ERR_POS(f_index, lineno) \ jpayne@69: { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } jpayne@69: #define __PYX_ERR(f_index, lineno, Ln_error) \ jpayne@69: { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } jpayne@69: jpayne@69: #ifdef CYTHON_EXTERN_C jpayne@69: #undef __PYX_EXTERN_C jpayne@69: #define __PYX_EXTERN_C CYTHON_EXTERN_C jpayne@69: #elif defined(__PYX_EXTERN_C) jpayne@69: #ifdef _MSC_VER jpayne@69: #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") jpayne@69: #else jpayne@69: #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. jpayne@69: #endif jpayne@69: #else jpayne@69: #ifdef __cplusplus jpayne@69: #define __PYX_EXTERN_C extern "C" jpayne@69: #else jpayne@69: #define __PYX_EXTERN_C extern jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: #define __PYX_HAVE__pysam__libcvcf jpayne@69: #define __PYX_HAVE_API__pysam__libcvcf jpayne@69: /* Early includes */ jpayne@69: #include jpayne@69: #include jpayne@69: #include jpayne@69: #include jpayne@69: #include "fcntl.h" jpayne@69: #include "unistd.h" jpayne@69: #include jpayne@69: #include "stdarg.h" jpayne@69: #include "htslib/kstring.h" jpayne@69: #include "htslib_util.h" jpayne@69: #include "htslib/hfile.h" jpayne@69: #include "htslib/bgzf.h" jpayne@69: #include "htslib/hts.h" jpayne@69: #include "htslib/sam.h" jpayne@69: #include "htslib/faidx.h" jpayne@69: #include "htslib/tbx.h" jpayne@69: #include "htslib/vcf.h" jpayne@69: #include "htslib/vcfutils.h" jpayne@69: #include "htslib/cram.h" jpayne@69: #include "pysam_stream.h" jpayne@69: #include jpayne@69: #include "pythread.h" jpayne@69: jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: #ifdef _MSC_VER jpayne@69: #pragma message ("This module uses CPython specific internals of 'array.array', which are not available in PyPy.") jpayne@69: #else jpayne@69: #warning This module uses CPython specific internals of 'array.array', which are not available in PyPy. jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: #ifdef _OPENMP jpayne@69: #include jpayne@69: #endif /* _OPENMP */ jpayne@69: jpayne@69: #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) jpayne@69: #define CYTHON_WITHOUT_ASSERTIONS jpayne@69: #endif jpayne@69: jpayne@69: typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; jpayne@69: const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; jpayne@69: jpayne@69: #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 jpayne@69: #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 jpayne@69: #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) jpayne@69: #define __PYX_DEFAULT_STRING_ENCODING "" jpayne@69: #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString jpayne@69: #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize jpayne@69: #define __Pyx_uchar_cast(c) ((unsigned char)c) jpayne@69: #define __Pyx_long_cast(x) ((long)x) jpayne@69: #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ jpayne@69: (sizeof(type) < sizeof(Py_ssize_t)) ||\ jpayne@69: (sizeof(type) > sizeof(Py_ssize_t) &&\ jpayne@69: likely(v < (type)PY_SSIZE_T_MAX ||\ jpayne@69: v == (type)PY_SSIZE_T_MAX) &&\ jpayne@69: (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ jpayne@69: v == (type)PY_SSIZE_T_MIN))) ||\ jpayne@69: (sizeof(type) == sizeof(Py_ssize_t) &&\ jpayne@69: (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ jpayne@69: v == (type)PY_SSIZE_T_MAX))) ) jpayne@69: static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { jpayne@69: return (size_t) i < (size_t) limit; jpayne@69: } jpayne@69: #if defined (__cplusplus) && __cplusplus >= 201103L jpayne@69: #include jpayne@69: #define __Pyx_sst_abs(value) std::abs(value) jpayne@69: #elif SIZEOF_INT >= SIZEOF_SIZE_T jpayne@69: #define __Pyx_sst_abs(value) abs(value) jpayne@69: #elif SIZEOF_LONG >= SIZEOF_SIZE_T jpayne@69: #define __Pyx_sst_abs(value) labs(value) jpayne@69: #elif defined (_MSC_VER) jpayne@69: #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) jpayne@69: #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L jpayne@69: #define __Pyx_sst_abs(value) llabs(value) jpayne@69: #elif defined (__GNUC__) jpayne@69: #define __Pyx_sst_abs(value) __builtin_llabs(value) jpayne@69: #else jpayne@69: #define __Pyx_sst_abs(value) ((value<0) ? -value : value) jpayne@69: #endif jpayne@69: static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); jpayne@69: static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); jpayne@69: static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); jpayne@69: #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) jpayne@69: #define __Pyx_PyBytes_FromString PyBytes_FromString jpayne@69: #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString jpayne@69: #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize jpayne@69: #else jpayne@69: #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString jpayne@69: #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize jpayne@69: #endif jpayne@69: #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) jpayne@69: #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) jpayne@69: #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) jpayne@69: #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) jpayne@69: #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) jpayne@69: #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) jpayne@69: #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) jpayne@69: #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) jpayne@69: #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) jpayne@69: #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) jpayne@69: #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) jpayne@69: #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) jpayne@69: #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) jpayne@69: #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) jpayne@69: #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) jpayne@69: #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) jpayne@69: #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) jpayne@69: #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode jpayne@69: #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) jpayne@69: #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) jpayne@69: static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); jpayne@69: static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); jpayne@69: static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); jpayne@69: #define __Pyx_PySequence_Tuple(obj)\ jpayne@69: (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) jpayne@69: static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); jpayne@69: static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); jpayne@69: static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) jpayne@69: #else jpayne@69: #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) jpayne@69: #endif jpayne@69: #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) jpayne@69: #else jpayne@69: #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) jpayne@69: #endif jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: #if PY_VERSION_HEX >= 0x030C00A7 jpayne@69: #ifndef _PyLong_SIGN_MASK jpayne@69: #define _PyLong_SIGN_MASK 3 jpayne@69: #endif jpayne@69: #ifndef _PyLong_NON_SIZE_BITS jpayne@69: #define _PyLong_NON_SIZE_BITS 3 jpayne@69: #endif jpayne@69: #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) jpayne@69: #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) jpayne@69: #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) jpayne@69: #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) jpayne@69: #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) jpayne@69: #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) jpayne@69: #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) jpayne@69: #define __Pyx_PyLong_SignedDigitCount(x)\ jpayne@69: ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) jpayne@69: #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) jpayne@69: #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) jpayne@69: #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) jpayne@69: #else jpayne@69: #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) jpayne@69: #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) jpayne@69: #endif jpayne@69: typedef Py_ssize_t __Pyx_compact_pylong; jpayne@69: typedef size_t __Pyx_compact_upylong; jpayne@69: #else jpayne@69: #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) jpayne@69: #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) jpayne@69: #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) jpayne@69: #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) jpayne@69: #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) jpayne@69: #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) jpayne@69: #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) jpayne@69: #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) jpayne@69: #define __Pyx_PyLong_CompactValue(x)\ jpayne@69: ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) jpayne@69: typedef sdigit __Pyx_compact_pylong; jpayne@69: typedef digit __Pyx_compact_upylong; jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030C00A5 jpayne@69: #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) jpayne@69: #else jpayne@69: #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) jpayne@69: #endif jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII jpayne@69: #include jpayne@69: static int __Pyx_sys_getdefaultencoding_not_ascii; jpayne@69: static int __Pyx_init_sys_getdefaultencoding_params(void) { jpayne@69: PyObject* sys; jpayne@69: PyObject* default_encoding = NULL; jpayne@69: PyObject* ascii_chars_u = NULL; jpayne@69: PyObject* ascii_chars_b = NULL; jpayne@69: const char* default_encoding_c; jpayne@69: sys = PyImport_ImportModule("sys"); jpayne@69: if (!sys) goto bad; jpayne@69: default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); jpayne@69: Py_DECREF(sys); jpayne@69: if (!default_encoding) goto bad; jpayne@69: default_encoding_c = PyBytes_AsString(default_encoding); jpayne@69: if (!default_encoding_c) goto bad; jpayne@69: if (strcmp(default_encoding_c, "ascii") == 0) { jpayne@69: __Pyx_sys_getdefaultencoding_not_ascii = 0; jpayne@69: } else { jpayne@69: char ascii_chars[128]; jpayne@69: int c; jpayne@69: for (c = 0; c < 128; c++) { jpayne@69: ascii_chars[c] = (char) c; jpayne@69: } jpayne@69: __Pyx_sys_getdefaultencoding_not_ascii = 1; jpayne@69: ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); jpayne@69: if (!ascii_chars_u) goto bad; jpayne@69: ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); jpayne@69: if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { jpayne@69: PyErr_Format( jpayne@69: PyExc_ValueError, jpayne@69: "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", jpayne@69: default_encoding_c); jpayne@69: goto bad; jpayne@69: } jpayne@69: Py_DECREF(ascii_chars_u); jpayne@69: Py_DECREF(ascii_chars_b); jpayne@69: } jpayne@69: Py_DECREF(default_encoding); jpayne@69: return 0; jpayne@69: bad: jpayne@69: Py_XDECREF(default_encoding); jpayne@69: Py_XDECREF(ascii_chars_u); jpayne@69: Py_XDECREF(ascii_chars_b); jpayne@69: return -1; jpayne@69: } jpayne@69: #endif jpayne@69: #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 jpayne@69: #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) jpayne@69: #else jpayne@69: #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) jpayne@69: #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT jpayne@69: #include jpayne@69: static char* __PYX_DEFAULT_STRING_ENCODING; jpayne@69: static int __Pyx_init_sys_getdefaultencoding_params(void) { jpayne@69: PyObject* sys; jpayne@69: PyObject* default_encoding = NULL; jpayne@69: char* default_encoding_c; jpayne@69: sys = PyImport_ImportModule("sys"); jpayne@69: if (!sys) goto bad; jpayne@69: default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); jpayne@69: Py_DECREF(sys); jpayne@69: if (!default_encoding) goto bad; jpayne@69: default_encoding_c = PyBytes_AsString(default_encoding); jpayne@69: if (!default_encoding_c) goto bad; jpayne@69: __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); jpayne@69: if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; jpayne@69: strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); jpayne@69: Py_DECREF(default_encoding); jpayne@69: return 0; jpayne@69: bad: jpayne@69: Py_XDECREF(default_encoding); jpayne@69: return -1; jpayne@69: } jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: /* Test for GCC > 2.95 */ jpayne@69: #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) jpayne@69: #define likely(x) __builtin_expect(!!(x), 1) jpayne@69: #define unlikely(x) __builtin_expect(!!(x), 0) jpayne@69: #else /* !__GNUC__ or GCC < 2.95 */ jpayne@69: #define likely(x) (x) jpayne@69: #define unlikely(x) (x) jpayne@69: #endif /* __GNUC__ */ jpayne@69: static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } jpayne@69: jpayne@69: #if !CYTHON_USE_MODULE_STATE jpayne@69: static PyObject *__pyx_m = NULL; jpayne@69: #endif jpayne@69: static int __pyx_lineno; jpayne@69: static int __pyx_clineno = 0; jpayne@69: static const char * __pyx_cfilenm = __FILE__; jpayne@69: static const char *__pyx_filename; jpayne@69: jpayne@69: /* #### Code section: filename_table ### */ jpayne@69: jpayne@69: static const char *__pyx_f[] = { jpayne@69: "pysam/libcvcf.pyx", jpayne@69: "", jpayne@69: "contextvars.pxd", jpayne@69: "array.pxd", jpayne@69: "pysam/libchtslib.pxd", jpayne@69: "pysam/libctabix.pxd", jpayne@69: "pysam/libctabixproxies.pxd", jpayne@69: "type.pxd", jpayne@69: "bool.pxd", jpayne@69: "complex.pxd", jpayne@69: }; jpayne@69: /* #### Code section: utility_code_proto_before_types ### */ jpayne@69: /* ForceInitThreads.proto */ jpayne@69: #ifndef __PYX_FORCE_INIT_THREADS jpayne@69: #define __PYX_FORCE_INIT_THREADS 0 jpayne@69: #endif jpayne@69: jpayne@69: /* #### Code section: numeric_typedefs ### */ jpayne@69: /* #### Code section: complex_type_declarations ### */ jpayne@69: /* #### Code section: type_declarations ### */ jpayne@69: jpayne@69: /*--- Type declarations ---*/ jpayne@69: #ifndef _ARRAYARRAY_H jpayne@69: struct arrayobject; jpayne@69: typedef struct arrayobject arrayobject; jpayne@69: #endif jpayne@69: struct __pyx_obj_5pysam_10libchtslib_HTSFile; jpayne@69: struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator; jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixFile; jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser; jpayne@69: struct __pyx_obj_5pysam_9libctabix_asTuple; jpayne@69: struct __pyx_obj_5pysam_9libctabix_asGTF; jpayne@69: struct __pyx_obj_5pysam_9libctabix_asGFF3; jpayne@69: struct __pyx_obj_5pysam_9libctabix_asBed; jpayne@69: struct __pyx_obj_5pysam_9libctabix_asVCF; jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixIterator; jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed; jpayne@69: struct __pyx_obj_5pysam_9libctabix_GZIterator; jpayne@69: struct __pyx_obj_5pysam_9libctabix_GZIteratorHead; jpayne@69: struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed; jpayne@69: struct __pyx_obj_5pysam_9libctabix_Tabixfile; jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy; jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator; jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy; jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy; jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy; jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_BedProxy; jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy; jpayne@69: struct __pyx_obj_5pysam_7libcvcf_VCFRecord; jpayne@69: struct __pyx_obj_5pysam_7libcvcf_asVCFRecord; jpayne@69: struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse; jpayne@69: struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy; jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":23 jpayne@69: * cdef take(self, char * buffer, size_t nbytes) jpayne@69: * cdef present(self, char * buffer, size_t nbytes) jpayne@69: * cdef copy(self, char * buffer, size_t nbytes, bint reset=*) # <<<<<<<<<<<<<< jpayne@69: * cdef update(self, char * buffer, size_t nbytes) jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy { jpayne@69: int __pyx_n; jpayne@69: int reset; jpayne@69: }; jpayne@69: struct __pyx_opt_args_7cpython_11contextvars_get_value; jpayne@69: struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":112 jpayne@69: * jpayne@69: * jpayne@69: * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< jpayne@69: * """Return a new reference to the value of the context variable, jpayne@69: * or the default value of the context variable, jpayne@69: */ jpayne@69: struct __pyx_opt_args_7cpython_11contextvars_get_value { jpayne@69: int __pyx_n; jpayne@69: PyObject *default_value; jpayne@69: }; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":129 jpayne@69: * jpayne@69: * jpayne@69: * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< jpayne@69: * """Return a new reference to the value of the context variable, jpayne@69: * or the provided default value if no such value was found. jpayne@69: */ jpayne@69: struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { jpayne@69: int __pyx_n; jpayne@69: PyObject *default_value; jpayne@69: }; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_parse_region; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_force_str; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_force_bytes; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_decode_bytes; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":8 jpayne@69: * from cpython cimport array as c_array jpayne@69: * jpayne@69: * cpdef parse_region(contig=*, start=*, stop=*, region=*, reference=*, end=*) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef int libc_whence_from_io(int whence) jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_parse_region { jpayne@69: int __pyx_n; jpayne@69: PyObject *contig; jpayne@69: PyObject *start; jpayne@69: PyObject *stop; jpayne@69: PyObject *region; jpayne@69: PyObject *reference; jpayne@69: PyObject *end; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":15 jpayne@69: * # Utility functions for quality string conversions jpayne@69: * jpayne@69: * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) # <<<<<<<<<<<<<< jpayne@69: * cpdef array_to_qualitystring(c_array.array arr, int offset=*) jpayne@69: * cpdef qualities_to_qualitystring(qualities, int offset=*) jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array { jpayne@69: int __pyx_n; jpayne@69: int offset; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":16 jpayne@69: * jpayne@69: * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) jpayne@69: * cpdef array_to_qualitystring(c_array.array arr, int offset=*) # <<<<<<<<<<<<<< jpayne@69: * cpdef qualities_to_qualitystring(qualities, int offset=*) jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring { jpayne@69: int __pyx_n; jpayne@69: int offset; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":17 jpayne@69: * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) jpayne@69: * cpdef array_to_qualitystring(c_array.array arr, int offset=*) jpayne@69: * cpdef qualities_to_qualitystring(qualities, int offset=*) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * ######################################################################## jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring { jpayne@69: int __pyx_n; jpayne@69: int offset; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":29 jpayne@69: * ## Python 3 compatibility functions jpayne@69: * ######################################################################## jpayne@69: * cdef charptr_to_str(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<< jpayne@69: * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) jpayne@69: * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str { jpayne@69: int __pyx_n; jpayne@69: PyObject *encoding; jpayne@69: PyObject *errors; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":30 jpayne@69: * ######################################################################## jpayne@69: * cdef charptr_to_str(const char *s, encoding=*, errors=*) jpayne@69: * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<< jpayne@69: * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) jpayne@69: * cdef force_str(object s, encoding=*, errors=*) jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes { jpayne@69: int __pyx_n; jpayne@69: PyObject *encoding; jpayne@69: PyObject *errors; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":31 jpayne@69: * cdef charptr_to_str(const char *s, encoding=*, errors=*) jpayne@69: * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) jpayne@69: * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) # <<<<<<<<<<<<<< jpayne@69: * cdef force_str(object s, encoding=*, errors=*) jpayne@69: * cdef bytes force_bytes(object s, encoding=*, errors=*) jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len { jpayne@69: int __pyx_n; jpayne@69: PyObject *encoding; jpayne@69: PyObject *errors; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":32 jpayne@69: * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) jpayne@69: * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) jpayne@69: * cdef force_str(object s, encoding=*, errors=*) # <<<<<<<<<<<<<< jpayne@69: * cdef bytes force_bytes(object s, encoding=*, errors=*) jpayne@69: * cdef decode_bytes(bytes s, encoding=*, errors=*) jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_force_str { jpayne@69: int __pyx_n; jpayne@69: PyObject *encoding; jpayne@69: PyObject *errors; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":33 jpayne@69: * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) jpayne@69: * cdef force_str(object s, encoding=*, errors=*) jpayne@69: * cdef bytes force_bytes(object s, encoding=*, errors=*) # <<<<<<<<<<<<<< jpayne@69: * cdef decode_bytes(bytes s, encoding=*, errors=*) jpayne@69: * cdef bytes encode_filename(object filename) jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_force_bytes { jpayne@69: int __pyx_n; jpayne@69: PyObject *encoding; jpayne@69: PyObject *errors; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libcutils.pxd":34 jpayne@69: * cdef force_str(object s, encoding=*, errors=*) jpayne@69: * cdef bytes force_bytes(object s, encoding=*, errors=*) jpayne@69: * cdef decode_bytes(bytes s, encoding=*, errors=*) # <<<<<<<<<<<<<< jpayne@69: * cdef bytes encode_filename(object filename) jpayne@69: * cdef from_string_and_size(const char *s, size_t length) jpayne@69: */ jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_decode_bytes { jpayne@69: int __pyx_n; jpayne@69: PyObject *encoding; jpayne@69: PyObject *errors; jpayne@69: }; jpayne@69: jpayne@69: /* "pysam/libchtslib.pxd":2706 jpayne@69: * jpayne@69: * jpayne@69: * cdef class HTSFile(object): # <<<<<<<<<<<<<< jpayne@69: * cdef htsFile *htsfile # pointer to htsFile structure jpayne@69: * cdef int64_t start_offset # BGZF offset of first record jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_10libchtslib_HTSFile { jpayne@69: PyObject_HEAD jpayne@69: struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtab; jpayne@69: htsFile *htsfile; jpayne@69: int64_t start_offset; jpayne@69: PyObject *filename; jpayne@69: PyObject *mode; jpayne@69: PyObject *threads; jpayne@69: PyObject *index_filename; jpayne@69: int is_stream; jpayne@69: int is_remote; jpayne@69: int duplicate_filehandle; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":48 jpayne@69: * jpayne@69: * jpayne@69: * cdef class tabix_file_iterator: # <<<<<<<<<<<<<< jpayne@69: * cdef BGZF * fh jpayne@69: * cdef kstream_t * kstream jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator { jpayne@69: PyObject_HEAD jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator *__pyx_vtab; jpayne@69: BGZF *fh; jpayne@69: kstream_t *kstream; jpayne@69: kstring_t buffer; jpayne@69: size_t size; jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser *parser; jpayne@69: int fd; jpayne@69: int duplicated_fd; jpayne@69: PyObject *infile; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":61 jpayne@69: * jpayne@69: * jpayne@69: * cdef class TabixFile(HTSFile): # <<<<<<<<<<<<<< jpayne@69: * # pointer to index structure jpayne@69: * cdef tbx_t * index jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixFile { jpayne@69: struct __pyx_obj_5pysam_10libchtslib_HTSFile __pyx_base; jpayne@69: tbx_t *index; jpayne@69: PyObject *filename_index; jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser *parser; jpayne@69: PyObject *encoding; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":72 jpayne@69: * jpayne@69: * jpayne@69: * cdef class Parser: # <<<<<<<<<<<<<< jpayne@69: * cdef encoding jpayne@69: * cdef parse(self, char * buffer, int len) jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser { jpayne@69: PyObject_HEAD jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Parser *__pyx_vtab; jpayne@69: PyObject *encoding; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":77 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asTuple(Parser): # <<<<<<<<<<<<<< jpayne@69: * cdef parse(self, char * buffer, int len) jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_asTuple { jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":81 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asGTF(Parser): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_asGTF { jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":85 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asGFF3(Parser): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_asGFF3 { jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":89 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asBed(Parser): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_asBed { jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":93 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asVCF(Parser): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_asVCF { jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":97 jpayne@69: * jpayne@69: * jpayne@69: * cdef class TabixIterator: # <<<<<<<<<<<<<< jpayne@69: * cdef hts_itr_t * iterator jpayne@69: * cdef TabixFile tabixfile jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixIterator { jpayne@69: PyObject_HEAD jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator *__pyx_vtab; jpayne@69: hts_itr_t *iterator; jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixFile *tabixfile; jpayne@69: kstring_t buffer; jpayne@69: PyObject *encoding; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":105 jpayne@69: * jpayne@69: * jpayne@69: * cdef class TabixIteratorParsed(TabixIterator): # <<<<<<<<<<<<<< jpayne@69: * cdef Parser parser jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed { jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixIterator __pyx_base; jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser *parser; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":109 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GZIterator: # <<<<<<<<<<<<<< jpayne@69: * cdef object _filename jpayne@69: * cdef BGZF * gzipfile jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_GZIterator { jpayne@69: PyObject_HEAD jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator *__pyx_vtab; jpayne@69: PyObject *_filename; jpayne@69: BGZF *gzipfile; jpayne@69: kstream_t *kstream; jpayne@69: kstring_t buffer; jpayne@69: PyObject *encoding; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":118 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GZIteratorHead(GZIterator): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_GZIteratorHead { jpayne@69: struct __pyx_obj_5pysam_9libctabix_GZIterator __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":122 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GZIteratorParsed(GZIterator): # <<<<<<<<<<<<<< jpayne@69: * cdef Parser parser jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed { jpayne@69: struct __pyx_obj_5pysam_9libctabix_GZIterator __pyx_base; jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser *parser; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":127 jpayne@69: * jpayne@69: * # Compatibility Layer for pysam < 0.8 jpayne@69: * cdef class Tabixfile(TabixFile): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_9libctabix_Tabixfile { jpayne@69: struct __pyx_obj_5pysam_9libctabix_TabixFile __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":5 jpayne@69: * from libc.stdint cimport uint8_t, int32_t, uint32_t, int64_t, uint64_t jpayne@69: * jpayne@69: * cdef class TupleProxy: # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef: jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy { jpayne@69: PyObject_HEAD jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *__pyx_vtab; jpayne@69: char *data; jpayne@69: char **fields; jpayne@69: int nfields; jpayne@69: int nbytes; jpayne@69: int offset; jpayne@69: int is_modified; jpayne@69: PyObject *encoding; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":27 jpayne@69: * jpayne@69: * jpayne@69: * cdef class TupleProxyIterator: # <<<<<<<<<<<<<< jpayne@69: * cdef TupleProxy proxy jpayne@69: * cdef int index jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator { jpayne@69: PyObject_HEAD jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *proxy; jpayne@69: int index; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":32 jpayne@69: * jpayne@69: * jpayne@69: * cdef class NamedTupleProxy(TupleProxy): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy { jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":36 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GTFProxy(NamedTupleProxy): # <<<<<<<<<<<<<< jpayne@69: * cdef object attribute_dict jpayne@69: * cpdef int getMaxFields(self) jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy { jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; jpayne@69: PyObject *attribute_dict; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":42 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GFF3Proxy(GTFProxy): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy { jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy __pyx_base; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":46 jpayne@69: * jpayne@69: * jpayne@69: * cdef class BedProxy(NamedTupleProxy): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef: jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_BedProxy { jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; jpayne@69: char *contig; jpayne@69: uint32_t start; jpayne@69: uint32_t end; jpayne@69: int bedfields; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":58 jpayne@69: * cdef update(self, char * buffer, size_t nbytes) jpayne@69: * jpayne@69: * cdef class VCFProxy(NamedTupleProxy) : # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef: jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy { jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; jpayne@69: char *contig; jpayne@69: uint32_t pos; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":104 jpayne@69: * ########################################################################################################### jpayne@69: * jpayne@69: * cdef class VCFRecord(libctabixproxies.TupleProxy): # <<<<<<<<<<<<<< jpayne@69: * '''vcf record. jpayne@69: * jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_7libcvcf_VCFRecord { jpayne@69: struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy __pyx_base; jpayne@69: PyObject *vcf; jpayne@69: char *contig; jpayne@69: uint32_t pos; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":241 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asVCFRecord(libctabix.Parser): # <<<<<<<<<<<<<< jpayne@69: * '''converts a :term:`tabix row` into a VCF record.''' jpayne@69: * cdef vcffile jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_7libcvcf_asVCFRecord { jpayne@69: struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base; jpayne@69: PyObject *vcffile; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":929 jpayne@69: * return line jpayne@69: * jpayne@69: * def _parse(self, line, stream): # <<<<<<<<<<<<<< jpayne@69: * # deal with files with header only jpayne@69: * if line.startswith("##"): return jpayne@69: */ jpayne@69: struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse { jpayne@69: PyObject_HEAD jpayne@69: PyObject *__pyx_v_d; jpayne@69: PyObject *__pyx_v_line; jpayne@69: PyObject *__pyx_v_self; jpayne@69: PyObject *__pyx_v_stream; jpayne@69: PyObject *__pyx_t_0; jpayne@69: Py_ssize_t __pyx_t_1; jpayne@69: PyObject *(*__pyx_t_2)(PyObject *); jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: jpayne@69: /* "pysam/libchtslib.pxd":2706 jpayne@69: * jpayne@69: * jpayne@69: * cdef class HTSFile(object): # <<<<<<<<<<<<<< jpayne@69: * cdef htsFile *htsfile # pointer to htsFile structure jpayne@69: * cdef int64_t start_offset # BGZF offset of first record jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile { jpayne@69: htsFile *(*_open_htsfile)(struct __pyx_obj_5pysam_10libchtslib_HTSFile *); jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtabptr_5pysam_10libchtslib_HTSFile; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":48 jpayne@69: * jpayne@69: * jpayne@69: * cdef class tabix_file_iterator: # <<<<<<<<<<<<<< jpayne@69: * cdef BGZF * fh jpayne@69: * cdef kstream_t * kstream jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator { jpayne@69: PyObject *(*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *); jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator *__pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":61 jpayne@69: * jpayne@69: * jpayne@69: * cdef class TabixFile(HTSFile): # <<<<<<<<<<<<<< jpayne@69: * # pointer to index structure jpayne@69: * cdef tbx_t * index jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile { jpayne@69: struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile *__pyx_vtabptr_5pysam_9libctabix_TabixFile; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":72 jpayne@69: * jpayne@69: * jpayne@69: * cdef class Parser: # <<<<<<<<<<<<<< jpayne@69: * cdef encoding jpayne@69: * cdef parse(self, char * buffer, int len) jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Parser { jpayne@69: PyObject *(*parse)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int); jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_Parser *__pyx_vtabptr_5pysam_9libctabix_Parser; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":77 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asTuple(Parser): # <<<<<<<<<<<<<< jpayne@69: * cdef parse(self, char * buffer, int len) jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_asTuple { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_asTuple *__pyx_vtabptr_5pysam_9libctabix_asTuple; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":81 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asGTF(Parser): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_asGTF { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_asGTF *__pyx_vtabptr_5pysam_9libctabix_asGTF; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":85 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asGFF3(Parser): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3 { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3 *__pyx_vtabptr_5pysam_9libctabix_asGFF3; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":89 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asBed(Parser): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_asBed { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_asBed *__pyx_vtabptr_5pysam_9libctabix_asBed; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":93 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asVCF(Parser): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_asVCF { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_asVCF *__pyx_vtabptr_5pysam_9libctabix_asVCF; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":97 jpayne@69: * jpayne@69: * jpayne@69: * cdef class TabixIterator: # <<<<<<<<<<<<<< jpayne@69: * cdef hts_itr_t * iterator jpayne@69: * cdef TabixFile tabixfile jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator { jpayne@69: int (*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_TabixIterator *); jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator *__pyx_vtabptr_5pysam_9libctabix_TabixIterator; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":105 jpayne@69: * jpayne@69: * jpayne@69: * cdef class TabixIteratorParsed(TabixIterator): # <<<<<<<<<<<<<< jpayne@69: * cdef Parser parser jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed *__pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":109 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GZIterator: # <<<<<<<<<<<<<< jpayne@69: * cdef object _filename jpayne@69: * cdef BGZF * gzipfile jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator { jpayne@69: int (*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_GZIterator *); jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator *__pyx_vtabptr_5pysam_9libctabix_GZIterator; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":118 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GZIteratorHead(GZIterator): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead *__pyx_vtabptr_5pysam_9libctabix_GZIteratorHead; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":122 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GZIteratorParsed(GZIterator): # <<<<<<<<<<<<<< jpayne@69: * cdef Parser parser jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed *__pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabix.pxd":127 jpayne@69: * jpayne@69: * # Compatibility Layer for pysam < 0.8 jpayne@69: * cdef class Tabixfile(TabixFile): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile *__pyx_vtabptr_5pysam_9libctabix_Tabixfile; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":5 jpayne@69: * from libc.stdint cimport uint8_t, int32_t, uint32_t, int64_t, uint64_t jpayne@69: * jpayne@69: * cdef class TupleProxy: # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef: jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy { jpayne@69: int (*getMaxFields)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch); jpayne@69: int (*getMinFields)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch); jpayne@69: PyObject *(*take)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t); jpayne@69: PyObject *(*present)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t); jpayne@69: PyObject *(*copy)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t, struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy *__pyx_optional_args); jpayne@69: PyObject *(*update)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t); jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *__pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":32 jpayne@69: * jpayne@69: * jpayne@69: * cdef class NamedTupleProxy(TupleProxy): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy { jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":36 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GTFProxy(NamedTupleProxy): # <<<<<<<<<<<<<< jpayne@69: * cdef object attribute_dict jpayne@69: * cpdef int getMaxFields(self) jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy { jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy *__pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":42 jpayne@69: * jpayne@69: * jpayne@69: * cdef class GFF3Proxy(GTFProxy): # <<<<<<<<<<<<<< jpayne@69: * pass jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy { jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy *__pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":46 jpayne@69: * jpayne@69: * jpayne@69: * cdef class BedProxy(NamedTupleProxy): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef: jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy { jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy *__pyx_vtabptr_5pysam_16libctabixproxies_BedProxy; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libctabixproxies.pxd":58 jpayne@69: * cdef update(self, char * buffer, size_t nbytes) jpayne@69: * jpayne@69: * cdef class VCFProxy(NamedTupleProxy) : # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef: jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy { jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy *__pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":104 jpayne@69: * ########################################################################################################### jpayne@69: * jpayne@69: * cdef class VCFRecord(libctabixproxies.TupleProxy): # <<<<<<<<<<<<<< jpayne@69: * '''vcf record. jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_7libcvcf_VCFRecord { jpayne@69: struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_7libcvcf_VCFRecord *__pyx_vtabptr_5pysam_7libcvcf_VCFRecord; jpayne@69: jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":241 jpayne@69: * jpayne@69: * jpayne@69: * cdef class asVCFRecord(libctabix.Parser): # <<<<<<<<<<<<<< jpayne@69: * '''converts a :term:`tabix row` into a VCF record.''' jpayne@69: * cdef vcffile jpayne@69: */ jpayne@69: jpayne@69: struct __pyx_vtabstruct_5pysam_7libcvcf_asVCFRecord { jpayne@69: struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base; jpayne@69: }; jpayne@69: static struct __pyx_vtabstruct_5pysam_7libcvcf_asVCFRecord *__pyx_vtabptr_5pysam_7libcvcf_asVCFRecord; jpayne@69: /* #### Code section: utility_code_proto ### */ jpayne@69: jpayne@69: /* --- Runtime support code (head) --- */ jpayne@69: /* Refnanny.proto */ jpayne@69: #ifndef CYTHON_REFNANNY jpayne@69: #define CYTHON_REFNANNY 0 jpayne@69: #endif jpayne@69: #if CYTHON_REFNANNY jpayne@69: typedef struct { jpayne@69: void (*INCREF)(void*, PyObject*, Py_ssize_t); jpayne@69: void (*DECREF)(void*, PyObject*, Py_ssize_t); jpayne@69: void (*GOTREF)(void*, PyObject*, Py_ssize_t); jpayne@69: void (*GIVEREF)(void*, PyObject*, Py_ssize_t); jpayne@69: void* (*SetupContext)(const char*, Py_ssize_t, const char*); jpayne@69: void (*FinishContext)(void**); jpayne@69: } __Pyx_RefNannyAPIStruct; jpayne@69: static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; jpayne@69: static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); jpayne@69: #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; jpayne@69: #ifdef WITH_THREAD jpayne@69: #define __Pyx_RefNannySetupContext(name, acquire_gil)\ jpayne@69: if (acquire_gil) {\ jpayne@69: PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ jpayne@69: __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ jpayne@69: PyGILState_Release(__pyx_gilstate_save);\ jpayne@69: } else {\ jpayne@69: __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ jpayne@69: } jpayne@69: #define __Pyx_RefNannyFinishContextNogil() {\ jpayne@69: PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ jpayne@69: __Pyx_RefNannyFinishContext();\ jpayne@69: PyGILState_Release(__pyx_gilstate_save);\ jpayne@69: } jpayne@69: #else jpayne@69: #define __Pyx_RefNannySetupContext(name, acquire_gil)\ jpayne@69: __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) jpayne@69: #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() jpayne@69: #endif jpayne@69: #define __Pyx_RefNannyFinishContextNogil() {\ jpayne@69: PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ jpayne@69: __Pyx_RefNannyFinishContext();\ jpayne@69: PyGILState_Release(__pyx_gilstate_save);\ jpayne@69: } jpayne@69: #define __Pyx_RefNannyFinishContext()\ jpayne@69: __Pyx_RefNanny->FinishContext(&__pyx_refnanny) jpayne@69: #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) jpayne@69: #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) jpayne@69: #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) jpayne@69: #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) jpayne@69: #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) jpayne@69: #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) jpayne@69: #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) jpayne@69: #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) jpayne@69: #else jpayne@69: #define __Pyx_RefNannyDeclarations jpayne@69: #define __Pyx_RefNannySetupContext(name, acquire_gil) jpayne@69: #define __Pyx_RefNannyFinishContextNogil() jpayne@69: #define __Pyx_RefNannyFinishContext() jpayne@69: #define __Pyx_INCREF(r) Py_INCREF(r) jpayne@69: #define __Pyx_DECREF(r) Py_DECREF(r) jpayne@69: #define __Pyx_GOTREF(r) jpayne@69: #define __Pyx_GIVEREF(r) jpayne@69: #define __Pyx_XINCREF(r) Py_XINCREF(r) jpayne@69: #define __Pyx_XDECREF(r) Py_XDECREF(r) jpayne@69: #define __Pyx_XGOTREF(r) jpayne@69: #define __Pyx_XGIVEREF(r) jpayne@69: #endif jpayne@69: #define __Pyx_Py_XDECREF_SET(r, v) do {\ jpayne@69: PyObject *tmp = (PyObject *) r;\ jpayne@69: r = v; Py_XDECREF(tmp);\ jpayne@69: } while (0) jpayne@69: #define __Pyx_XDECREF_SET(r, v) do {\ jpayne@69: PyObject *tmp = (PyObject *) r;\ jpayne@69: r = v; __Pyx_XDECREF(tmp);\ jpayne@69: } while (0) jpayne@69: #define __Pyx_DECREF_SET(r, v) do {\ jpayne@69: PyObject *tmp = (PyObject *) r;\ jpayne@69: r = v; __Pyx_DECREF(tmp);\ jpayne@69: } while (0) jpayne@69: #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) jpayne@69: #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) jpayne@69: jpayne@69: /* PyErrExceptionMatches.proto */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) jpayne@69: static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); jpayne@69: #else jpayne@69: #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) jpayne@69: #endif jpayne@69: jpayne@69: /* PyThreadStateGet.proto */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; jpayne@69: #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; jpayne@69: #if PY_VERSION_HEX >= 0x030C00A6 jpayne@69: #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) jpayne@69: #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) jpayne@69: #else jpayne@69: #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) jpayne@69: #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) jpayne@69: #endif jpayne@69: #else jpayne@69: #define __Pyx_PyThreadState_declare jpayne@69: #define __Pyx_PyThreadState_assign jpayne@69: #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) jpayne@69: #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() jpayne@69: #endif jpayne@69: jpayne@69: /* PyErrFetchRestore.proto */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) jpayne@69: #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) jpayne@69: #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) jpayne@69: #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) jpayne@69: #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) jpayne@69: static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); jpayne@69: static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 jpayne@69: #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) jpayne@69: #else jpayne@69: #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) jpayne@69: #endif jpayne@69: #else jpayne@69: #define __Pyx_PyErr_Clear() PyErr_Clear() jpayne@69: #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) jpayne@69: #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) jpayne@69: #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) jpayne@69: #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) jpayne@69: #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) jpayne@69: #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) jpayne@69: #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectGetAttrStr.proto */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); jpayne@69: #else jpayne@69: #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectGetAttrStrNoError.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); jpayne@69: jpayne@69: /* GetBuiltinName.proto */ jpayne@69: static PyObject *__Pyx_GetBuiltinName(PyObject *name); jpayne@69: jpayne@69: /* TupleAndListFromArray.proto */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); jpayne@69: #endif jpayne@69: jpayne@69: /* IncludeStringH.proto */ jpayne@69: #include jpayne@69: jpayne@69: /* BytesEquals.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); jpayne@69: jpayne@69: /* UnicodeEquals.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); jpayne@69: jpayne@69: /* fastcall.proto */ jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) jpayne@69: #elif CYTHON_ASSUME_SAFE_MACROS jpayne@69: #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) jpayne@69: #else jpayne@69: #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) jpayne@69: #endif jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) jpayne@69: #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) jpayne@69: #else jpayne@69: #define __Pyx_Arg_NewRef_VARARGS(arg) arg jpayne@69: #define __Pyx_Arg_XDECREF_VARARGS(arg) jpayne@69: #endif jpayne@69: #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) jpayne@69: #define __Pyx_KwValues_VARARGS(args, nargs) NULL jpayne@69: #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) jpayne@69: #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: #define __Pyx_Arg_FASTCALL(args, i) args[i] jpayne@69: #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) jpayne@69: #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) jpayne@69: static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 jpayne@69: CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); jpayne@69: #else jpayne@69: #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) jpayne@69: #endif jpayne@69: #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs jpayne@69: to have the same reference counting */ jpayne@69: #define __Pyx_Arg_XDECREF_FASTCALL(arg) jpayne@69: #else jpayne@69: #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS jpayne@69: #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS jpayne@69: #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS jpayne@69: #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS jpayne@69: #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS jpayne@69: #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) jpayne@69: #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) jpayne@69: #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) jpayne@69: #else jpayne@69: #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) jpayne@69: #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) jpayne@69: #endif jpayne@69: jpayne@69: /* RaiseArgTupleInvalid.proto */ jpayne@69: static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, jpayne@69: Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); jpayne@69: jpayne@69: /* RaiseDoubleKeywords.proto */ jpayne@69: static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); jpayne@69: jpayne@69: /* ParseKeywords.proto */ jpayne@69: static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, jpayne@69: PyObject **argnames[], jpayne@69: PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, jpayne@69: const char* function_name); jpayne@69: jpayne@69: /* PyDictVersioning.proto */ jpayne@69: #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS jpayne@69: #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) jpayne@69: #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) jpayne@69: #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ jpayne@69: (version_var) = __PYX_GET_DICT_VERSION(dict);\ jpayne@69: (cache_var) = (value); jpayne@69: #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ jpayne@69: static PY_UINT64_T __pyx_dict_version = 0;\ jpayne@69: static PyObject *__pyx_dict_cached_value = NULL;\ jpayne@69: if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ jpayne@69: (VAR) = __pyx_dict_cached_value;\ jpayne@69: } else {\ jpayne@69: (VAR) = __pyx_dict_cached_value = (LOOKUP);\ jpayne@69: __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ jpayne@69: }\ jpayne@69: } jpayne@69: static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); jpayne@69: static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); jpayne@69: static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); jpayne@69: #else jpayne@69: #define __PYX_GET_DICT_VERSION(dict) (0) jpayne@69: #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) jpayne@69: #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); jpayne@69: #endif jpayne@69: jpayne@69: /* GetModuleGlobalName.proto */ jpayne@69: #if CYTHON_USE_DICT_VERSIONS jpayne@69: #define __Pyx_GetModuleGlobalName(var, name) do {\ jpayne@69: static PY_UINT64_T __pyx_dict_version = 0;\ jpayne@69: static PyObject *__pyx_dict_cached_value = NULL;\ jpayne@69: (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ jpayne@69: (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ jpayne@69: __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ jpayne@69: } while(0) jpayne@69: #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ jpayne@69: PY_UINT64_T __pyx_dict_version;\ jpayne@69: PyObject *__pyx_dict_cached_value;\ jpayne@69: (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ jpayne@69: } while(0) jpayne@69: static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); jpayne@69: #else jpayne@69: #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) jpayne@69: #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) jpayne@69: static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); jpayne@69: #endif jpayne@69: jpayne@69: /* PyFunctionFastCall.proto */ jpayne@69: #if CYTHON_FAST_PYCALL jpayne@69: #if !CYTHON_VECTORCALL jpayne@69: #define __Pyx_PyFunction_FastCall(func, args, nargs)\ jpayne@69: __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) jpayne@69: static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); jpayne@69: #endif jpayne@69: #define __Pyx_BUILD_ASSERT_EXPR(cond)\ jpayne@69: (sizeof(char [1 - 2*!(cond)]) - 1) jpayne@69: #ifndef Py_MEMBER_SIZE jpayne@69: #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) jpayne@69: #endif jpayne@69: #if !CYTHON_VECTORCALL jpayne@69: #if PY_VERSION_HEX >= 0x03080000 jpayne@69: #include "frameobject.h" jpayne@69: #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #ifndef Py_BUILD_CORE jpayne@69: #define Py_BUILD_CORE 1 jpayne@69: #endif jpayne@69: #include "internal/pycore_frame.h" jpayne@69: #endif jpayne@69: #define __Pxy_PyFrame_Initialize_Offsets() jpayne@69: #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) jpayne@69: #else jpayne@69: static size_t __pyx_pyframe_localsplus_offset = 0; jpayne@69: #include "frameobject.h" jpayne@69: #define __Pxy_PyFrame_Initialize_Offsets()\ jpayne@69: ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ jpayne@69: (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) jpayne@69: #define __Pyx_PyFrame_GetLocalsplus(frame)\ jpayne@69: (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) jpayne@69: #endif jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectCall.proto */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); jpayne@69: #else jpayne@69: #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectCallMethO.proto */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectFastCall.proto */ jpayne@69: #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); jpayne@69: jpayne@69: /* GetItemInt.proto */ jpayne@69: #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ jpayne@69: (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ jpayne@69: __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ jpayne@69: (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ jpayne@69: __Pyx_GetItemInt_Generic(o, to_py_func(i)))) jpayne@69: #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ jpayne@69: (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ jpayne@69: __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ jpayne@69: (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, jpayne@69: int wraparound, int boundscheck); jpayne@69: #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ jpayne@69: (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ jpayne@69: __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ jpayne@69: (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, jpayne@69: int wraparound, int boundscheck); jpayne@69: static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, jpayne@69: int is_list, int wraparound, int boundscheck); jpayne@69: jpayne@69: /* PyObjectCallOneArg.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); jpayne@69: jpayne@69: /* PyIntBinop.proto */ jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); jpayne@69: #else jpayne@69: #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ jpayne@69: (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) jpayne@69: #endif jpayne@69: jpayne@69: /* GetTopmostException.proto */ jpayne@69: #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE jpayne@69: static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); jpayne@69: #endif jpayne@69: jpayne@69: /* SaveResetException.proto */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) jpayne@69: static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); jpayne@69: #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) jpayne@69: static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); jpayne@69: #else jpayne@69: #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) jpayne@69: #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) jpayne@69: #endif jpayne@69: jpayne@69: /* GetException.proto */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) jpayne@69: static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); jpayne@69: #else jpayne@69: static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); jpayne@69: #endif jpayne@69: jpayne@69: /* RaiseException.proto */ jpayne@69: static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); jpayne@69: jpayne@69: /* ListAppend.proto */ jpayne@69: #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS jpayne@69: static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { jpayne@69: PyListObject* L = (PyListObject*) list; jpayne@69: Py_ssize_t len = Py_SIZE(list); jpayne@69: if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { jpayne@69: Py_INCREF(x); jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 jpayne@69: L->ob_item[len] = x; jpayne@69: #else jpayne@69: PyList_SET_ITEM(list, len, x); jpayne@69: #endif jpayne@69: __Pyx_SET_SIZE(list, len + 1); jpayne@69: return 0; jpayne@69: } jpayne@69: return PyList_Append(list, x); jpayne@69: } jpayne@69: #else jpayne@69: #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) jpayne@69: #endif jpayne@69: jpayne@69: /* pybytes_as_double.proto */ jpayne@69: static double __Pyx_SlowPyString_AsDouble(PyObject *obj); jpayne@69: static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length); jpayne@69: static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) { jpayne@69: char* as_c_string; jpayne@69: Py_ssize_t size; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: as_c_string = PyBytes_AS_STRING(obj); jpayne@69: size = PyBytes_GET_SIZE(obj); jpayne@69: #else jpayne@69: if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) { jpayne@69: return (double)-1; jpayne@69: } jpayne@69: #endif jpayne@69: return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); jpayne@69: } jpayne@69: static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) { jpayne@69: char* as_c_string; jpayne@69: Py_ssize_t size; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: as_c_string = PyByteArray_AS_STRING(obj); jpayne@69: size = PyByteArray_GET_SIZE(obj); jpayne@69: #else jpayne@69: as_c_string = PyByteArray_AsString(obj); jpayne@69: if (as_c_string == NULL) { jpayne@69: return (double)-1; jpayne@69: } jpayne@69: size = PyByteArray_Size(obj); jpayne@69: #endif jpayne@69: return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); jpayne@69: } jpayne@69: jpayne@69: /* pyunicode_as_double.proto */ jpayne@69: #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS jpayne@69: static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) { jpayne@69: int last_was_punctuation; jpayne@69: Py_ssize_t i; jpayne@69: last_was_punctuation = 1; jpayne@69: for (i=start; i <= end; i++) { jpayne@69: Py_UCS4 chr = PyUnicode_READ(kind, data, i); jpayne@69: int is_punctuation = (chr == '_') | (chr == '.'); jpayne@69: *buffer = (char)chr; jpayne@69: buffer += (chr != '_'); jpayne@69: if (unlikely(chr > 127)) goto parse_failure; jpayne@69: if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure; jpayne@69: last_was_punctuation = is_punctuation; jpayne@69: } jpayne@69: if (unlikely(last_was_punctuation)) goto parse_failure; jpayne@69: *buffer = '\0'; jpayne@69: return buffer; jpayne@69: parse_failure: jpayne@69: return NULL; jpayne@69: } jpayne@69: static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) { jpayne@69: int matches = 1; jpayne@69: Py_UCS4 chr; jpayne@69: Py_UCS4 sign = PyUnicode_READ(kind, data, start); jpayne@69: int is_signed = (sign == '-') | (sign == '+'); jpayne@69: start += is_signed; jpayne@69: length -= is_signed; jpayne@69: switch (PyUnicode_READ(kind, data, start)) { jpayne@69: #ifdef Py_NAN jpayne@69: case 'n': jpayne@69: case 'N': jpayne@69: if (unlikely(length != 3)) goto parse_failure; jpayne@69: chr = PyUnicode_READ(kind, data, start+1); jpayne@69: matches &= (chr == 'a') | (chr == 'A'); jpayne@69: chr = PyUnicode_READ(kind, data, start+2); jpayne@69: matches &= (chr == 'n') | (chr == 'N'); jpayne@69: if (unlikely(!matches)) goto parse_failure; jpayne@69: return (sign == '-') ? -Py_NAN : Py_NAN; jpayne@69: #endif jpayne@69: case 'i': jpayne@69: case 'I': jpayne@69: if (unlikely(length < 3)) goto parse_failure; jpayne@69: chr = PyUnicode_READ(kind, data, start+1); jpayne@69: matches &= (chr == 'n') | (chr == 'N'); jpayne@69: chr = PyUnicode_READ(kind, data, start+2); jpayne@69: matches &= (chr == 'f') | (chr == 'F'); jpayne@69: if (likely(length == 3 && matches)) jpayne@69: return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; jpayne@69: if (unlikely(length != 8)) goto parse_failure; jpayne@69: chr = PyUnicode_READ(kind, data, start+3); jpayne@69: matches &= (chr == 'i') | (chr == 'I'); jpayne@69: chr = PyUnicode_READ(kind, data, start+4); jpayne@69: matches &= (chr == 'n') | (chr == 'N'); jpayne@69: chr = PyUnicode_READ(kind, data, start+5); jpayne@69: matches &= (chr == 'i') | (chr == 'I'); jpayne@69: chr = PyUnicode_READ(kind, data, start+6); jpayne@69: matches &= (chr == 't') | (chr == 'T'); jpayne@69: chr = PyUnicode_READ(kind, data, start+7); jpayne@69: matches &= (chr == 'y') | (chr == 'Y'); jpayne@69: if (unlikely(!matches)) goto parse_failure; jpayne@69: return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; jpayne@69: case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': jpayne@69: break; jpayne@69: default: jpayne@69: goto parse_failure; jpayne@69: } jpayne@69: return 0.0; jpayne@69: parse_failure: jpayne@69: return -1.0; jpayne@69: } jpayne@69: static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) { jpayne@69: double value; jpayne@69: const char *last; jpayne@69: char *end; jpayne@69: Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj); jpayne@69: const int kind = PyUnicode_KIND(obj); jpayne@69: const void* data = PyUnicode_DATA(obj); jpayne@69: start = 0; jpayne@69: while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start))) jpayne@69: start++; jpayne@69: while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1))) jpayne@69: length--; jpayne@69: length -= start; jpayne@69: if (unlikely(length <= 0)) goto fallback; jpayne@69: value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length); jpayne@69: if (unlikely(value == -1.0)) goto fallback; jpayne@69: if (value != 0.0) return value; jpayne@69: if (length < 40) { jpayne@69: char number[40]; jpayne@69: last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); jpayne@69: if (unlikely(!last)) goto fallback; jpayne@69: value = PyOS_string_to_double(number, &end, NULL); jpayne@69: } else { jpayne@69: char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char)); jpayne@69: if (unlikely(!number)) goto fallback; jpayne@69: last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); jpayne@69: if (unlikely(!last)) { jpayne@69: PyMem_Free(number); jpayne@69: goto fallback; jpayne@69: } jpayne@69: value = PyOS_string_to_double(number, &end, NULL); jpayne@69: PyMem_Free(number); jpayne@69: } jpayne@69: if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { jpayne@69: return value; jpayne@69: } jpayne@69: fallback: jpayne@69: return __Pyx_SlowPyString_AsDouble(obj); jpayne@69: } jpayne@69: #endif jpayne@69: static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) { jpayne@69: #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely(__Pyx_PyUnicode_READY(obj) == -1)) jpayne@69: return (double)-1; jpayne@69: if (likely(PyUnicode_IS_ASCII(obj))) { jpayne@69: const char *s; jpayne@69: Py_ssize_t length; jpayne@69: s = PyUnicode_AsUTF8AndSize(obj, &length); jpayne@69: return __Pyx__PyBytes_AsDouble(obj, s, length); jpayne@69: } jpayne@69: return __Pyx_PyUnicode_AsDouble_WithSpaces(obj); jpayne@69: #else jpayne@69: return __Pyx_SlowPyString_AsDouble(obj); jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* pynumber_float.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj); jpayne@69: #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x)) jpayne@69: jpayne@69: /* PyObject_Unicode.proto */ jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #define __Pyx_PyObject_Unicode(obj)\ jpayne@69: (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) jpayne@69: #else jpayne@69: #define __Pyx_PyObject_Unicode(obj)\ jpayne@69: (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj)) jpayne@69: #endif jpayne@69: jpayne@69: /* RaiseUnboundLocalError.proto */ jpayne@69: static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); jpayne@69: jpayne@69: /* ObjectGetItem.proto */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); jpayne@69: #else jpayne@69: #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) jpayne@69: #endif jpayne@69: jpayne@69: /* GCCDiagnostics.proto */ jpayne@69: #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) jpayne@69: #define __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #endif jpayne@69: jpayne@69: /* BuildPyUnicode.proto */ jpayne@69: static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, jpayne@69: int prepend_sign, char padding_char); jpayne@69: jpayne@69: /* CIntToPyUnicode.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char); jpayne@69: jpayne@69: /* PyObjectFormatAndDecref.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); jpayne@69: jpayne@69: /* JoinPyUnicode.proto */ jpayne@69: static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, jpayne@69: Py_UCS4 max_char); jpayne@69: jpayne@69: /* PyIntCompare.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); jpayne@69: jpayne@69: /* PyIntCompare.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); jpayne@69: jpayne@69: /* DictGetItem.proto */ jpayne@69: #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); jpayne@69: #define __Pyx_PyObject_Dict_GetItem(obj, name)\ jpayne@69: (likely(PyDict_CheckExact(obj)) ?\ jpayne@69: __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) jpayne@69: #else jpayne@69: #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) jpayne@69: #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) jpayne@69: #endif jpayne@69: jpayne@69: /* SliceObject.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( jpayne@69: PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, jpayne@69: PyObject** py_start, PyObject** py_stop, PyObject** py_slice, jpayne@69: int has_cstart, int has_cstop, int wraparound); jpayne@69: jpayne@69: /* KeywordStringCheck.proto */ jpayne@69: static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); jpayne@69: jpayne@69: /* GetAttr3.proto */ jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); jpayne@69: jpayne@69: /* RaiseUnexpectedTypeError.proto */ jpayne@69: static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); jpayne@69: jpayne@69: /* IterFinish.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_IterFinish(void); jpayne@69: jpayne@69: /* PyObjectCallNoArg.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); jpayne@69: jpayne@69: /* PyObjectGetMethod.proto */ jpayne@69: static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); jpayne@69: jpayne@69: /* PyObjectCallMethod0.proto */ jpayne@69: static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); jpayne@69: jpayne@69: /* RaiseNeedMoreValuesToUnpack.proto */ jpayne@69: static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); jpayne@69: jpayne@69: /* RaiseTooManyValuesToUnpack.proto */ jpayne@69: static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); jpayne@69: jpayne@69: /* UnpackItemEndCheck.proto */ jpayne@69: static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); jpayne@69: jpayne@69: /* RaiseNoneIterError.proto */ jpayne@69: static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); jpayne@69: jpayne@69: /* UnpackTupleError.proto */ jpayne@69: static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); jpayne@69: jpayne@69: /* UnpackTuple2.proto */ jpayne@69: #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ jpayne@69: (likely(is_tuple || PyTuple_Check(tuple)) ?\ jpayne@69: (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ jpayne@69: __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ jpayne@69: (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ jpayne@69: __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) jpayne@69: static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( jpayne@69: PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); jpayne@69: static int __Pyx_unpack_tuple2_generic( jpayne@69: PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); jpayne@69: jpayne@69: /* dict_iter.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, jpayne@69: Py_ssize_t* p_orig_length, int* p_is_dict); jpayne@69: static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, jpayne@69: PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); jpayne@69: jpayne@69: /* PyObjectSetAttrStr.proto */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) jpayne@69: static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); jpayne@69: #else jpayne@69: #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) jpayne@69: #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) jpayne@69: #endif jpayne@69: jpayne@69: /* PySequenceContains.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { jpayne@69: int result = PySequence_Contains(seq, item); jpayne@69: return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); jpayne@69: } jpayne@69: jpayne@69: /* unicode_tailmatch.proto */ jpayne@69: static int __Pyx_PyUnicode_Tailmatch( jpayne@69: PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction); jpayne@69: jpayne@69: /* PyUnicode_Substring.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( jpayne@69: PyObject* text, Py_ssize_t start, Py_ssize_t stop); jpayne@69: jpayne@69: /* PyIntBinop.proto */ jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); jpayne@69: #else jpayne@69: #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ jpayne@69: (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) jpayne@69: #endif jpayne@69: jpayne@69: /* PyDictContains.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { jpayne@69: int result = PyDict_Contains(dict, item); jpayne@69: return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); jpayne@69: } jpayne@69: jpayne@69: /* ListCompAppend.proto */ jpayne@69: #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS jpayne@69: static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { jpayne@69: PyListObject* L = (PyListObject*) list; jpayne@69: Py_ssize_t len = Py_SIZE(list); jpayne@69: if (likely(L->allocated > len)) { jpayne@69: Py_INCREF(x); jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 jpayne@69: L->ob_item[len] = x; jpayne@69: #else jpayne@69: PyList_SET_ITEM(list, len, x); jpayne@69: #endif jpayne@69: __Pyx_SET_SIZE(list, len + 1); jpayne@69: return 0; jpayne@69: } jpayne@69: return PyList_Append(list, x); jpayne@69: } jpayne@69: #else jpayne@69: #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) jpayne@69: #endif jpayne@69: jpayne@69: /* UnicodeConcatInPlace.proto */ jpayne@69: # if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 jpayne@69: #if CYTHON_REFNANNY jpayne@69: #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny) jpayne@69: #else jpayne@69: #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right) jpayne@69: #endif jpayne@69: static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right jpayne@69: #if CYTHON_REFNANNY jpayne@69: , void* __pyx_refnanny jpayne@69: #endif jpayne@69: ); jpayne@69: #else jpayne@69: #define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat jpayne@69: #endif jpayne@69: #define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ jpayne@69: PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right)) jpayne@69: jpayne@69: /* DivInt[Py_ssize_t].proto */ jpayne@69: static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); jpayne@69: jpayne@69: /* SliceTupleAndList.proto */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); jpayne@69: #else jpayne@69: #define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) jpayne@69: #define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) jpayne@69: #endif jpayne@69: jpayne@69: /* AssertionsEnabled.proto */ jpayne@69: #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) jpayne@69: #define __Pyx_init_assertions_enabled() (0) jpayne@69: #define __pyx_assertions_enabled() (1) jpayne@69: #elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000) jpayne@69: static int __pyx_assertions_enabled_flag; jpayne@69: #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) jpayne@69: static int __Pyx_init_assertions_enabled(void) { jpayne@69: PyObject *builtins, *debug, *debug_str; jpayne@69: int flag; jpayne@69: builtins = PyEval_GetBuiltins(); jpayne@69: if (!builtins) goto bad; jpayne@69: debug_str = PyUnicode_FromStringAndSize("__debug__", 9); jpayne@69: if (!debug_str) goto bad; jpayne@69: debug = PyObject_GetItem(builtins, debug_str); jpayne@69: Py_DECREF(debug_str); jpayne@69: if (!debug) goto bad; jpayne@69: flag = PyObject_IsTrue(debug); jpayne@69: Py_DECREF(debug); jpayne@69: if (flag == -1) goto bad; jpayne@69: __pyx_assertions_enabled_flag = flag; jpayne@69: return 0; jpayne@69: bad: jpayne@69: __pyx_assertions_enabled_flag = 1; jpayne@69: return -1; jpayne@69: } jpayne@69: #else jpayne@69: #define __Pyx_init_assertions_enabled() (0) jpayne@69: #define __pyx_assertions_enabled() (!Py_OptimizeFlag) jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectCall2Args.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); jpayne@69: jpayne@69: /* PyObjectCallMethod1.proto */ jpayne@69: static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); jpayne@69: jpayne@69: /* append.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); jpayne@69: jpayne@69: /* PyIntBinop.proto */ jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); jpayne@69: #else jpayne@69: #define __Pyx_PyInt_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\ jpayne@69: (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2)) jpayne@69: #endif jpayne@69: jpayne@69: /* PyIntBinop.proto */ jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); jpayne@69: #else jpayne@69: #define __Pyx_PyInt_RemainderObjC(op1, op2, intval, inplace, zerodivision_check)\ jpayne@69: (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2)) jpayne@69: #endif jpayne@69: jpayne@69: /* SetItemInt.proto */ jpayne@69: #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ jpayne@69: (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ jpayne@69: __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ jpayne@69: (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ jpayne@69: __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) jpayne@69: static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); jpayne@69: static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, jpayne@69: int is_list, int wraparound, int boundscheck); jpayne@69: jpayne@69: /* PyUnicodeContains.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) { jpayne@69: int result = PyUnicode_Contains(text, substring); jpayne@69: return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); jpayne@69: } jpayne@69: jpayne@69: /* pyobject_as_double.proto */ jpayne@69: static double __Pyx__PyObject_AsDouble(PyObject* obj); jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: #define __Pyx_PyObject_AsDouble(obj)\ jpayne@69: (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\ jpayne@69: likely(PyInt_CheckExact(obj)) ?\ jpayne@69: PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) jpayne@69: #else jpayne@69: #define __Pyx_PyObject_AsDouble(obj)\ jpayne@69: ((likely(PyFloat_CheckExact(obj))) ? PyFloat_AS_DOUBLE(obj) :\ jpayne@69: likely(PyLong_CheckExact(obj)) ?\ jpayne@69: PyLong_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) jpayne@69: #endif jpayne@69: jpayne@69: /* PySequenceMultiply.proto */ jpayne@69: #define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul) jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul); jpayne@69: jpayne@69: /* pep479.proto */ jpayne@69: static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); jpayne@69: jpayne@69: /* Import.proto */ jpayne@69: static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); jpayne@69: jpayne@69: /* ImportFrom.proto */ jpayne@69: static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); jpayne@69: jpayne@69: /* GetAttr.proto */ jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); jpayne@69: jpayne@69: /* HasAttr.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); jpayne@69: jpayne@69: /* CallNextTpDealloc.proto */ jpayne@69: static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); jpayne@69: jpayne@69: /* CallNextTpTraverse.proto */ jpayne@69: static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); jpayne@69: jpayne@69: /* CallNextTpClear.proto */ jpayne@69: static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear); jpayne@69: jpayne@69: /* TypeImport.proto */ jpayne@69: #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11 jpayne@69: #define __PYX_HAVE_RT_ImportType_proto_3_0_11 jpayne@69: #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L jpayne@69: #include jpayne@69: #endif jpayne@69: #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L jpayne@69: #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s) jpayne@69: #else jpayne@69: #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*) jpayne@69: #endif jpayne@69: enum __Pyx_ImportType_CheckSize_3_0_11 { jpayne@69: __Pyx_ImportType_CheckSize_Error_3_0_11 = 0, jpayne@69: __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1, jpayne@69: __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2 jpayne@69: }; jpayne@69: 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); jpayne@69: #endif jpayne@69: jpayne@69: /* GetVTable.proto */ jpayne@69: static void* __Pyx_GetVtable(PyTypeObject *type); jpayne@69: jpayne@69: /* IncludeStructmemberH.proto */ jpayne@69: #include jpayne@69: jpayne@69: /* FixUpExtensionType.proto */ jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); jpayne@69: #endif jpayne@69: jpayne@69: /* ValidateBasesTuple.proto */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS jpayne@69: static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); jpayne@69: #endif jpayne@69: jpayne@69: /* PyType_Ready.proto */ jpayne@69: CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); jpayne@69: jpayne@69: /* PyObject_GenericGetAttrNoDict.proto */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); jpayne@69: #else jpayne@69: #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr jpayne@69: #endif jpayne@69: jpayne@69: /* PyObject_GenericGetAttr.proto */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 jpayne@69: static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); jpayne@69: #else jpayne@69: #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr jpayne@69: #endif jpayne@69: jpayne@69: /* SetVTable.proto */ jpayne@69: static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); jpayne@69: jpayne@69: /* MergeVTables.proto */ jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static int __Pyx_MergeVtables(PyTypeObject *type); jpayne@69: #endif jpayne@69: jpayne@69: /* SetupReduce.proto */ jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static int __Pyx_setup_reduce(PyObject* type_obj); jpayne@69: #endif jpayne@69: jpayne@69: /* ImportDottedModule.proto */ jpayne@69: static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); jpayne@69: #endif jpayne@69: jpayne@69: /* FetchSharedCythonModule.proto */ jpayne@69: static PyObject *__Pyx_FetchSharedCythonABIModule(void); jpayne@69: jpayne@69: /* FetchCommonType.proto */ jpayne@69: #if !CYTHON_USE_TYPE_SPECS jpayne@69: static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); jpayne@69: #else jpayne@69: static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); jpayne@69: #endif jpayne@69: jpayne@69: /* PyMethodNew.proto */ jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { jpayne@69: PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; jpayne@69: CYTHON_UNUSED_VAR(typ); jpayne@69: if (!self) jpayne@69: return __Pyx_NewRef(func); jpayne@69: typesModule = PyImport_ImportModule("types"); jpayne@69: if (!typesModule) return NULL; jpayne@69: methodType = PyObject_GetAttrString(typesModule, "MethodType"); jpayne@69: Py_DECREF(typesModule); jpayne@69: if (!methodType) return NULL; jpayne@69: result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); jpayne@69: Py_DECREF(methodType); jpayne@69: return result; jpayne@69: } jpayne@69: #elif PY_MAJOR_VERSION >= 3 jpayne@69: static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { jpayne@69: CYTHON_UNUSED_VAR(typ); jpayne@69: if (!self) jpayne@69: return __Pyx_NewRef(func); jpayne@69: return PyMethod_New(func, self); jpayne@69: } jpayne@69: #else jpayne@69: #define __Pyx_PyMethod_New PyMethod_New jpayne@69: #endif jpayne@69: jpayne@69: /* PyVectorcallFastCallDict.proto */ jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); jpayne@69: #endif jpayne@69: jpayne@69: /* CythonFunctionShared.proto */ jpayne@69: #define __Pyx_CyFunction_USED jpayne@69: #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 jpayne@69: #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 jpayne@69: #define __Pyx_CYFUNCTION_CCLASS 0x04 jpayne@69: #define __Pyx_CYFUNCTION_COROUTINE 0x08 jpayne@69: #define __Pyx_CyFunction_GetClosure(f)\ jpayne@69: (((__pyx_CyFunctionObject *) (f))->func_closure) jpayne@69: #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #define __Pyx_CyFunction_GetClassObj(f)\ jpayne@69: (((__pyx_CyFunctionObject *) (f))->func_classobj) jpayne@69: #else jpayne@69: #define __Pyx_CyFunction_GetClassObj(f)\ jpayne@69: ((PyObject*) ((PyCMethodObject *) (f))->mm_class) jpayne@69: #endif jpayne@69: #define __Pyx_CyFunction_SetClassObj(f, classobj)\ jpayne@69: __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) jpayne@69: #define __Pyx_CyFunction_Defaults(type, f)\ jpayne@69: ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) jpayne@69: #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ jpayne@69: ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) jpayne@69: typedef struct { jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: PyObject_HEAD jpayne@69: PyObject *func; jpayne@69: #elif PY_VERSION_HEX < 0x030900B1 jpayne@69: PyCFunctionObject func; jpayne@69: #else jpayne@69: PyCMethodObject func; jpayne@69: #endif jpayne@69: #if CYTHON_BACKPORT_VECTORCALL jpayne@69: __pyx_vectorcallfunc func_vectorcall; jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: PyObject *func_weakreflist; jpayne@69: #endif jpayne@69: PyObject *func_dict; jpayne@69: PyObject *func_name; jpayne@69: PyObject *func_qualname; jpayne@69: PyObject *func_doc; jpayne@69: PyObject *func_globals; jpayne@69: PyObject *func_code; jpayne@69: PyObject *func_closure; jpayne@69: #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: PyObject *func_classobj; jpayne@69: #endif jpayne@69: void *defaults; jpayne@69: int defaults_pyobjects; jpayne@69: size_t defaults_size; jpayne@69: int flags; jpayne@69: PyObject *defaults_tuple; jpayne@69: PyObject *defaults_kwdict; jpayne@69: PyObject *(*defaults_getter)(PyObject *); jpayne@69: PyObject *func_annotations; jpayne@69: PyObject *func_is_coroutine; jpayne@69: } __pyx_CyFunctionObject; jpayne@69: #undef __Pyx_CyOrPyCFunction_Check jpayne@69: #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) jpayne@69: #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) jpayne@69: #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) jpayne@69: static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); jpayne@69: #undef __Pyx_IsSameCFunction jpayne@69: #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) jpayne@69: static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, jpayne@69: int flags, PyObject* qualname, jpayne@69: PyObject *closure, jpayne@69: PyObject *module, PyObject *globals, jpayne@69: PyObject* code); jpayne@69: static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); jpayne@69: static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, jpayne@69: size_t size, jpayne@69: int pyobjects); jpayne@69: static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, jpayne@69: PyObject *tuple); jpayne@69: static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, jpayne@69: PyObject *dict); jpayne@69: static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, jpayne@69: PyObject *dict); jpayne@69: static int __pyx_CyFunction_init(PyObject *module); jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); jpayne@69: static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); jpayne@69: static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); jpayne@69: static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); jpayne@69: #if CYTHON_BACKPORT_VECTORCALL jpayne@69: #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) jpayne@69: #else jpayne@69: #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: /* CythonFunction.proto */ jpayne@69: static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, jpayne@69: int flags, PyObject* qualname, jpayne@69: PyObject *closure, jpayne@69: PyObject *module, PyObject *globals, jpayne@69: PyObject* code); jpayne@69: jpayne@69: /* Py3UpdateBases.proto */ jpayne@69: static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); jpayne@69: jpayne@69: /* CalculateMetaclass.proto */ jpayne@69: static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); jpayne@69: jpayne@69: /* SetNameInClass.proto */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 jpayne@69: #define __Pyx_SetNameInClass(ns, name, value)\ jpayne@69: (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) jpayne@69: #elif CYTHON_COMPILING_IN_CPYTHON jpayne@69: #define __Pyx_SetNameInClass(ns, name, value)\ jpayne@69: (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) jpayne@69: #else jpayne@69: #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectLookupSpecial.proto */ jpayne@69: #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS jpayne@69: #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) jpayne@69: #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) jpayne@69: static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); jpayne@69: #else jpayne@69: #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) jpayne@69: #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) jpayne@69: #endif jpayne@69: jpayne@69: /* Py3ClassCreate.proto */ jpayne@69: static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, jpayne@69: PyObject *mkw, PyObject *modname, PyObject *doc); jpayne@69: static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, jpayne@69: PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); jpayne@69: jpayne@69: /* CLineInTraceback.proto */ jpayne@69: #ifdef CYTHON_CLINE_IN_TRACEBACK jpayne@69: #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) jpayne@69: #else jpayne@69: static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); jpayne@69: #endif jpayne@69: jpayne@69: /* CodeObjectCache.proto */ jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: typedef struct { jpayne@69: PyCodeObject* code_object; jpayne@69: int code_line; jpayne@69: } __Pyx_CodeObjectCacheEntry; jpayne@69: struct __Pyx_CodeObjectCache { jpayne@69: int count; jpayne@69: int max_count; jpayne@69: __Pyx_CodeObjectCacheEntry* entries; jpayne@69: }; jpayne@69: static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; jpayne@69: static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); jpayne@69: static PyCodeObject *__pyx_find_code_object(int code_line); jpayne@69: static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); jpayne@69: #endif jpayne@69: jpayne@69: /* AddTraceback.proto */ jpayne@69: static void __Pyx_AddTraceback(const char *funcname, int c_line, jpayne@69: int py_line, const char *filename); jpayne@69: jpayne@69: /* ArrayAPI.proto */ jpayne@69: #ifndef _ARRAYARRAY_H jpayne@69: #define _ARRAYARRAY_H jpayne@69: typedef struct arraydescr { jpayne@69: int typecode; jpayne@69: int itemsize; jpayne@69: PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); jpayne@69: int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: char *formats; jpayne@69: #endif jpayne@69: } arraydescr; jpayne@69: struct arrayobject { jpayne@69: PyObject_HEAD jpayne@69: Py_ssize_t ob_size; jpayne@69: union { jpayne@69: char *ob_item; jpayne@69: float *as_floats; jpayne@69: double *as_doubles; jpayne@69: int *as_ints; jpayne@69: unsigned int *as_uints; jpayne@69: unsigned char *as_uchars; jpayne@69: signed char *as_schars; jpayne@69: char *as_chars; jpayne@69: unsigned long *as_ulongs; jpayne@69: long *as_longs; jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: unsigned long long *as_ulonglongs; jpayne@69: long long *as_longlongs; jpayne@69: #endif jpayne@69: short *as_shorts; jpayne@69: unsigned short *as_ushorts; jpayne@69: Py_UNICODE *as_pyunicodes; jpayne@69: void *as_voidptr; jpayne@69: } data; jpayne@69: Py_ssize_t allocated; jpayne@69: struct arraydescr *ob_descr; jpayne@69: PyObject *weakreflist; jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: int ob_exports; jpayne@69: #endif jpayne@69: }; jpayne@69: #ifndef NO_NEWARRAY_INLINE jpayne@69: static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, jpayne@69: struct arraydescr *descr) { jpayne@69: arrayobject *op; jpayne@69: size_t nbytes; jpayne@69: if (size < 0) { jpayne@69: PyErr_BadInternalCall(); jpayne@69: return NULL; jpayne@69: } jpayne@69: nbytes = size * descr->itemsize; jpayne@69: if (nbytes / descr->itemsize != (size_t)size) { jpayne@69: return PyErr_NoMemory(); jpayne@69: } jpayne@69: op = (arrayobject *) type->tp_alloc(type, 0); jpayne@69: if (op == NULL) { jpayne@69: return NULL; jpayne@69: } jpayne@69: op->ob_descr = descr; jpayne@69: op->allocated = size; jpayne@69: op->weakreflist = NULL; jpayne@69: __Pyx_SET_SIZE(op, size); jpayne@69: if (size <= 0) { jpayne@69: op->data.ob_item = NULL; jpayne@69: } jpayne@69: else { jpayne@69: op->data.ob_item = PyMem_NEW(char, nbytes); jpayne@69: if (op->data.ob_item == NULL) { jpayne@69: Py_DECREF(op); jpayne@69: return PyErr_NoMemory(); jpayne@69: } jpayne@69: } jpayne@69: return (PyObject *) op; jpayne@69: } jpayne@69: #else jpayne@69: PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, jpayne@69: struct arraydescr *descr); jpayne@69: #endif jpayne@69: static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) { jpayne@69: void *items = (void*) self->data.ob_item; jpayne@69: PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize)); jpayne@69: if (items == NULL) { jpayne@69: PyErr_NoMemory(); jpayne@69: return -1; jpayne@69: } jpayne@69: self->data.ob_item = (char*) items; jpayne@69: __Pyx_SET_SIZE(self, n); jpayne@69: self->allocated = n; jpayne@69: return 0; jpayne@69: } jpayne@69: static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) { jpayne@69: void *items = (void*) self->data.ob_item; jpayne@69: Py_ssize_t newsize; jpayne@69: if (n < self->allocated && n*4 > self->allocated) { jpayne@69: __Pyx_SET_SIZE(self, n); jpayne@69: return 0; jpayne@69: } jpayne@69: newsize = n + (n / 2) + 1; jpayne@69: if (newsize <= n) { jpayne@69: PyErr_NoMemory(); jpayne@69: return -1; jpayne@69: } jpayne@69: PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize)); jpayne@69: if (items == NULL) { jpayne@69: PyErr_NoMemory(); jpayne@69: return -1; jpayne@69: } jpayne@69: self->data.ob_item = (char*) items; jpayne@69: __Pyx_SET_SIZE(self, n); jpayne@69: self->allocated = newsize; jpayne@69: return 0; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* CIntFromPy.proto */ jpayne@69: static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); jpayne@69: jpayne@69: /* CIntToPy.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); jpayne@69: jpayne@69: /* CIntToPy.proto */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value); jpayne@69: jpayne@69: /* CIntFromPy.proto */ jpayne@69: static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); jpayne@69: jpayne@69: /* FormatTypeName.proto */ jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: typedef PyObject *__Pyx_TypeName; jpayne@69: #define __Pyx_FMT_TYPENAME "%U" jpayne@69: static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); jpayne@69: #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) jpayne@69: #else jpayne@69: typedef const char *__Pyx_TypeName; jpayne@69: #define __Pyx_FMT_TYPENAME "%.200s" jpayne@69: #define __Pyx_PyType_GetName(tp) ((tp)->tp_name) jpayne@69: #define __Pyx_DECREF_TypeName(obj) jpayne@69: #endif jpayne@69: jpayne@69: /* FastTypeChecks.proto */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) jpayne@69: #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) jpayne@69: static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); jpayne@69: static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); jpayne@69: static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); jpayne@69: static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); jpayne@69: #else jpayne@69: #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) jpayne@69: #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) jpayne@69: #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) jpayne@69: #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) jpayne@69: #endif jpayne@69: #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) jpayne@69: #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) jpayne@69: jpayne@69: /* SwapException.proto */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) jpayne@69: static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); jpayne@69: #else jpayne@69: static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); jpayne@69: #endif jpayne@69: jpayne@69: /* CoroutineBase.proto */ jpayne@69: struct __pyx_CoroutineObject; jpayne@69: typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); jpayne@69: #if CYTHON_USE_EXC_INFO_STACK jpayne@69: #define __Pyx_ExcInfoStruct _PyErr_StackItem jpayne@69: #else jpayne@69: typedef struct { jpayne@69: PyObject *exc_type; jpayne@69: PyObject *exc_value; jpayne@69: PyObject *exc_traceback; jpayne@69: } __Pyx_ExcInfoStruct; jpayne@69: #endif jpayne@69: typedef struct __pyx_CoroutineObject { jpayne@69: PyObject_HEAD jpayne@69: __pyx_coroutine_body_t body; jpayne@69: PyObject *closure; jpayne@69: __Pyx_ExcInfoStruct gi_exc_state; jpayne@69: PyObject *gi_weakreflist; jpayne@69: PyObject *classobj; jpayne@69: PyObject *yieldfrom; jpayne@69: PyObject *gi_name; jpayne@69: PyObject *gi_qualname; jpayne@69: PyObject *gi_modulename; jpayne@69: PyObject *gi_code; jpayne@69: PyObject *gi_frame; jpayne@69: int resume_label; jpayne@69: char is_running; jpayne@69: } __pyx_CoroutineObject; jpayne@69: static __pyx_CoroutineObject *__Pyx__Coroutine_New( jpayne@69: PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, jpayne@69: PyObject *name, PyObject *qualname, PyObject *module_name); jpayne@69: static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( jpayne@69: __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, jpayne@69: PyObject *name, PyObject *qualname, PyObject *module_name); jpayne@69: static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); jpayne@69: static int __Pyx_Coroutine_clear(PyObject *self); jpayne@69: static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); jpayne@69: static PyObject *__Pyx_Coroutine_Close(PyObject *self); jpayne@69: static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); jpayne@69: #if CYTHON_USE_EXC_INFO_STACK jpayne@69: #define __Pyx_Coroutine_SwapException(self) jpayne@69: #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) jpayne@69: #else jpayne@69: #define __Pyx_Coroutine_SwapException(self) {\ jpayne@69: __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ jpayne@69: __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ jpayne@69: } jpayne@69: #define __Pyx_Coroutine_ResetAndClearException(self) {\ jpayne@69: __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ jpayne@69: (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ jpayne@69: __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) jpayne@69: #else jpayne@69: #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ jpayne@69: __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) jpayne@69: #endif jpayne@69: static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); jpayne@69: static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); jpayne@69: jpayne@69: /* PatchModuleWithCoroutine.proto */ jpayne@69: static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); jpayne@69: jpayne@69: /* PatchGeneratorABC.proto */ jpayne@69: static int __Pyx_patch_abc(void); jpayne@69: jpayne@69: /* Generator.proto */ jpayne@69: #define __Pyx_Generator_USED jpayne@69: #define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_GeneratorType) jpayne@69: #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ jpayne@69: __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name) jpayne@69: static PyObject *__Pyx_Generator_Next(PyObject *self); jpayne@69: static int __pyx_Generator_init(PyObject *module); jpayne@69: jpayne@69: /* CheckBinaryVersion.proto */ jpayne@69: static unsigned long __Pyx_get_runtime_version(void); jpayne@69: static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); jpayne@69: jpayne@69: /* FunctionImport.proto */ jpayne@69: static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig); jpayne@69: jpayne@69: /* InitStrings.proto */ jpayne@69: static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); jpayne@69: jpayne@69: /* #### Code section: module_declarations ### */ jpayne@69: static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ jpayne@69: static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ jpayne@69: static PyObject *__pyx_f_5pysam_7libcvcf_9VCFRecord_update(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes); /* proto*/ jpayne@69: static PyObject *__pyx_f_5pysam_7libcvcf_11asVCFRecord_parse(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len); /* proto*/ jpayne@69: jpayne@69: /* Module declarations from "libc.string" */ jpayne@69: jpayne@69: /* Module declarations from "libc.stdlib" */ jpayne@69: jpayne@69: /* Module declarations from "libc.stdint" */ jpayne@69: jpayne@69: /* Module declarations from "libc.stdio" */ jpayne@69: jpayne@69: /* Module declarations from "posix.types" */ jpayne@69: jpayne@69: /* Module declarations from "pysam.libchtslib" */ jpayne@69: jpayne@69: /* Module declarations from "pysam.libctabix" */ jpayne@69: jpayne@69: /* Module declarations from "pysam.libctabixproxies" */ jpayne@69: jpayne@69: /* Module declarations from "cython" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.version" */ jpayne@69: jpayne@69: /* Module declarations from "__builtin__" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.type" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.object" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.ref" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.exc" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.module" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.mem" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.tuple" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.list" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.sequence" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.mapping" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.iterator" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.number" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.int" */ jpayne@69: jpayne@69: /* Module declarations from "__builtin__" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.bool" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.long" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.float" */ jpayne@69: jpayne@69: /* Module declarations from "__builtin__" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.complex" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.string" */ jpayne@69: jpayne@69: /* Module declarations from "libc.stddef" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.unicode" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.pyport" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.dict" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.instance" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.function" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.method" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.weakref" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.getargs" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.pythread" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.pystate" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.cobject" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.oldbuffer" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.set" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.buffer" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.bytes" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.pycapsule" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.contextvars" */ jpayne@69: jpayne@69: /* Module declarations from "cpython" */ jpayne@69: jpayne@69: /* Module declarations from "array" */ jpayne@69: jpayne@69: /* Module declarations from "cpython.array" */ jpayne@69: static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/ jpayne@69: jpayne@69: /* Module declarations from "pysam.libcutils" */ jpayne@69: static PyObject *(*__pyx_f_5pysam_9libcutils_force_str)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args); /*proto*/ jpayne@69: jpayne@69: /* Module declarations from "pysam.libcvcf" */ jpayne@69: static PyObject *__pyx_f_5pysam_7libcvcf___pyx_unpickle_asVCFRecord__set_state(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *, PyObject *); /*proto*/ jpayne@69: /* #### Code section: typeinfo ### */ jpayne@69: /* #### Code section: before_global_var ### */ jpayne@69: #define __Pyx_MODULE_NAME "pysam.libcvcf" jpayne@69: extern int __pyx_module_is_main_pysam__libcvcf; jpayne@69: int __pyx_module_is_main_pysam__libcvcf = 0; jpayne@69: jpayne@69: /* Implementation of "pysam.libcvcf" */ jpayne@69: /* #### Code section: global_var ### */ jpayne@69: static PyObject *__pyx_builtin_object; jpayne@69: static PyObject *__pyx_builtin_ValueError; jpayne@69: static PyObject *__pyx_builtin_range; jpayne@69: static PyObject *__pyx_builtin_TypeError; jpayne@69: static PyObject *__pyx_builtin_enumerate; jpayne@69: static PyObject *__pyx_builtin_map; jpayne@69: static PyObject *__pyx_builtin_AssertionError; jpayne@69: static PyObject *__pyx_builtin_min; jpayne@69: static PyObject *__pyx_builtin_zip; jpayne@69: static PyObject *__pyx_builtin_StopIteration; jpayne@69: static PyObject *__pyx_builtin_KeyError; jpayne@69: static PyObject *__pyx_builtin_NotImplementedError; jpayne@69: static PyObject *__pyx_builtin_MemoryError; jpayne@69: /* #### Code section: string_decls ### */ jpayne@69: static const char __pyx_k_[] = ""; jpayne@69: static const char __pyx_k_0[] = "0"; jpayne@69: static const char __pyx_k_A[] = "A"; jpayne@69: static const char __pyx_k_D[] = "D"; jpayne@69: static const char __pyx_k_G[] = "G"; jpayne@69: static const char __pyx_k_I[] = "I"; jpayne@69: static const char __pyx_k_N[] = "N"; jpayne@69: static const char __pyx_k_a[] = "a"; jpayne@69: static const char __pyx_k_c[] = "c"; jpayne@69: static const char __pyx_k_d[] = "d"; jpayne@69: static const char __pyx_k_f[] = "f"; jpayne@69: static const char __pyx_k_i[] = "i"; jpayne@69: static const char __pyx_k_k[] = "k"; jpayne@69: static const char __pyx_k_l[] = "l"; jpayne@69: static const char __pyx_k_n[] = "n"; jpayne@69: static const char __pyx_k_r[] = "r"; jpayne@69: static const char __pyx_k_s[] = "s"; jpayne@69: static const char __pyx_k_t[] = "t"; jpayne@69: static const char __pyx_k_v[] = "v"; jpayne@69: static const char __pyx_k_x[] = "x"; jpayne@69: static const char __pyx_k_y[] = "y"; jpayne@69: static const char __pyx_k_DP[] = "DP"; jpayne@69: static const char __pyx_k_EC[] = "EC"; jpayne@69: static const char __pyx_k_FT[] = "FT"; jpayne@69: static const char __pyx_k_GL[] = "GL"; jpayne@69: static const char __pyx_k_GP[] = "GP"; jpayne@69: static const char __pyx_k_GQ[] = "GQ"; jpayne@69: static const char __pyx_k_GT[] = "GT"; jpayne@69: static const char __pyx_k_HQ[] = "HQ"; jpayne@69: static const char __pyx_k_ID[] = "ID="; jpayne@69: static const char __pyx_k_MQ[] = "MQ"; jpayne@69: static const char __pyx_k_PL[] = "PL"; jpayne@69: static const char __pyx_k_PQ[] = "PQ"; jpayne@69: static const char __pyx_k_PS[] = "PS"; jpayne@69: static const char __pyx_k__2[] = ","; jpayne@69: static const char __pyx_k__3[] = ":"; jpayne@69: static const char __pyx_k__4[] = "-"; jpayne@69: static const char __pyx_k__5[] = "."; jpayne@69: static const char __pyx_k__6[] = ";"; jpayne@69: static const char __pyx_k__7[] = "="; jpayne@69: static const char __pyx_k__8[] = ")"; jpayne@69: static const char __pyx_k_fa[] = "fa"; jpayne@69: static const char __pyx_k_gc[] = "gc"; jpayne@69: static const char __pyx_k_id[] = "id="; jpayne@69: static const char __pyx_k_na[] = "na"; jpayne@69: static const char __pyx_k_re[] = "re"; jpayne@69: static const char __pyx_k_ALT[] = "ALT"; jpayne@69: static const char __pyx_k_GLE[] = "GLE"; jpayne@69: static const char __pyx_k_POS[] = "POS"; jpayne@69: static const char __pyx_k_REF[] = "REF"; jpayne@69: static const char __pyx_k_VCF[] = "VCF"; jpayne@69: static const char __pyx_k__10[] = ": '"; jpayne@69: static const char __pyx_k__11[] = "'\n"; jpayne@69: static const char __pyx_k__12[] = " "; jpayne@69: static const char __pyx_k__13[] = ": "; jpayne@69: static const char __pyx_k__14[] = "\n"; jpayne@69: static const char __pyx_k__15[] = "<"; jpayne@69: static const char __pyx_k__16[] = ">"; jpayne@69: static const char __pyx_k__19[] = "\""; jpayne@69: static const char __pyx_k__23[] = "##"; jpayne@69: static const char __pyx_k__24[] = "#"; jpayne@69: static const char __pyx_k__25[] = "\t"; jpayne@69: static const char __pyx_k__27[] = "|"; jpayne@69: static const char __pyx_k__33[] = "*"; jpayne@69: static const char __pyx_k__34[] = "[|/\\\\]"; jpayne@69: static const char __pyx_k_add[] = "add"; jpayne@69: static const char __pyx_k_all[] = "__all__"; jpayne@69: static const char __pyx_k_alt[] = "alt"; jpayne@69: static const char __pyx_k_del[] = "__del__"; jpayne@69: static const char __pyx_k_doc[] = "__doc__"; jpayne@69: static const char __pyx_k_end[] = "end"; jpayne@69: static const char __pyx_k_err[] = "err"; jpayne@69: static const char __pyx_k_fmt[] = "fmt"; jpayne@69: static const char __pyx_k_for[] = " for "; jpayne@69: static const char __pyx_k_get[] = "get"; jpayne@69: static const char __pyx_k_got[] = "), got "; jpayne@69: static const char __pyx_k_gts[] = "gts"; jpayne@69: static const char __pyx_k_idx[] = "idx"; jpayne@69: static const char __pyx_k_key[] = "key"; jpayne@69: static const char __pyx_k_map[] = "map"; jpayne@69: static const char __pyx_k_min[] = "min"; jpayne@69: static const char __pyx_k_new[] = "__new__"; jpayne@69: static const char __pyx_k_nmb[] = "nmb"; jpayne@69: static const char __pyx_k_opt[] = "opt"; jpayne@69: static const char __pyx_k_pos[] = "pos"; jpayne@69: static const char __pyx_k_ref[] = "ref"; jpayne@69: static const char __pyx_k_sys[] = "sys"; jpayne@69: static const char __pyx_k_var[] = "var"; jpayne@69: static const char __pyx_k_vcf[] = "vcf"; jpayne@69: static const char __pyx_k_zip[] = "zip"; jpayne@69: static const char __pyx_k_Flag[] = "Flag"; jpayne@69: static const char __pyx_k_ID_2[] = "ID"; jpayne@69: static const char __pyx_k_INFO[] = "INFO"; jpayne@69: static const char __pyx_k_PASS[] = "PASS"; jpayne@69: static const char __pyx_k_QUAL[] = "QUAL"; jpayne@69: static const char __pyx_k_Type[] = "Type="; jpayne@69: static const char __pyx_k__139[] = "?"; jpayne@69: static const char __pyx_k_addn[] = "addn"; jpayne@69: static const char __pyx_k_alt1[] = "alt1"; jpayne@69: static const char __pyx_k_alt2[] = "alt2"; jpayne@69: static const char __pyx_k_args[] = "args"; jpayne@69: static const char __pyx_k_cols[] = "cols"; jpayne@69: static const char __pyx_k_copy[] = "_copy"; jpayne@69: static const char __pyx_k_data[] = "data"; jpayne@69: static const char __pyx_k_dict[] = "__dict__"; jpayne@69: static const char __pyx_k_elts[] = "elts"; jpayne@69: static const char __pyx_k_find[] = "find"; jpayne@69: static const char __pyx_k_id_2[] = "id"; jpayne@69: static const char __pyx_k_info[] = "_info"; jpayne@69: static const char __pyx_k_init[] = "__init__"; jpayne@69: static const char __pyx_k_join[] = "join"; jpayne@69: static const char __pyx_k_keys[] = "keys"; jpayne@69: static const char __pyx_k_last[] = "last"; jpayne@69: static const char __pyx_k_left[] = "left"; jpayne@69: static const char __pyx_k_line[] = "line"; jpayne@69: static const char __pyx_k_main[] = "__main__"; jpayne@69: static const char __pyx_k_name[] = "__name__"; jpayne@69: static const char __pyx_k_pos1[] = "pos1"; jpayne@69: static const char __pyx_k_pos2[] = "pos2"; jpayne@69: static const char __pyx_k_qual[] = "qual"; jpayne@69: static const char __pyx_k_ref1[] = "ref1"; jpayne@69: static const char __pyx_k_ref2[] = "ref2"; jpayne@69: static const char __pyx_k_rest[] = "rest"; jpayne@69: static const char __pyx_k_self[] = "self"; jpayne@69: static const char __pyx_k_send[] = "send"; jpayne@69: static const char __pyx_k_spec[] = "__spec__"; jpayne@69: static const char __pyx_k_test[] = "__test__"; jpayne@69: static const char __pyx_k_type[] = "type"; jpayne@69: static const char __pyx_k_ACGTN[] = "ACGTN"; jpayne@69: static const char __pyx_k_CHROM[] = "CHROM"; jpayne@69: static const char __pyx_k_Error[] = "Error"; jpayne@69: static const char __pyx_k_Float[] = "Float"; jpayne@69: static const char __pyx_k_addns[] = "addns"; jpayne@69: static const char __pyx_k_ascii[] = "ascii"; jpayne@69: static const char __pyx_k_blurp[] = "blurp"; jpayne@69: static const char __pyx_k_chrom[] = "chrom"; jpayne@69: static const char __pyx_k_close[] = "close"; jpayne@69: static const char __pyx_k_descr[] = "descr"; jpayne@69: static const char __pyx_k_error[] = "error"; jpayne@69: static const char __pyx_k_faref[] = "faref"; jpayne@69: static const char __pyx_k_fetch[] = "fetch"; jpayne@69: static const char __pyx_k_first[] = "first"; jpayne@69: static const char __pyx_k_found[] = "(found "; jpayne@69: static const char __pyx_k_ielts[] = "ielts"; jpayne@69: static const char __pyx_k_label[] = "label"; jpayne@69: static const char __pyx_k_lines[] = "lines"; jpayne@69: static const char __pyx_k_match[] = "match"; jpayne@69: static const char __pyx_k_parse[] = "_parse"; jpayne@69: static const char __pyx_k_pysam[] = "pysam"; jpayne@69: static const char __pyx_k_range[] = "range"; jpayne@69: static const char __pyx_k_sdata[] = "sdata"; jpayne@69: static const char __pyx_k_split[] = "split"; jpayne@69: static const char __pyx_k_start[] = "start"; jpayne@69: static const char __pyx_k_state[] = "state"; jpayne@69: static const char __pyx_k_strip[] = "strip"; jpayne@69: static const char __pyx_k_super[] = "super"; jpayne@69: static const char __pyx_k_throw[] = "throw"; jpayne@69: static const char __pyx_k_upper[] = "upper"; jpayne@69: static const char __pyx_k_value[] = "value"; jpayne@69: static const char __pyx_k_write[] = "write"; jpayne@69: static const char __pyx_k_FILTER[] = "FILTER"; jpayne@69: static const char __pyx_k_FORMAT[] = "FORMAT"; jpayne@69: static const char __pyx_k_GTdata[] = "GTdata"; jpayne@69: static const char __pyx_k_Number[] = "Number="; jpayne@69: static const char __pyx_k_String[] = "String"; jpayne@69: static const char __pyx_k_Type_2[] = "Type"; jpayne@69: static const char __pyx_k_allele[] = "allele"; jpayne@69: static const char __pyx_k_append[] = "append"; jpayne@69: static const char __pyx_k_bisect[] = "bisect"; jpayne@69: static const char __pyx_k_copy_2[] = "copy"; jpayne@69: static const char __pyx_k_dict_2[] = "_dict"; jpayne@69: static const char __pyx_k_dict_3[] = "dict"; jpayne@69: static const char __pyx_k_enable[] = "enable"; jpayne@69: static const char __pyx_k_errors[] = "_errors"; jpayne@69: static const char __pyx_k_filter[] = "_filter"; jpayne@69: static const char __pyx_k_format[] = "format"; jpayne@69: static const char __pyx_k_header[] = "_header"; jpayne@69: static const char __pyx_k_import[] = "__import__"; jpayne@69: static const char __pyx_k_info_2[] = "info"; jpayne@69: static const char __pyx_k_line_2[] = "_line"; jpayne@69: static const char __pyx_k_lineno[] = "_lineno"; jpayne@69: static const char __pyx_k_module[] = "__module__"; jpayne@69: static const char __pyx_k_number[] = "number"; jpayne@69: static const char __pyx_k_object[] = "object"; jpayne@69: static const char __pyx_k_output[] = "(output)"; jpayne@69: static const char __pyx_k_parser[] = "parser"; jpayne@69: static const char __pyx_k_pickle[] = "pickle"; jpayne@69: static const char __pyx_k_record[] = "record"; jpayne@69: static const char __pyx_k_reduce[] = "__reduce__"; jpayne@69: static const char __pyx_k_region[] = "region"; jpayne@69: static const char __pyx_k_result[] = "result"; jpayne@69: static const char __pyx_k_sample[] = "sample"; jpayne@69: static const char __pyx_k_stream[] = "stream"; jpayne@69: static const char __pyx_k_string[] = "string"; jpayne@69: static const char __pyx_k_update[] = "update"; jpayne@69: static const char __pyx_k_values[] = "values"; jpayne@69: static const char __pyx_k_ACGTN_2[] = "^[ACGTN]+$"; jpayne@69: static const char __pyx_k_Integer[] = "Integer"; jpayne@69: static const char __pyx_k_VCFv3_3[] = "VCFv3.3"; jpayne@69: static const char __pyx_k_VCFv4_0[] = "VCFv4.0"; jpayne@69: static const char __pyx_k_VCFv4_1[] = "VCFv4.1"; jpayne@69: static const char __pyx_k_VCFv4_2[] = "VCFv4.2"; jpayne@69: static const char __pyx_k_Warning[] = "Warning"; jpayne@69: static const char __pyx_k_alleles[] = "#alleles"; jpayne@69: static const char __pyx_k_compile[] = "compile"; jpayne@69: static const char __pyx_k_connect[] = "connect"; jpayne@69: static const char __pyx_k_disable[] = "disable"; jpayne@69: static const char __pyx_k_errwarn[] = "errwarn"; jpayne@69: static const char __pyx_k_getinfo[] = "getinfo"; jpayne@69: static const char __pyx_k_in_line[] = " in line "; jpayne@69: static const char __pyx_k_lines_2[] = "_lines"; jpayne@69: static const char __pyx_k_longest[] = "longest"; jpayne@69: static const char __pyx_k_missing[] = "missing"; jpayne@69: static const char __pyx_k_movable[] = "movable"; jpayne@69: static const char __pyx_k_newalts[] = "newalts"; jpayne@69: static const char __pyx_k_parse_2[] = "parse"; jpayne@69: static const char __pyx_k_prepare[] = "__prepare__"; jpayne@69: static const char __pyx_k_regions[] = "regions"; jpayne@69: static const char __pyx_k_replace[] = "replace"; jpayne@69: static const char __pyx_k_samples[] = "_samples"; jpayne@69: static const char __pyx_k_setinfo[] = "setinfo"; jpayne@69: static const char __pyx_k_vcffile[] = "vcffile"; jpayne@69: static const char __pyx_k_version[] = "_version"; jpayne@69: static const char __pyx_k_GTstring[] = "GTstring"; jpayne@69: static const char __pyx_k_Genotype[] = "Genotype"; jpayne@69: static const char __pyx_k_KeyError[] = "KeyError"; jpayne@69: static const char __pyx_k_Number_2[] = "Number"; jpayne@69: static const char __pyx_k_VCF_says[] = ", VCF says "; jpayne@69: static const char __pyx_k_deepcopy[] = "deepcopy"; jpayne@69: static const char __pyx_k_encoding[] = "encoding"; jpayne@69: static const char __pyx_k_endswith[] = "endswith"; jpayne@69: static const char __pyx_k_expected[] = "; expected "; jpayne@69: static const char __pyx_k_filename[] = "filename"; jpayne@69: static const char __pyx_k_filter_2[] = "filter"; jpayne@69: static const char __pyx_k_format_2[] = "_format"; jpayne@69: static const char __pyx_k_getstate[] = "__getstate__"; jpayne@69: static const char __pyx_k_gtsRegEx[] = "gtsRegEx"; jpayne@69: static const char __pyx_k_header_2[] = "header"; jpayne@69: static const char __pyx_k_headings[] = "headings"; jpayne@69: static const char __pyx_k_inregion[] = "inregion"; jpayne@69: static const char __pyx_k_operator[] = "operator"; jpayne@69: static const char __pyx_k_output_2[] = "output"; jpayne@69: static const char __pyx_k_pyx_type[] = "__pyx_type"; jpayne@69: static const char __pyx_k_qualname[] = "__qualname__"; jpayne@69: static const char __pyx_k_required[] = "_required"; jpayne@69: static const char __pyx_k_sequence[] = "sequence"; jpayne@69: static const char __pyx_k_set_name[] = "__set_name__"; jpayne@69: static const char __pyx_k_setstate[] = "__setstate__"; jpayne@69: static const char __pyx_k_shortest[] = "shortest"; jpayne@69: static const char __pyx_k_validate[] = "validate"; jpayne@69: static const char __pyx_k_Character[] = "Character"; jpayne@69: static const char __pyx_k_NT_NUMBER[] = "NT_NUMBER"; jpayne@69: static const char __pyx_k_Phase_set[] = "Phase set"; jpayne@69: static const char __pyx_k_Tabixfile[] = "Tabixfile"; jpayne@69: static const char __pyx_k_TypeError[] = "TypeError"; jpayne@69: static const char __pyx_k_VCFRecord[] = "VCFRecord"; jpayne@69: static const char __pyx_k_VCF___del[] = "VCF.__del__"; jpayne@69: static const char __pyx_k_VCF_close[] = "VCF.close"; jpayne@69: static const char __pyx_k_VCF_error[] = "VCF.error"; jpayne@69: static const char __pyx_k_VCF_fetch[] = "VCF.fetch"; jpayne@69: static const char __pyx_k_VCF_parse[] = "VCF.parse"; jpayne@69: static const char __pyx_k_VCF_write[] = "VCF.write"; jpayne@69: static const char __pyx_k_WRONG_REF[] = "WRONG_REF"; jpayne@69: static const char __pyx_k_convertGT[] = "convertGT"; jpayne@69: static const char __pyx_k_enumerate[] = "enumerate"; jpayne@69: static const char __pyx_k_genotypes[] = "#genotypes"; jpayne@69: static const char __pyx_k_getfilter[] = "getfilter"; jpayne@69: static const char __pyx_k_getformat[] = "getformat"; jpayne@69: static const char __pyx_k_getheader[] = "getheader"; jpayne@69: static const char __pyx_k_isenabled[] = "isenabled"; jpayne@69: static const char __pyx_k_last_line[] = "last_line"; jpayne@69: static const char __pyx_k_leftalign[] = "leftalign"; jpayne@69: static const char __pyx_k_lineparse[] = "lineparse"; jpayne@69: static const char __pyx_k_metaclass[] = "__metaclass__"; jpayne@69: static const char __pyx_k_pyx_state[] = "__pyx_state"; jpayne@69: static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; jpayne@69: static const char __pyx_k_reference[] = "reference"; jpayne@69: static const char __pyx_k_regions_2[] = "_regions"; jpayne@69: static const char __pyx_k_samples_2[] = " samples ("; jpayne@69: static const char __pyx_k_samples_3[] = "samples"; jpayne@69: static const char __pyx_k_separator[] = "separator"; jpayne@69: static const char __pyx_k_setfilter[] = "setfilter"; jpayne@69: static const char __pyx_k_setformat[] = "setformat"; jpayne@69: static const char __pyx_k_setheader[] = "setheader"; jpayne@69: static const char __pyx_k_tabixfile[] = "tabixfile"; jpayne@69: static const char __pyx_k_version_2[] = "version"; jpayne@69: static const char __pyx_k_warnerror[] = "warnerror"; jpayne@69: static const char __pyx_k_NT_ALLELES[] = "NT_ALLELES"; jpayne@69: static const char __pyx_k_NT_UNKNOWN[] = "NT_UNKNOWN"; jpayne@69: static const char __pyx_k_VCF___init[] = "VCF.__init__"; jpayne@69: static const char __pyx_k_VCF__parse[] = "VCF._parse"; jpayne@69: static const char __pyx_k_ValueError[] = "ValueError"; jpayne@69: static const char __pyx_k_errorlabel[] = "errorlabel"; jpayne@69: static const char __pyx_k_expected_2[] = ", expected "; jpayne@69: static const char __pyx_k_expected_3[] = "expected "; jpayne@69: static const char __pyx_k_expected_4[] = "expected"; jpayne@69: static const char __pyx_k_fileformat[] = "fileformat"; jpayne@69: static const char __pyx_k_formatdict[] = "formatdict"; jpayne@69: static const char __pyx_k_getsamples[] = "getsamples"; jpayne@69: static const char __pyx_k_itemgetter[] = "itemgetter"; jpayne@69: static const char __pyx_k_itervalues[] = "itervalues"; jpayne@69: static const char __pyx_k_namedtuple[] = "namedtuple"; jpayne@69: static const char __pyx_k_numbertype[] = "numbertype"; jpayne@69: static const char __pyx_k_parse_data[] = "parse_data"; jpayne@69: static const char __pyx_k_pyx_result[] = "__pyx_result"; jpayne@69: static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; jpayne@69: static const char __pyx_k_required_2[] = "required"; jpayne@69: static const char __pyx_k_setregions[] = "setregions"; jpayne@69: static const char __pyx_k_setsamples[] = "setsamples"; jpayne@69: static const char __pyx_k_setversion[] = "setversion"; jpayne@69: static const char __pyx_k_startswith[] = "startswith"; jpayne@69: static const char __pyx_k_write_data[] = "write_data"; jpayne@69: static const char __pyx_k_Description[] = "Description="; jpayne@69: static const char __pyx_k_MISSING_REF[] = "MISSING_REF"; jpayne@69: static const char __pyx_k_MemoryError[] = "MemoryError"; jpayne@69: static const char __pyx_k_PickleError[] = "PickleError"; jpayne@69: static const char __pyx_k_V33_BAD_REF[] = "V33_BAD_REF"; jpayne@69: static const char __pyx_k_VCF_connect[] = "VCF.connect"; jpayne@69: static const char __pyx_k_VCF_getinfo[] = "VCF.getinfo"; jpayne@69: static const char __pyx_k_VCF_setinfo[] = "VCF.setinfo"; jpayne@69: static const char __pyx_k_alleleRegEx[] = "alleleRegEx"; jpayne@69: static const char __pyx_k_asVCFRecord[] = "asVCFRecord"; jpayne@69: static const char __pyx_k_collections[] = "collections"; jpayne@69: static const char __pyx_k_defaultdict[] = "defaultdict"; jpayne@69: static const char __pyx_k_deletion_is[] = "(deletion is "; jpayne@69: static const char __pyx_k_description[] = "description"; jpayne@69: static const char __pyx_k_errorstring[] = "errorstring"; jpayne@69: static const char __pyx_k_ignoreerror[] = "ignoreerror"; jpayne@69: static const char __pyx_k_leftalign_2[] = "_leftalign"; jpayne@69: static const char __pyx_k_mro_entries[] = "__mro_entries__"; jpayne@69: static const char __pyx_k_reference_2[] = "_reference"; jpayne@69: static const char __pyx_k_warn_errors[] = "_warn_errors"; jpayne@69: static const char __pyx_k_writeheader[] = "writeheader"; jpayne@69: static const char __pyx_k_BAD_GENOTYPE[] = "BAD_GENOTYPE"; jpayne@69: static const char __pyx_k_NT_GENOTYPES[] = "NT_GENOTYPES"; jpayne@69: static const char __pyx_k_VCF_inregion[] = "VCF.inregion"; jpayne@69: static const char __pyx_k_VCF_validate[] = "VCF.validate"; jpayne@69: static const char __pyx_k_get_expected[] = "get_expected"; jpayne@69: static const char __pyx_k_get_sequence[] = "get_sequence"; jpayne@69: static const char __pyx_k_initializing[] = "_initializing"; jpayne@69: static const char __pyx_k_is_coroutine[] = "_is_coroutine"; jpayne@69: static const char __pyx_k_missingvalue[] = "missingvalue"; jpayne@69: static const char __pyx_k_parse_format[] = "parse_format"; jpayne@69: static const char __pyx_k_parse_header[] = "parse_header"; jpayne@69: static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; jpayne@69: static const char __pyx_k_reference_is[] = "(reference is "; jpayne@69: static const char __pyx_k_setreference[] = "setreference"; jpayne@69: static const char __pyx_k_stringsource[] = ""; jpayne@69: static const char __pyx_k_use_setstate[] = "use_setstate"; jpayne@69: static const char __pyx_k_write_header[] = "write_header"; jpayne@69: static const char __pyx_k_Description_2[] = "Description"; jpayne@69: static const char __pyx_k_NT_NR_ALLELES[] = "NT_NR_ALLELES"; jpayne@69: static const char __pyx_k_StopIteration[] = "StopIteration"; jpayne@69: static const char __pyx_k_Undefined_tag[] = "(Undefined tag)"; jpayne@69: static const char __pyx_k_VCF_convertGT[] = "VCF.convertGT"; jpayne@69: static const char __pyx_k_VCF_getfilter[] = "VCF.getfilter"; jpayne@69: static const char __pyx_k_VCF_getformat[] = "VCF.getformat"; jpayne@69: static const char __pyx_k_VCF_getheader[] = "VCF.getheader"; jpayne@69: static const char __pyx_k_VCF_setfilter[] = "VCF.setfilter"; jpayne@69: static const char __pyx_k_VCF_setformat[] = "VCF.setformat"; jpayne@69: static const char __pyx_k_VCF_setheader[] = "VCF.setheader"; jpayne@69: static const char __pyx_k_VCF_warnerror[] = "VCF.warnerror"; jpayne@69: static const char __pyx_k_class_getitem[] = "__class_getitem__"; jpayne@69: static const char __pyx_k_compare_calls[] = "compare_calls"; jpayne@69: static const char __pyx_k_convertGTback[] = "convertGTback"; jpayne@69: static const char __pyx_k_datagenerator[] = "datagenerator"; jpayne@69: static const char __pyx_k_format_format[] = "format_format"; jpayne@69: static const char __pyx_k_init_subclass[] = "__init_subclass__"; jpayne@69: static const char __pyx_k_parse_heading[] = "parse_heading"; jpayne@69: static const char __pyx_k_parse_regions[] = "parse_regions"; jpayne@69: static const char __pyx_k_pysam_libcvcf[] = "pysam.libcvcf"; jpayne@69: static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; jpayne@69: static const char __pyx_k_sample2column[] = "_sample2column"; jpayne@69: static const char __pyx_k_write_heading[] = "write_heading"; jpayne@69: static const char __pyx_k_AssertionError[] = "AssertionError"; jpayne@69: static const char __pyx_k_V33_BAD_ALLELE[] = "V33_BAD_ALLELE"; jpayne@69: static const char __pyx_k_V40_BAD_ALLELE[] = "V40_BAD_ALLELE"; jpayne@69: static const char __pyx_k_VCF_getsamples[] = "VCF.getsamples"; jpayne@69: static const char __pyx_k_VCF_parse_data[] = "VCF.parse_data"; jpayne@69: static const char __pyx_k_VCF_setregions[] = "VCF.setregions"; jpayne@69: static const char __pyx_k_VCF_setsamples[] = "VCF.setsamples"; jpayne@69: static const char __pyx_k_VCF_setversion[] = "VCF.setversion"; jpayne@69: static const char __pyx_k_VCF_write_data[] = "VCF.write_data"; jpayne@69: static const char __pyx_k_add_definition[] = "_add_definition"; jpayne@69: static const char __pyx_k_have_deletions[] = "have_deletions"; jpayne@69: static const char __pyx_k_ignored_errors[] = "_ignored_errors"; jpayne@69: static const char __pyx_k_nonref_alleles[] = "#nonref_alleles"; jpayne@69: static const char __pyx_k_parameters_got[] = " parameters, got "; jpayne@69: static const char __pyx_k_parse_header_2[] = "_parse_header"; jpayne@69: static const char __pyx_k_reference_is_2[] = ", reference is "; jpayne@69: static const char __pyx_k_Phasing_quality[] = "Phasing quality"; jpayne@69: static const char __pyx_k_VCFRecord_error[] = "VCFRecord.error"; jpayne@69: static const char __pyx_k_VCF_ignoreerror[] = "VCF.ignoreerror"; jpayne@69: static const char __pyx_k_VCF_writeheader[] = "VCF.writeheader"; jpayne@69: static const char __pyx_k_faref_leftflank[] = "faref_leftflank"; jpayne@69: static const char __pyx_k_fileformat_VCFv[] = "##fileformat=VCFv"; jpayne@69: static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; jpayne@69: static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; jpayne@69: static const char __pyx_k_Genotype_Quality[] = "Genotype Quality"; jpayne@69: static const char __pyx_k_POS_NOT_POSITIVE[] = "POS_NOT_POSITIVE"; jpayne@69: static const char __pyx_k_VCF_get_expected[] = "VCF.get_expected"; jpayne@69: static const char __pyx_k_VCF_parse_format[] = "VCF.parse_format"; jpayne@69: static const char __pyx_k_VCF_parse_header[] = "VCF.parse_header"; jpayne@69: static const char __pyx_k_VCF_setreference[] = "VCF.setreference"; jpayne@69: static const char __pyx_k_VCF_write_header[] = "VCF.write_header"; jpayne@69: static const char __pyx_k_parse_formatdata[] = "parse_formatdata"; jpayne@69: static const char __pyx_k_phased_genotypes[] = "#phased_genotypes"; jpayne@69: static const char __pyx_k_ERROR_INFO_STRING[] = "ERROR_INFO_STRING"; jpayne@69: static const char __pyx_k_ERROR_UNKNOWN_KEY[] = "ERROR_UNKNOWN_KEY"; jpayne@69: static const char __pyx_k_Haplotype_Quality[] = "Haplotype Quality"; jpayne@69: static const char __pyx_k_POS_NOT_NUMERICAL[] = "POS_NOT_NUMERICAL"; jpayne@69: static const char __pyx_k_VCF__parse_header[] = "VCF._parse_header"; jpayne@69: static const char __pyx_k_VCF_compare_calls[] = "VCF.compare_calls"; jpayne@69: static const char __pyx_k_VCF_convertGTback[] = "VCF.convertGTback"; jpayne@69: static const char __pyx_k_VCF_format_format[] = "VCF.format_format"; jpayne@69: static const char __pyx_k_VCF_parse_heading[] = "VCF.parse_heading"; jpayne@69: static const char __pyx_k_VCF_write_heading[] = "VCF.write_heading"; jpayne@69: static const char __pyx_k_format_formatdata[] = "format_formatdata"; jpayne@69: static const char __pyx_k_pysam_libcvcf_pyx[] = "pysam/libcvcf.pyx"; jpayne@69: static const char __pyx_k_values_in_element[] = " values in element "; jpayne@69: static const char __pyx_k_FILTER_NOT_DEFINED[] = "FILTER_NOT_DEFINED"; jpayne@69: static const char __pyx_k_FORMAT_NOT_DEFINED[] = "FORMAT_NOT_DEFINED"; jpayne@69: static const char __pyx_k_QUAL_NOT_NUMERICAL[] = "QUAL_NOT_NUMERICAL"; jpayne@69: static const char __pyx_k_ZERO_LENGTH_ALLELE[] = "ZERO_LENGTH_ALLELE"; jpayne@69: static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; jpayne@69: static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; jpayne@69: static const char __pyx_k_ERROR_TRAILING_DATA[] = "ERROR_TRAILING_DATA"; jpayne@69: static const char __pyx_k_NT_PHASED_GENOTYPES[] = "NT_PHASED_GENOTYPES"; jpayne@69: static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; jpayne@69: static const char __pyx_k_RMS_mapping_quality[] = "RMS mapping quality"; jpayne@69: static const char __pyx_k_UNKNOWN_CHAR_IN_REF[] = "UNKNOWN_CHAR_IN_REF"; jpayne@69: static const char __pyx_k_VCF__add_definition[] = "VCF._add_definition"; jpayne@69: static const char __pyx_k_needs_to_be_checked[] = "needs to be checked"; jpayne@69: static const char __pyx_k_sth_entry_not_found[] = "(%sth entry not found)"; jpayne@69: static const char __pyx_k_BAD_NUMBER_OF_VALUES[] = "BAD_NUMBER_OF_VALUES"; jpayne@69: static const char __pyx_k_ERROR_FLAG_HAS_VALUE[] = "ERROR_FLAG_HAS_VALUE"; jpayne@69: static const char __pyx_k_Genotype_likelihoods[] = "Genotype likelihoods"; jpayne@69: static const char __pyx_k_VCF_parse_formatdata[] = "VCF.parse_formatdata"; jpayne@69: static const char __pyx_k_enter_default_format[] = "enter_default_format"; jpayne@69: static const char __pyx_k_BAD_NUMBER_OF_COLUMNS[] = "BAD_NUMBER_OF_COLUMNS"; jpayne@69: static const char __pyx_k_ERROR_FORMAT_NOT_CHAR[] = "ERROR_FORMAT_NOT_CHAR"; jpayne@69: static const char __pyx_k_FORMAT_MISSING_QUOTES[] = "FORMAT_MISSING_QUOTES"; jpayne@69: static const char __pyx_k_UNKNOWN_FORMAT_STRING[] = "UNKNOWN_FORMAT_STRING"; jpayne@69: static const char __pyx_k_VCF_format_formatdata[] = "VCF.format_formatdata"; jpayne@69: static const char __pyx_k_Invalid_error_string_s[] = "Invalid error string: %s"; jpayne@69: static const char __pyx_k_Sample_Genotype_Filter[] = "Sample Genotype Filter"; jpayne@69: static const char __pyx_k_V33_UNMATCHED_DELETION[] = "V33_UNMATCHED_DELETION"; jpayne@69: static const char __pyx_k_BADLY_FORMATTED_HEADING[] = "BADLY_FORMATTED_HEADING"; jpayne@69: static const char __pyx_k_ZERO_FOR_NON_FLAG_FIELD[] = "ZERO_FOR_NON_FLAG_FIELD"; jpayne@69: static const char __pyx_k_BAD_NUMBER_OF_PARAMETERS[] = "BAD_NUMBER_OF_PARAMETERS"; jpayne@69: static const char __pyx_k_ERROR_FORMAT_NOT_INTEGER[] = "ERROR_FORMAT_NOT_INTEGER"; jpayne@69: static const char __pyx_k_VCF_enter_default_format[] = "VCF.enter_default_format"; jpayne@69: static const char __pyx_k_pyx_unpickle_asVCFRecord[] = "__pyx_unpickle_asVCFRecord"; jpayne@69: static const char __pyx_k_VCFRecord___reduce_cython[] = "VCFRecord.__reduce_cython__"; jpayne@69: static const char __pyx_k_ERROR_FORMAT_NOT_NUMERICAL[] = "ERROR_FORMAT_NOT_NUMERICAL"; jpayne@69: static const char __pyx_k_V40_MISSING_ANGLE_BRACKETS[] = "V40_MISSING_ANGLE_BRACKETS"; jpayne@69: static const char __pyx_k_VCFRecord___setstate_cython[] = "VCFRecord.__setstate_cython__"; jpayne@69: static const char __pyx_k_WRONG_REF_Wrong_reference_s[] = "WRONG_REF:Wrong reference %s"; jpayne@69: static const char __pyx_k_asVCFRecord___reduce_cython[] = "asVCFRecord.__reduce_cython__"; jpayne@69: static const char __pyx_k_Conditional_genotype_quality[] = "Conditional genotype quality"; jpayne@69: static const char __pyx_k_BADLY_FORMATTED_FORMAT_STRING[] = "BADLY_FORMATTED_FORMAT_STRING"; jpayne@69: static const char __pyx_k_HEADING_NOT_SEPARATED_BY_TABS[] = "HEADING_NOT_SEPARATED_BY_TABS"; jpayne@69: static const char __pyx_k_MISSING_INDEL_ALLELE_REF_BASE[] = "MISSING_INDEL_ALLELE_REF_BASE"; jpayne@69: static const char __pyx_k_asVCFRecord___setstate_cython[] = "asVCFRecord.__setstate_cython__"; jpayne@69: static const char __pyx_k_BADLY_FORMATTED_HEADING_Did_not[] = "BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s"; jpayne@69: static const char __pyx_k_ERROR_FORMAT_NOT_CHAR_Eexpected[] = "ERROR_FORMAT_NOT_CHAR:Eexpected character in formatted field; got string"; jpayne@69: static const char __pyx_k_ERROR_UNKNOWN_KEY_Unknown_key_s[] = "ERROR_UNKNOWN_KEY:Unknown key (%s) found in formatted field (info; format; or filter)"; jpayne@69: static const char __pyx_k_Expected_alternate_allel_counts[] = "Expected alternate allel counts"; jpayne@69: static const char __pyx_k_FILTER_NOT_DEFINED_Identifier_s[] = "FILTER_NOT_DEFINED:Identifier (%s) in filter found which was not defined in header"; jpayne@69: static const char __pyx_k_FORMAT_NOT_DEFINED_Identifier_s[] = "FORMAT_NOT_DEFINED:Identifier (%s) in format found which was not defined in header"; jpayne@69: static const char __pyx_k_POS_NOT_POSITIVE_Position_field[] = "POS_NOT_POSITIVE:Position field must be >0"; jpayne@69: static const char __pyx_k_Read_depth_at_this_position_for[] = "Read depth at this position for this sample"; jpayne@69: static const char __pyx_k_Unknown_number_type_encountered[] = "Unknown number type encountered: %s"; jpayne@69: static const char __pyx_k_V33_BAD_ALLELE_Cannot_interpret[] = "V33_BAD_ALLELE:Cannot interpret allele for v3.3 VCF"; jpayne@69: static const char __pyx_k_V33_BAD_REF_Reference_should_be[] = "V33_BAD_REF:Reference should be single-character in v3.3 VCF"; jpayne@69: static const char __pyx_k_V40_BAD_ALLELE_Bad_allele_found[] = "V40_BAD_ALLELE:Bad allele found for v4.0 VCF (%s)"; jpayne@69: static const char __pyx_k_BADLY_FORMATTED_FORMAT_STRING_Fo[] = "BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string"; jpayne@69: static const char __pyx_k_BAD_CHR_TAG_Error_calculating_ch[] = "BAD_CHR_TAG:Error calculating chr tag for %s"; jpayne@69: static const char __pyx_k_BAD_GENOTYPE_Cannot_parse_genoty[] = "BAD_GENOTYPE:Cannot parse genotype (%s)"; jpayne@69: static const char __pyx_k_BAD_NUMBER_OF_COLUMNS_Wrong_numb[] = "BAD_NUMBER_OF_COLUMNS:Wrong number of columns found (%s)"; jpayne@69: static const char __pyx_k_BAD_NUMBER_OF_PARAMETERS_Found_u[] = "BAD_NUMBER_OF_PARAMETERS:Found unexpected number of parameters (%s)"; jpayne@69: static const char __pyx_k_BAD_NUMBER_OF_VALUES_Found_too_m[] = "BAD_NUMBER_OF_VALUES:Found too many of values in sample column (%s)"; jpayne@69: static const char __pyx_k_Can_only_handle_v3_3_and_v4_0_VC[] = "Can only handle v3.3 and v4.0 VCF files"; jpayne@69: static const char __pyx_k_Don_t_understand_region_string_s[] = "Don't understand region string '%s'"; jpayne@69: static const char __pyx_k_ERROR_FLAG_HAS_VALUE_Flag_fields[] = "ERROR_FLAG_HAS_VALUE:Flag fields should not have a value"; jpayne@69: static const char __pyx_k_ERROR_FORMAT_NOT_INTEGER_Expecte[] = "ERROR_FORMAT_NOT_INTEGER:Expected integer in formatted field; got %s"; jpayne@69: static const char __pyx_k_ERROR_FORMAT_NOT_NUMERICAL_Expec[] = "ERROR_FORMAT_NOT_NUMERICAL:Expected integer or float in formatted field; got %s"; jpayne@69: static const char __pyx_k_ERROR_INFO_STRING_Error_while_pa[] = "ERROR_INFO_STRING:Error while parsing info field"; jpayne@69: static const char __pyx_k_ERROR_TRAILING_DATA_Numerical_fi[] = "ERROR_TRAILING_DATA:Numerical field ('%s') has semicolon-separated trailing data"; jpayne@69: static const char __pyx_k_FORMAT_MISSING_QUOTES_Descriptio[] = "FORMAT_MISSING_QUOTES:Description field in format definition is not surrounded by quotes"; jpayne@69: static const char __pyx_k_Genotype_posterior_probabilities[] = "Genotype posterior probabilities"; jpayne@69: static const char __pyx_k_HEADING_NOT_SEPARATED_BY_TABS_He[] = "HEADING_NOT_SEPARATED_BY_TABS:Heading line appears separated by spaces, not tabs"; jpayne@69: static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))"; jpayne@69: static const char __pyx_k_MISSING_INDEL_ALLELE_REF_BASE_In[] = "MISSING_INDEL_ALLELE_REF_BASE:Indel alleles must begin with single reference base"; jpayne@69: static const char __pyx_k_MISSING_REF_Reference_allele_mis[] = "MISSING_REF:Reference allele missing"; jpayne@69: static const char __pyx_k_POS_NOT_NUMERICAL_Position_colum[] = "POS_NOT_NUMERICAL:Position column is not numerical"; jpayne@69: static const char __pyx_k_Phred_scaled_genotype_likelihood[] = "Phred-scaled genotype likelihoods"; jpayne@69: static const char __pyx_k_QUAL_NOT_NUMERICAL_Quality_field[] = "QUAL_NOT_NUMERICAL:Quality field must be numerical, or '.'"; jpayne@69: static const char __pyx_k_Required_key_s_not_found_in_data[] = "Required key %s not found in data"; jpayne@69: static const char __pyx_k_UNKNOWN_CHAR_IN_REF_Unknown_char[] = "UNKNOWN_CHAR_IN_REF:Unknown character in reference field"; jpayne@69: static const char __pyx_k_UNKNOWN_FORMAT_STRING_Unknown_fi[] = "UNKNOWN_FORMAT_STRING:Unknown file format identifier"; jpayne@69: static const char __pyx_k_V33_UNMATCHED_DELETION_Deleted_s[] = "V33_UNMATCHED_DELETION:Deleted sequence does not match reference (%s)"; jpayne@69: static const char __pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS"; jpayne@69: static const char __pyx_k_V40_MISSING_ANGLE_BRACKETS_Forma[] = "V40_MISSING_ANGLE_BRACKETS:Format definition is not deliminted by angular brackets"; jpayne@69: static const char __pyx_k_ZERO_FOR_NON_FLAG_FIELD_number_s[] = "ZERO_FOR_NON_FLAG_FIELD: number set to 0, but type is not 'FLAG'"; jpayne@69: static const char __pyx_k_ZERO_LENGTH_ALLELE_Found_zero_le[] = "ZERO_LENGTH_ALLELE:Found zero-length allele"; jpayne@69: static const char __pyx_k_id_numbertype_number_type_descri[] = "id numbertype number type description missingvalue"; jpayne@69: static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; jpayne@69: static const char __pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS:Fields in v4.0 VCF format definition must have named fields"; jpayne@69: /* #### Code section: decls ### */ jpayne@69: static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */ jpayne@69: static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_get_sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_fa); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_2parse_regions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string); /* proto */ jpayne@69: static int __pyx_pf_5pysam_7libcvcf_9VCFRecord___init__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf); /* proto */ jpayne@69: static int __pyx_pf_5pysam_7libcvcf_9VCFRecord_2__cinit__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_4error(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt); /* proto */ jpayne@69: static Py_ssize_t __pyx_pf_5pysam_7libcvcf_9VCFRecord_6__len__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_6contig___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_3pos___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_2id___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_3ref___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_3alt___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_4qual___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_6filter___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_4info___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_6format___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_7samples___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_8__getitem__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ jpayne@69: static int __pyx_pf_5pysam_7libcvcf_11asVCFRecord___init__(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v_self, PyObject *__pyx_v_vcffile); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_11asVCFRecord_2__reduce_cython__(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_11asVCFRecord_4__setstate_cython__(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v__copy, PyObject *__pyx_v_reference, PyObject *__pyx_v_regions, PyObject *__pyx_v_lines, PyObject *__pyx_v_leftalign); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_format, PyObject *__pyx_v_filter); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_6format_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt, PyObject *__pyx_v_filter); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_alt); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_10_add_definition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_key, PyObject *__pyx_v_data, PyObject *__pyx_v_line); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_12format_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_format, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_separator); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_14enter_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_16parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_18write_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_22write_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_GTstring); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_26convertGTback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_GTdata); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_line); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_pos); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_lineparse); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_34write_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_data); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_38_parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_stream); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_41getsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_43setsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_samples); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_45getheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_47setheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_header); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_49getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_51setinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_53getformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_55setformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_57getfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_59setfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filter); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_61setversion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_version); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_63setregions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_regions); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_65setreference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ref); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_73write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_datagenerator); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_75writeheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_pos1, PyObject *__pyx_v_ref1, PyObject *__pyx_v_alt1, PyObject *__pyx_v_pos2, PyObject *__pyx_v_ref2, PyObject *__pyx_v_alt2); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_79connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_encoding); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_81__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_83close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_85fetch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_87validate(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_record); /* proto */ jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_4__pyx_unpickle_asVCFRecord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ jpayne@69: static PyObject *__pyx_tp_new_5pysam_7libcvcf_VCFRecord(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ jpayne@69: static PyObject *__pyx_tp_new_5pysam_7libcvcf_asVCFRecord(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ jpayne@69: static PyObject *__pyx_tp_new_5pysam_7libcvcf___pyx_scope_struct___parse(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ jpayne@69: /* #### Code section: late_includes ### */ jpayne@69: /* #### Code section: module_state ### */ jpayne@69: typedef struct { jpayne@69: PyObject *__pyx_d; jpayne@69: PyObject *__pyx_b; jpayne@69: PyObject *__pyx_cython_runtime; jpayne@69: PyObject *__pyx_empty_tuple; jpayne@69: PyObject *__pyx_empty_bytes; jpayne@69: PyObject *__pyx_empty_unicode; jpayne@69: #ifdef __Pyx_CyFunction_USED jpayne@69: PyTypeObject *__pyx_CyFunctionType; jpayne@69: #endif jpayne@69: #ifdef __Pyx_FusedFunction_USED jpayne@69: PyTypeObject *__pyx_FusedFunctionType; jpayne@69: #endif jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: PyTypeObject *__pyx_GeneratorType; jpayne@69: #endif jpayne@69: #ifdef __Pyx_IterableCoroutine_USED jpayne@69: PyTypeObject *__pyx_IterableCoroutineType; jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: PyTypeObject *__pyx_CoroutineAwaitType; jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: PyTypeObject *__pyx_CoroutineType; jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: PyTypeObject *__pyx_ptype_5pysam_10libchtslib_HTSFile; jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_tabix_file_iterator; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixFile; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_Parser; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_asTuple; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_asGTF; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_asGFF3; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_asBed; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_asVCF; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixIterator; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIterator; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIteratorHead; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIteratorParsed; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_9libctabix_Tabixfile; jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_TupleProxy; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_GTFProxy; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_BedProxy; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_VCFProxy; jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: PyTypeObject *__pyx_ptype_7cpython_4type_type; jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: PyTypeObject *__pyx_ptype_7cpython_4bool_bool; jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: PyTypeObject *__pyx_ptype_7cpython_7complex_complex; jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: PyTypeObject *__pyx_ptype_7cpython_5array_array; jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: PyObject *__pyx_type_5pysam_7libcvcf_VCFRecord; jpayne@69: PyObject *__pyx_type_5pysam_7libcvcf_asVCFRecord; jpayne@69: PyObject *__pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse; jpayne@69: #endif jpayne@69: PyTypeObject *__pyx_ptype_5pysam_7libcvcf_VCFRecord; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_7libcvcf_asVCFRecord; jpayne@69: PyTypeObject *__pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse; jpayne@69: PyObject *__pyx_kp_u_; jpayne@69: PyObject *__pyx_kp_b_0; jpayne@69: PyObject *__pyx_kp_u_0; jpayne@69: PyObject *__pyx_n_u_A; jpayne@69: PyObject *__pyx_n_u_ACGTN; jpayne@69: PyObject *__pyx_kp_u_ACGTN_2; jpayne@69: PyObject *__pyx_n_u_ALT; jpayne@69: PyObject *__pyx_n_s_AssertionError; jpayne@69: PyObject *__pyx_n_s_BADLY_FORMATTED_FORMAT_STRING; jpayne@69: PyObject *__pyx_kp_u_BADLY_FORMATTED_FORMAT_STRING_Fo; jpayne@69: PyObject *__pyx_n_s_BADLY_FORMATTED_HEADING; jpayne@69: PyObject *__pyx_kp_u_BADLY_FORMATTED_HEADING_Did_not; jpayne@69: PyObject *__pyx_kp_u_BAD_CHR_TAG_Error_calculating_ch; jpayne@69: PyObject *__pyx_n_s_BAD_GENOTYPE; jpayne@69: PyObject *__pyx_kp_u_BAD_GENOTYPE_Cannot_parse_genoty; jpayne@69: PyObject *__pyx_n_s_BAD_NUMBER_OF_COLUMNS; jpayne@69: PyObject *__pyx_kp_u_BAD_NUMBER_OF_COLUMNS_Wrong_numb; jpayne@69: PyObject *__pyx_n_s_BAD_NUMBER_OF_PARAMETERS; jpayne@69: PyObject *__pyx_kp_u_BAD_NUMBER_OF_PARAMETERS_Found_u; jpayne@69: PyObject *__pyx_n_s_BAD_NUMBER_OF_VALUES; jpayne@69: PyObject *__pyx_kp_u_BAD_NUMBER_OF_VALUES_Found_too_m; jpayne@69: PyObject *__pyx_n_u_CHROM; jpayne@69: PyObject *__pyx_kp_u_Can_only_handle_v3_3_and_v4_0_VC; jpayne@69: PyObject *__pyx_n_u_Character; jpayne@69: PyObject *__pyx_kp_u_Conditional_genotype_quality; jpayne@69: PyObject *__pyx_n_u_D; jpayne@69: PyObject *__pyx_n_u_DP; jpayne@69: PyObject *__pyx_kp_u_Description; jpayne@69: PyObject *__pyx_n_u_Description_2; jpayne@69: PyObject *__pyx_kp_u_Don_t_understand_region_string_s; jpayne@69: PyObject *__pyx_n_u_EC; jpayne@69: PyObject *__pyx_n_s_ERROR_FLAG_HAS_VALUE; jpayne@69: PyObject *__pyx_kp_u_ERROR_FLAG_HAS_VALUE_Flag_fields; jpayne@69: PyObject *__pyx_n_s_ERROR_FORMAT_NOT_CHAR; jpayne@69: PyObject *__pyx_kp_u_ERROR_FORMAT_NOT_CHAR_Eexpected; jpayne@69: PyObject *__pyx_n_s_ERROR_FORMAT_NOT_INTEGER; jpayne@69: PyObject *__pyx_kp_u_ERROR_FORMAT_NOT_INTEGER_Expecte; jpayne@69: PyObject *__pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL; jpayne@69: PyObject *__pyx_kp_u_ERROR_FORMAT_NOT_NUMERICAL_Expec; jpayne@69: PyObject *__pyx_n_s_ERROR_INFO_STRING; jpayne@69: PyObject *__pyx_kp_u_ERROR_INFO_STRING_Error_while_pa; jpayne@69: PyObject *__pyx_n_s_ERROR_TRAILING_DATA; jpayne@69: PyObject *__pyx_kp_u_ERROR_TRAILING_DATA_Numerical_fi; jpayne@69: PyObject *__pyx_n_s_ERROR_UNKNOWN_KEY; jpayne@69: PyObject *__pyx_kp_u_ERROR_UNKNOWN_KEY_Unknown_key_s; jpayne@69: PyObject *__pyx_n_u_Error; jpayne@69: PyObject *__pyx_kp_u_Expected_alternate_allel_counts; jpayne@69: PyObject *__pyx_n_u_FILTER; jpayne@69: PyObject *__pyx_n_s_FILTER_NOT_DEFINED; jpayne@69: PyObject *__pyx_kp_u_FILTER_NOT_DEFINED_Identifier_s; jpayne@69: PyObject *__pyx_n_s_FORMAT; jpayne@69: PyObject *__pyx_n_u_FORMAT; jpayne@69: PyObject *__pyx_n_s_FORMAT_MISSING_QUOTES; jpayne@69: PyObject *__pyx_kp_u_FORMAT_MISSING_QUOTES_Descriptio; jpayne@69: PyObject *__pyx_n_s_FORMAT_NOT_DEFINED; jpayne@69: PyObject *__pyx_kp_u_FORMAT_NOT_DEFINED_Identifier_s; jpayne@69: PyObject *__pyx_n_u_FT; jpayne@69: PyObject *__pyx_n_u_Flag; jpayne@69: PyObject *__pyx_n_u_Float; jpayne@69: PyObject *__pyx_n_u_G; jpayne@69: PyObject *__pyx_n_u_GL; jpayne@69: PyObject *__pyx_n_u_GLE; jpayne@69: PyObject *__pyx_n_u_GP; jpayne@69: PyObject *__pyx_n_u_GQ; jpayne@69: PyObject *__pyx_n_u_GT; jpayne@69: PyObject *__pyx_n_s_GTdata; jpayne@69: PyObject *__pyx_n_s_GTstring; jpayne@69: PyObject *__pyx_n_u_Genotype; jpayne@69: PyObject *__pyx_kp_u_Genotype_Quality; jpayne@69: PyObject *__pyx_kp_u_Genotype_likelihoods; jpayne@69: PyObject *__pyx_kp_u_Genotype_posterior_probabilities; jpayne@69: PyObject *__pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS; jpayne@69: PyObject *__pyx_kp_u_HEADING_NOT_SEPARATED_BY_TABS_He; jpayne@69: PyObject *__pyx_n_u_HQ; jpayne@69: PyObject *__pyx_kp_u_Haplotype_Quality; jpayne@69: PyObject *__pyx_n_u_I; jpayne@69: PyObject *__pyx_kp_u_ID; jpayne@69: PyObject *__pyx_n_u_ID_2; jpayne@69: PyObject *__pyx_n_u_INFO; jpayne@69: PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0; jpayne@69: PyObject *__pyx_n_u_Integer; jpayne@69: PyObject *__pyx_kp_u_Invalid_error_string_s; jpayne@69: PyObject *__pyx_n_s_KeyError; jpayne@69: PyObject *__pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE; jpayne@69: PyObject *__pyx_kp_u_MISSING_INDEL_ALLELE_REF_BASE_In; jpayne@69: PyObject *__pyx_n_s_MISSING_REF; jpayne@69: PyObject *__pyx_kp_u_MISSING_REF_Reference_allele_mis; jpayne@69: PyObject *__pyx_n_u_MQ; jpayne@69: PyObject *__pyx_n_s_MemoryError; jpayne@69: PyObject *__pyx_n_u_N; jpayne@69: PyObject *__pyx_n_s_NT_ALLELES; jpayne@69: PyObject *__pyx_n_s_NT_GENOTYPES; jpayne@69: PyObject *__pyx_n_s_NT_NR_ALLELES; jpayne@69: PyObject *__pyx_n_s_NT_NUMBER; jpayne@69: PyObject *__pyx_n_s_NT_PHASED_GENOTYPES; jpayne@69: PyObject *__pyx_n_s_NT_UNKNOWN; jpayne@69: PyObject *__pyx_n_s_NotImplementedError; jpayne@69: PyObject *__pyx_kp_u_Number; jpayne@69: PyObject *__pyx_n_u_Number_2; jpayne@69: PyObject *__pyx_n_b_PASS; jpayne@69: PyObject *__pyx_n_u_PASS; jpayne@69: PyObject *__pyx_n_u_PL; jpayne@69: PyObject *__pyx_n_u_POS; jpayne@69: PyObject *__pyx_n_s_POS_NOT_NUMERICAL; jpayne@69: PyObject *__pyx_kp_u_POS_NOT_NUMERICAL_Position_colum; jpayne@69: PyObject *__pyx_n_s_POS_NOT_POSITIVE; jpayne@69: PyObject *__pyx_kp_u_POS_NOT_POSITIVE_Position_field; jpayne@69: PyObject *__pyx_n_u_PQ; jpayne@69: PyObject *__pyx_n_u_PS; jpayne@69: PyObject *__pyx_kp_u_Phase_set; jpayne@69: PyObject *__pyx_kp_u_Phasing_quality; jpayne@69: PyObject *__pyx_kp_u_Phred_scaled_genotype_likelihood; jpayne@69: PyObject *__pyx_n_s_PickleError; jpayne@69: PyObject *__pyx_n_u_QUAL; jpayne@69: PyObject *__pyx_n_s_QUAL_NOT_NUMERICAL; jpayne@69: PyObject *__pyx_kp_u_QUAL_NOT_NUMERICAL_Quality_field; jpayne@69: PyObject *__pyx_n_u_REF; jpayne@69: PyObject *__pyx_kp_u_RMS_mapping_quality; jpayne@69: PyObject *__pyx_kp_u_Read_depth_at_this_position_for; jpayne@69: PyObject *__pyx_kp_u_Required_key_s_not_found_in_data; jpayne@69: PyObject *__pyx_kp_u_Sample_Genotype_Filter; jpayne@69: PyObject *__pyx_n_s_StopIteration; jpayne@69: PyObject *__pyx_n_u_String; jpayne@69: PyObject *__pyx_n_s_Tabixfile; jpayne@69: PyObject *__pyx_kp_u_Type; jpayne@69: PyObject *__pyx_n_s_TypeError; jpayne@69: PyObject *__pyx_n_u_Type_2; jpayne@69: PyObject *__pyx_n_s_UNKNOWN_CHAR_IN_REF; jpayne@69: PyObject *__pyx_kp_u_UNKNOWN_CHAR_IN_REF_Unknown_char; jpayne@69: PyObject *__pyx_n_s_UNKNOWN_FORMAT_STRING; jpayne@69: PyObject *__pyx_kp_u_UNKNOWN_FORMAT_STRING_Unknown_fi; jpayne@69: PyObject *__pyx_kp_u_Undefined_tag; jpayne@69: PyObject *__pyx_kp_u_Unknown_number_type_encountered; jpayne@69: PyObject *__pyx_n_s_V33_BAD_ALLELE; jpayne@69: PyObject *__pyx_kp_u_V33_BAD_ALLELE_Cannot_interpret; jpayne@69: PyObject *__pyx_n_s_V33_BAD_REF; jpayne@69: PyObject *__pyx_kp_u_V33_BAD_REF_Reference_should_be; jpayne@69: PyObject *__pyx_n_s_V33_UNMATCHED_DELETION; jpayne@69: PyObject *__pyx_kp_u_V33_UNMATCHED_DELETION_Deleted_s; jpayne@69: PyObject *__pyx_n_s_V40_BAD_ALLELE; jpayne@69: PyObject *__pyx_kp_u_V40_BAD_ALLELE_Bad_allele_found; jpayne@69: PyObject *__pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD; jpayne@69: PyObject *__pyx_kp_u_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2; jpayne@69: PyObject *__pyx_n_s_V40_MISSING_ANGLE_BRACKETS; jpayne@69: PyObject *__pyx_kp_u_V40_MISSING_ANGLE_BRACKETS_Forma; jpayne@69: PyObject *__pyx_n_s_VCF; jpayne@69: PyObject *__pyx_n_u_VCF; jpayne@69: PyObject *__pyx_n_s_VCFRecord; jpayne@69: PyObject *__pyx_n_u_VCFRecord; jpayne@69: PyObject *__pyx_n_s_VCFRecord___reduce_cython; jpayne@69: PyObject *__pyx_n_s_VCFRecord___setstate_cython; jpayne@69: PyObject *__pyx_n_s_VCFRecord_error; jpayne@69: PyObject *__pyx_n_s_VCF___del; jpayne@69: PyObject *__pyx_n_s_VCF___init; jpayne@69: PyObject *__pyx_n_s_VCF__add_definition; jpayne@69: PyObject *__pyx_n_s_VCF__parse; jpayne@69: PyObject *__pyx_n_s_VCF__parse_header; jpayne@69: PyObject *__pyx_n_s_VCF_close; jpayne@69: PyObject *__pyx_n_s_VCF_compare_calls; jpayne@69: PyObject *__pyx_n_s_VCF_connect; jpayne@69: PyObject *__pyx_n_s_VCF_convertGT; jpayne@69: PyObject *__pyx_n_s_VCF_convertGTback; jpayne@69: PyObject *__pyx_n_s_VCF_enter_default_format; jpayne@69: PyObject *__pyx_n_s_VCF_error; jpayne@69: PyObject *__pyx_n_s_VCF_fetch; jpayne@69: PyObject *__pyx_n_s_VCF_format_format; jpayne@69: PyObject *__pyx_n_s_VCF_format_formatdata; jpayne@69: PyObject *__pyx_n_s_VCF_get_expected; jpayne@69: PyObject *__pyx_n_s_VCF_getfilter; jpayne@69: PyObject *__pyx_n_s_VCF_getformat; jpayne@69: PyObject *__pyx_n_s_VCF_getheader; jpayne@69: PyObject *__pyx_n_s_VCF_getinfo; jpayne@69: PyObject *__pyx_n_s_VCF_getsamples; jpayne@69: PyObject *__pyx_n_s_VCF_ignoreerror; jpayne@69: PyObject *__pyx_n_s_VCF_inregion; jpayne@69: PyObject *__pyx_n_s_VCF_parse; jpayne@69: PyObject *__pyx_n_s_VCF_parse_data; jpayne@69: PyObject *__pyx_n_s_VCF_parse_format; jpayne@69: PyObject *__pyx_n_s_VCF_parse_formatdata; jpayne@69: PyObject *__pyx_n_s_VCF_parse_header; jpayne@69: PyObject *__pyx_n_s_VCF_parse_heading; jpayne@69: PyObject *__pyx_kp_u_VCF_says; jpayne@69: PyObject *__pyx_n_s_VCF_setfilter; jpayne@69: PyObject *__pyx_n_s_VCF_setformat; jpayne@69: PyObject *__pyx_n_s_VCF_setheader; jpayne@69: PyObject *__pyx_n_s_VCF_setinfo; jpayne@69: PyObject *__pyx_n_s_VCF_setreference; jpayne@69: PyObject *__pyx_n_s_VCF_setregions; jpayne@69: PyObject *__pyx_n_s_VCF_setsamples; jpayne@69: PyObject *__pyx_n_s_VCF_setversion; jpayne@69: PyObject *__pyx_n_s_VCF_validate; jpayne@69: PyObject *__pyx_n_s_VCF_warnerror; jpayne@69: PyObject *__pyx_n_s_VCF_write; jpayne@69: PyObject *__pyx_n_s_VCF_write_data; jpayne@69: PyObject *__pyx_n_s_VCF_write_header; jpayne@69: PyObject *__pyx_n_s_VCF_write_heading; jpayne@69: PyObject *__pyx_n_s_VCF_writeheader; jpayne@69: PyObject *__pyx_kp_u_VCFv3_3; jpayne@69: PyObject *__pyx_kp_u_VCFv4_0; jpayne@69: PyObject *__pyx_kp_u_VCFv4_1; jpayne@69: PyObject *__pyx_kp_u_VCFv4_2; jpayne@69: PyObject *__pyx_n_s_ValueError; jpayne@69: PyObject *__pyx_n_s_WRONG_REF; jpayne@69: PyObject *__pyx_kp_u_WRONG_REF_Wrong_reference_s; jpayne@69: PyObject *__pyx_n_u_Warning; jpayne@69: PyObject *__pyx_n_s_ZERO_FOR_NON_FLAG_FIELD; jpayne@69: PyObject *__pyx_kp_u_ZERO_FOR_NON_FLAG_FIELD_number_s; jpayne@69: PyObject *__pyx_n_s_ZERO_LENGTH_ALLELE; jpayne@69: PyObject *__pyx_kp_u_ZERO_LENGTH_ALLELE_Found_zero_le; jpayne@69: PyObject *__pyx_kp_u__10; jpayne@69: PyObject *__pyx_kp_u__11; jpayne@69: PyObject *__pyx_kp_u__12; jpayne@69: PyObject *__pyx_kp_u__13; jpayne@69: PyObject *__pyx_n_s__139; jpayne@69: PyObject *__pyx_kp_u__14; jpayne@69: PyObject *__pyx_kp_u__15; jpayne@69: PyObject *__pyx_kp_u__16; jpayne@69: PyObject *__pyx_kp_u__19; jpayne@69: PyObject *__pyx_kp_u__2; jpayne@69: PyObject *__pyx_kp_u__23; jpayne@69: PyObject *__pyx_kp_u__24; jpayne@69: PyObject *__pyx_kp_u__25; jpayne@69: PyObject *__pyx_kp_u__27; jpayne@69: PyObject *__pyx_kp_u__3; jpayne@69: PyObject *__pyx_n_s__33; jpayne@69: PyObject *__pyx_kp_u__34; jpayne@69: PyObject *__pyx_kp_u__4; jpayne@69: PyObject *__pyx_kp_b__5; jpayne@69: PyObject *__pyx_kp_u__5; jpayne@69: PyObject *__pyx_kp_u__6; jpayne@69: PyObject *__pyx_kp_u__7; jpayne@69: PyObject *__pyx_kp_u__8; jpayne@69: PyObject *__pyx_n_s_a; jpayne@69: PyObject *__pyx_n_s_add; jpayne@69: PyObject *__pyx_n_s_add_definition; jpayne@69: PyObject *__pyx_n_s_addn; jpayne@69: PyObject *__pyx_n_s_addns; jpayne@69: PyObject *__pyx_n_s_all; jpayne@69: PyObject *__pyx_n_s_allele; jpayne@69: PyObject *__pyx_n_s_alleleRegEx; jpayne@69: PyObject *__pyx_kp_u_alleles; jpayne@69: PyObject *__pyx_n_s_alt; jpayne@69: PyObject *__pyx_n_u_alt; jpayne@69: PyObject *__pyx_n_s_alt1; jpayne@69: PyObject *__pyx_n_s_alt2; jpayne@69: PyObject *__pyx_n_s_append; jpayne@69: PyObject *__pyx_n_s_args; jpayne@69: PyObject *__pyx_n_s_asVCFRecord; jpayne@69: PyObject *__pyx_n_s_asVCFRecord___reduce_cython; jpayne@69: PyObject *__pyx_n_s_asVCFRecord___setstate_cython; jpayne@69: PyObject *__pyx_n_u_ascii; jpayne@69: PyObject *__pyx_n_s_asyncio_coroutines; jpayne@69: PyObject *__pyx_n_s_bisect; jpayne@69: PyObject *__pyx_n_s_blurp; jpayne@69: PyObject *__pyx_n_s_c; jpayne@69: PyObject *__pyx_n_s_chrom; jpayne@69: PyObject *__pyx_n_u_chrom; jpayne@69: PyObject *__pyx_n_s_class_getitem; jpayne@69: PyObject *__pyx_n_s_cline_in_traceback; jpayne@69: PyObject *__pyx_n_s_close; jpayne@69: PyObject *__pyx_n_s_collections; jpayne@69: PyObject *__pyx_n_s_cols; jpayne@69: PyObject *__pyx_n_s_compare_calls; jpayne@69: PyObject *__pyx_n_s_compile; jpayne@69: PyObject *__pyx_n_s_connect; jpayne@69: PyObject *__pyx_n_s_convertGT; jpayne@69: PyObject *__pyx_n_s_convertGTback; jpayne@69: PyObject *__pyx_n_s_copy; jpayne@69: PyObject *__pyx_n_s_copy_2; jpayne@69: PyObject *__pyx_n_s_d; jpayne@69: PyObject *__pyx_n_s_data; jpayne@69: PyObject *__pyx_n_s_datagenerator; jpayne@69: PyObject *__pyx_n_s_deepcopy; jpayne@69: PyObject *__pyx_n_s_defaultdict; jpayne@69: PyObject *__pyx_n_s_del; jpayne@69: PyObject *__pyx_kp_u_deletion_is; jpayne@69: PyObject *__pyx_n_u_descr; jpayne@69: PyObject *__pyx_n_s_description; jpayne@69: PyObject *__pyx_n_s_dict; jpayne@69: PyObject *__pyx_n_s_dict_2; jpayne@69: PyObject *__pyx_n_s_dict_3; jpayne@69: PyObject *__pyx_kp_u_disable; jpayne@69: PyObject *__pyx_n_s_doc; jpayne@69: PyObject *__pyx_n_s_elts; jpayne@69: PyObject *__pyx_kp_u_enable; jpayne@69: PyObject *__pyx_n_s_encoding; jpayne@69: PyObject *__pyx_n_s_end; jpayne@69: PyObject *__pyx_n_s_endswith; jpayne@69: PyObject *__pyx_n_s_enter_default_format; jpayne@69: PyObject *__pyx_n_s_enumerate; jpayne@69: PyObject *__pyx_n_s_err; jpayne@69: PyObject *__pyx_n_s_error; jpayne@69: PyObject *__pyx_n_s_errorlabel; jpayne@69: PyObject *__pyx_n_s_errors; jpayne@69: PyObject *__pyx_n_s_errorstring; jpayne@69: PyObject *__pyx_n_s_errwarn; jpayne@69: PyObject *__pyx_kp_u_expected; jpayne@69: PyObject *__pyx_kp_u_expected_2; jpayne@69: PyObject *__pyx_kp_u_expected_3; jpayne@69: PyObject *__pyx_n_s_expected_4; jpayne@69: PyObject *__pyx_n_s_f; jpayne@69: PyObject *__pyx_n_s_fa; jpayne@69: PyObject *__pyx_n_s_faref; jpayne@69: PyObject *__pyx_n_s_faref_leftflank; jpayne@69: PyObject *__pyx_n_s_fetch; jpayne@69: PyObject *__pyx_n_u_fileformat; jpayne@69: PyObject *__pyx_kp_u_fileformat_VCFv; jpayne@69: PyObject *__pyx_n_s_filename; jpayne@69: PyObject *__pyx_n_s_filter; jpayne@69: PyObject *__pyx_n_s_filter_2; jpayne@69: PyObject *__pyx_n_u_filter_2; jpayne@69: PyObject *__pyx_n_s_find; jpayne@69: PyObject *__pyx_n_s_first; jpayne@69: PyObject *__pyx_n_s_fmt; jpayne@69: PyObject *__pyx_kp_u_for; jpayne@69: PyObject *__pyx_n_s_format; jpayne@69: PyObject *__pyx_n_u_format; jpayne@69: PyObject *__pyx_n_s_format_2; jpayne@69: PyObject *__pyx_n_s_format_format; jpayne@69: PyObject *__pyx_n_s_format_formatdata; jpayne@69: PyObject *__pyx_n_s_formatdict; jpayne@69: PyObject *__pyx_kp_u_found; jpayne@69: PyObject *__pyx_kp_u_gc; jpayne@69: PyObject *__pyx_kp_u_genotypes; jpayne@69: PyObject *__pyx_n_s_get; jpayne@69: PyObject *__pyx_n_s_get_expected; jpayne@69: PyObject *__pyx_n_s_get_sequence; jpayne@69: PyObject *__pyx_n_s_getfilter; jpayne@69: PyObject *__pyx_n_s_getformat; jpayne@69: PyObject *__pyx_n_s_getheader; jpayne@69: PyObject *__pyx_n_s_getinfo; jpayne@69: PyObject *__pyx_n_s_getsamples; jpayne@69: PyObject *__pyx_n_s_getstate; jpayne@69: PyObject *__pyx_kp_u_got; jpayne@69: PyObject *__pyx_n_s_gts; jpayne@69: PyObject *__pyx_n_s_gtsRegEx; jpayne@69: PyObject *__pyx_n_s_have_deletions; jpayne@69: PyObject *__pyx_n_s_header; jpayne@69: PyObject *__pyx_n_s_header_2; jpayne@69: PyObject *__pyx_n_s_headings; jpayne@69: PyObject *__pyx_n_s_i; jpayne@69: PyObject *__pyx_kp_u_id; jpayne@69: PyObject *__pyx_n_s_id_2; jpayne@69: PyObject *__pyx_n_u_id_2; jpayne@69: PyObject *__pyx_kp_u_id_numbertype_number_type_descri; jpayne@69: PyObject *__pyx_n_s_idx; jpayne@69: PyObject *__pyx_n_s_ielts; jpayne@69: PyObject *__pyx_n_s_ignored_errors; jpayne@69: PyObject *__pyx_n_s_ignoreerror; jpayne@69: PyObject *__pyx_n_s_import; jpayne@69: PyObject *__pyx_kp_u_in_line; jpayne@69: PyObject *__pyx_n_s_info; jpayne@69: PyObject *__pyx_n_s_info_2; jpayne@69: PyObject *__pyx_n_u_info_2; jpayne@69: PyObject *__pyx_n_s_init; jpayne@69: PyObject *__pyx_n_s_init_subclass; jpayne@69: PyObject *__pyx_n_s_initializing; jpayne@69: PyObject *__pyx_n_s_inregion; jpayne@69: PyObject *__pyx_n_s_is_coroutine; jpayne@69: PyObject *__pyx_kp_u_isenabled; jpayne@69: PyObject *__pyx_n_s_itemgetter; jpayne@69: PyObject *__pyx_n_s_itervalues; jpayne@69: PyObject *__pyx_n_s_join; jpayne@69: PyObject *__pyx_n_s_k; jpayne@69: PyObject *__pyx_n_s_key; jpayne@69: PyObject *__pyx_n_s_keys; jpayne@69: PyObject *__pyx_n_s_l; jpayne@69: PyObject *__pyx_n_s_label; jpayne@69: PyObject *__pyx_n_s_last; jpayne@69: PyObject *__pyx_n_s_last_line; jpayne@69: PyObject *__pyx_n_s_left; jpayne@69: PyObject *__pyx_n_s_leftalign; jpayne@69: PyObject *__pyx_n_s_leftalign_2; jpayne@69: PyObject *__pyx_n_s_line; jpayne@69: PyObject *__pyx_n_s_line_2; jpayne@69: PyObject *__pyx_n_s_lineno; jpayne@69: PyObject *__pyx_n_s_lineparse; jpayne@69: PyObject *__pyx_n_s_lines; jpayne@69: PyObject *__pyx_n_s_lines_2; jpayne@69: PyObject *__pyx_n_s_longest; jpayne@69: PyObject *__pyx_n_s_main; jpayne@69: PyObject *__pyx_n_s_map; jpayne@69: PyObject *__pyx_n_s_match; jpayne@69: PyObject *__pyx_n_s_metaclass; jpayne@69: PyObject *__pyx_n_s_min; jpayne@69: PyObject *__pyx_n_u_missing; jpayne@69: PyObject *__pyx_n_s_missingvalue; jpayne@69: PyObject *__pyx_n_s_module; jpayne@69: PyObject *__pyx_n_s_movable; jpayne@69: PyObject *__pyx_n_s_mro_entries; jpayne@69: PyObject *__pyx_n_s_n; jpayne@69: PyObject *__pyx_n_s_na; jpayne@69: PyObject *__pyx_n_s_name; jpayne@69: PyObject *__pyx_n_s_namedtuple; jpayne@69: PyObject *__pyx_kp_u_needs_to_be_checked; jpayne@69: PyObject *__pyx_n_s_new; jpayne@69: PyObject *__pyx_n_s_newalts; jpayne@69: PyObject *__pyx_n_s_nmb; jpayne@69: PyObject *__pyx_kp_s_no_default___reduce___due_to_non; jpayne@69: PyObject *__pyx_kp_u_nonref_alleles; jpayne@69: PyObject *__pyx_n_s_number; jpayne@69: PyObject *__pyx_n_u_number; jpayne@69: PyObject *__pyx_n_s_numbertype; jpayne@69: PyObject *__pyx_n_s_object; jpayne@69: PyObject *__pyx_n_s_operator; jpayne@69: PyObject *__pyx_n_s_opt; jpayne@69: PyObject *__pyx_kp_u_output; jpayne@69: PyObject *__pyx_n_s_output_2; jpayne@69: PyObject *__pyx_kp_u_parameters_got; jpayne@69: PyObject *__pyx_n_s_parse; jpayne@69: PyObject *__pyx_n_s_parse_2; jpayne@69: PyObject *__pyx_n_s_parse_data; jpayne@69: PyObject *__pyx_n_s_parse_format; jpayne@69: PyObject *__pyx_n_s_parse_formatdata; jpayne@69: PyObject *__pyx_n_s_parse_header; jpayne@69: PyObject *__pyx_n_s_parse_header_2; jpayne@69: PyObject *__pyx_n_s_parse_heading; jpayne@69: PyObject *__pyx_n_s_parse_regions; jpayne@69: PyObject *__pyx_n_s_parser; jpayne@69: PyObject *__pyx_kp_u_phased_genotypes; jpayne@69: PyObject *__pyx_n_s_pickle; jpayne@69: PyObject *__pyx_n_s_pos; jpayne@69: PyObject *__pyx_n_u_pos; jpayne@69: PyObject *__pyx_n_s_pos1; jpayne@69: PyObject *__pyx_n_s_pos2; jpayne@69: PyObject *__pyx_n_s_prepare; jpayne@69: PyObject *__pyx_n_s_pysam; jpayne@69: PyObject *__pyx_n_s_pysam_libcvcf; jpayne@69: PyObject *__pyx_kp_s_pysam_libcvcf_pyx; jpayne@69: PyObject *__pyx_n_s_pyx_PickleError; jpayne@69: PyObject *__pyx_n_s_pyx_checksum; jpayne@69: PyObject *__pyx_n_s_pyx_result; jpayne@69: PyObject *__pyx_n_s_pyx_state; jpayne@69: PyObject *__pyx_n_s_pyx_type; jpayne@69: PyObject *__pyx_n_s_pyx_unpickle_asVCFRecord; jpayne@69: PyObject *__pyx_n_s_pyx_vtable; jpayne@69: PyObject *__pyx_n_s_qual; jpayne@69: PyObject *__pyx_n_u_qual; jpayne@69: PyObject *__pyx_n_s_qualname; jpayne@69: PyObject *__pyx_n_s_r; jpayne@69: PyObject *__pyx_n_s_range; jpayne@69: PyObject *__pyx_n_s_re; jpayne@69: PyObject *__pyx_n_s_record; jpayne@69: PyObject *__pyx_n_s_reduce; jpayne@69: PyObject *__pyx_n_s_reduce_cython; jpayne@69: PyObject *__pyx_n_s_reduce_ex; jpayne@69: PyObject *__pyx_n_s_ref; jpayne@69: PyObject *__pyx_n_u_ref; jpayne@69: PyObject *__pyx_n_s_ref1; jpayne@69: PyObject *__pyx_n_s_ref2; jpayne@69: PyObject *__pyx_n_s_reference; jpayne@69: PyObject *__pyx_n_s_reference_2; jpayne@69: PyObject *__pyx_kp_u_reference_is; jpayne@69: PyObject *__pyx_kp_u_reference_is_2; jpayne@69: PyObject *__pyx_n_s_region; jpayne@69: PyObject *__pyx_n_s_regions; jpayne@69: PyObject *__pyx_n_s_regions_2; jpayne@69: PyObject *__pyx_n_s_replace; jpayne@69: PyObject *__pyx_n_s_required; jpayne@69: PyObject *__pyx_n_s_required_2; jpayne@69: PyObject *__pyx_n_s_rest; jpayne@69: PyObject *__pyx_n_s_result; jpayne@69: PyObject *__pyx_n_s_s; jpayne@69: PyObject *__pyx_n_s_sample; jpayne@69: PyObject *__pyx_n_s_sample2column; jpayne@69: PyObject *__pyx_n_s_samples; jpayne@69: PyObject *__pyx_kp_u_samples_2; jpayne@69: PyObject *__pyx_n_s_samples_3; jpayne@69: PyObject *__pyx_n_s_sdata; jpayne@69: PyObject *__pyx_n_s_self; jpayne@69: PyObject *__pyx_n_s_send; jpayne@69: PyObject *__pyx_n_s_separator; jpayne@69: PyObject *__pyx_n_s_sequence; jpayne@69: PyObject *__pyx_n_s_set_name; jpayne@69: PyObject *__pyx_n_s_setfilter; jpayne@69: PyObject *__pyx_n_s_setformat; jpayne@69: PyObject *__pyx_n_s_setheader; jpayne@69: PyObject *__pyx_n_s_setinfo; jpayne@69: PyObject *__pyx_n_s_setreference; jpayne@69: PyObject *__pyx_n_s_setregions; jpayne@69: PyObject *__pyx_n_s_setsamples; jpayne@69: PyObject *__pyx_n_s_setstate; jpayne@69: PyObject *__pyx_n_s_setstate_cython; jpayne@69: PyObject *__pyx_n_s_setversion; jpayne@69: PyObject *__pyx_n_s_shortest; jpayne@69: PyObject *__pyx_n_s_spec; jpayne@69: PyObject *__pyx_n_s_split; jpayne@69: PyObject *__pyx_n_s_start; jpayne@69: PyObject *__pyx_n_s_startswith; jpayne@69: PyObject *__pyx_n_s_state; jpayne@69: PyObject *__pyx_kp_u_sth_entry_not_found; jpayne@69: PyObject *__pyx_n_s_stream; jpayne@69: PyObject *__pyx_n_s_string; jpayne@69: PyObject *__pyx_kp_s_stringsource; jpayne@69: PyObject *__pyx_n_s_strip; jpayne@69: PyObject *__pyx_n_s_super; jpayne@69: PyObject *__pyx_n_s_sys; jpayne@69: PyObject *__pyx_n_s_t; jpayne@69: PyObject *__pyx_n_s_tabixfile; jpayne@69: PyObject *__pyx_n_s_test; jpayne@69: PyObject *__pyx_n_s_throw; jpayne@69: PyObject *__pyx_n_s_type; jpayne@69: PyObject *__pyx_n_u_type; jpayne@69: PyObject *__pyx_n_s_update; jpayne@69: PyObject *__pyx_n_s_upper; jpayne@69: PyObject *__pyx_n_s_use_setstate; jpayne@69: PyObject *__pyx_n_s_v; jpayne@69: PyObject *__pyx_n_s_validate; jpayne@69: PyObject *__pyx_n_s_value; jpayne@69: PyObject *__pyx_n_s_values; jpayne@69: PyObject *__pyx_kp_u_values_in_element; jpayne@69: PyObject *__pyx_n_s_var; jpayne@69: PyObject *__pyx_n_s_vcf; jpayne@69: PyObject *__pyx_n_s_vcffile; jpayne@69: PyObject *__pyx_n_s_version; jpayne@69: PyObject *__pyx_n_s_version_2; jpayne@69: PyObject *__pyx_n_s_warn_errors; jpayne@69: PyObject *__pyx_n_s_warnerror; jpayne@69: PyObject *__pyx_n_s_write; jpayne@69: PyObject *__pyx_n_s_write_data; jpayne@69: PyObject *__pyx_n_s_write_header; jpayne@69: PyObject *__pyx_n_s_write_heading; jpayne@69: PyObject *__pyx_n_s_writeheader; jpayne@69: PyObject *__pyx_n_s_x; jpayne@69: PyObject *__pyx_n_s_y; jpayne@69: PyObject *__pyx_n_s_zip; jpayne@69: PyObject *__pyx_float_0_0; jpayne@69: PyObject *__pyx_int_0; jpayne@69: PyObject *__pyx_int_1; jpayne@69: PyObject *__pyx_int_2; jpayne@69: PyObject *__pyx_int_3; jpayne@69: PyObject *__pyx_int_4; jpayne@69: PyObject *__pyx_int_5; jpayne@69: PyObject *__pyx_int_6; jpayne@69: PyObject *__pyx_int_7; jpayne@69: PyObject *__pyx_int_8; jpayne@69: PyObject *__pyx_int_9; jpayne@69: PyObject *__pyx_int_10; jpayne@69: PyObject *__pyx_int_11; jpayne@69: PyObject *__pyx_int_12; jpayne@69: PyObject *__pyx_int_13; jpayne@69: PyObject *__pyx_int_14; jpayne@69: PyObject *__pyx_int_15; jpayne@69: PyObject *__pyx_int_16; jpayne@69: PyObject *__pyx_int_17; jpayne@69: PyObject *__pyx_int_18; jpayne@69: PyObject *__pyx_int_19; jpayne@69: PyObject *__pyx_int_20; jpayne@69: PyObject *__pyx_int_21; jpayne@69: PyObject *__pyx_int_22; jpayne@69: PyObject *__pyx_int_23; jpayne@69: PyObject *__pyx_int_24; jpayne@69: PyObject *__pyx_int_25; jpayne@69: PyObject *__pyx_int_26; jpayne@69: PyObject *__pyx_int_27; jpayne@69: PyObject *__pyx_int_28; jpayne@69: PyObject *__pyx_int_29; jpayne@69: PyObject *__pyx_int_30; jpayne@69: PyObject *__pyx_int_31; jpayne@69: PyObject *__pyx_int_32; jpayne@69: PyObject *__pyx_int_33; jpayne@69: PyObject *__pyx_int_40; jpayne@69: PyObject *__pyx_int_100; jpayne@69: PyObject *__pyx_int_29527880; jpayne@69: PyObject *__pyx_int_214161357; jpayne@69: PyObject *__pyx_int_239654613; jpayne@69: PyObject *__pyx_int_3000000000; jpayne@69: PyObject *__pyx_int_neg_1; jpayne@69: PyObject *__pyx_slice__9; jpayne@69: PyObject *__pyx_slice__17; jpayne@69: PyObject *__pyx_slice__18; jpayne@69: PyObject *__pyx_slice__20; jpayne@69: PyObject *__pyx_slice__26; jpayne@69: PyObject *__pyx_slice__28; jpayne@69: PyObject *__pyx_tuple__21; jpayne@69: PyObject *__pyx_tuple__22; jpayne@69: PyObject *__pyx_tuple__30; jpayne@69: PyObject *__pyx_tuple__31; jpayne@69: PyObject *__pyx_tuple__32; jpayne@69: PyObject *__pyx_tuple__35; jpayne@69: PyObject *__pyx_tuple__36; jpayne@69: PyObject *__pyx_tuple__37; jpayne@69: PyObject *__pyx_tuple__39; jpayne@69: PyObject *__pyx_tuple__41; jpayne@69: PyObject *__pyx_tuple__42; jpayne@69: PyObject *__pyx_tuple__44; jpayne@69: PyObject *__pyx_tuple__45; jpayne@69: PyObject *__pyx_tuple__47; jpayne@69: PyObject *__pyx_tuple__49; jpayne@69: PyObject *__pyx_tuple__52; jpayne@69: PyObject *__pyx_tuple__53; jpayne@69: PyObject *__pyx_tuple__54; jpayne@69: PyObject *__pyx_tuple__56; jpayne@69: PyObject *__pyx_tuple__57; jpayne@69: PyObject *__pyx_tuple__59; jpayne@69: PyObject *__pyx_tuple__61; jpayne@69: PyObject *__pyx_tuple__62; jpayne@69: PyObject *__pyx_tuple__64; jpayne@69: PyObject *__pyx_tuple__66; jpayne@69: PyObject *__pyx_tuple__68; jpayne@69: PyObject *__pyx_tuple__70; jpayne@69: PyObject *__pyx_tuple__71; jpayne@69: PyObject *__pyx_tuple__73; jpayne@69: PyObject *__pyx_tuple__75; jpayne@69: PyObject *__pyx_tuple__77; jpayne@69: PyObject *__pyx_tuple__79; jpayne@69: PyObject *__pyx_tuple__81; jpayne@69: PyObject *__pyx_tuple__83; jpayne@69: PyObject *__pyx_tuple__85; jpayne@69: PyObject *__pyx_tuple__87; jpayne@69: PyObject *__pyx_tuple__89; jpayne@69: PyObject *__pyx_tuple__91; jpayne@69: PyObject *__pyx_tuple__93; jpayne@69: PyObject *__pyx_tuple__95; jpayne@69: PyObject *__pyx_tuple__97; jpayne@69: PyObject *__pyx_tuple__100; jpayne@69: PyObject *__pyx_tuple__103; jpayne@69: PyObject *__pyx_tuple__106; jpayne@69: PyObject *__pyx_tuple__109; jpayne@69: PyObject *__pyx_tuple__111; jpayne@69: PyObject *__pyx_tuple__113; jpayne@69: PyObject *__pyx_tuple__115; jpayne@69: PyObject *__pyx_tuple__117; jpayne@69: PyObject *__pyx_tuple__120; jpayne@69: PyObject *__pyx_tuple__122; jpayne@69: PyObject *__pyx_tuple__125; jpayne@69: PyObject *__pyx_tuple__127; jpayne@69: PyObject *__pyx_tuple__129; jpayne@69: PyObject *__pyx_tuple__132; jpayne@69: PyObject *__pyx_tuple__134; jpayne@69: PyObject *__pyx_tuple__135; jpayne@69: PyObject *__pyx_tuple__137; jpayne@69: PyObject *__pyx_codeobj__29; jpayne@69: PyObject *__pyx_codeobj__38; jpayne@69: PyObject *__pyx_codeobj__40; jpayne@69: PyObject *__pyx_codeobj__43; jpayne@69: PyObject *__pyx_codeobj__46; jpayne@69: PyObject *__pyx_codeobj__48; jpayne@69: PyObject *__pyx_codeobj__50; jpayne@69: PyObject *__pyx_codeobj__51; jpayne@69: PyObject *__pyx_codeobj__55; jpayne@69: PyObject *__pyx_codeobj__58; jpayne@69: PyObject *__pyx_codeobj__60; jpayne@69: PyObject *__pyx_codeobj__63; jpayne@69: PyObject *__pyx_codeobj__65; jpayne@69: PyObject *__pyx_codeobj__67; jpayne@69: PyObject *__pyx_codeobj__69; jpayne@69: PyObject *__pyx_codeobj__72; jpayne@69: PyObject *__pyx_codeobj__74; jpayne@69: PyObject *__pyx_codeobj__76; jpayne@69: PyObject *__pyx_codeobj__78; jpayne@69: PyObject *__pyx_codeobj__80; jpayne@69: PyObject *__pyx_codeobj__82; jpayne@69: PyObject *__pyx_codeobj__84; jpayne@69: PyObject *__pyx_codeobj__86; jpayne@69: PyObject *__pyx_codeobj__88; jpayne@69: PyObject *__pyx_codeobj__90; jpayne@69: PyObject *__pyx_codeobj__92; jpayne@69: PyObject *__pyx_codeobj__94; jpayne@69: PyObject *__pyx_codeobj__96; jpayne@69: PyObject *__pyx_codeobj__98; jpayne@69: PyObject *__pyx_codeobj__99; jpayne@69: PyObject *__pyx_codeobj__101; jpayne@69: PyObject *__pyx_codeobj__102; jpayne@69: PyObject *__pyx_codeobj__104; jpayne@69: PyObject *__pyx_codeobj__105; jpayne@69: PyObject *__pyx_codeobj__107; jpayne@69: PyObject *__pyx_codeobj__108; jpayne@69: PyObject *__pyx_codeobj__110; jpayne@69: PyObject *__pyx_codeobj__112; jpayne@69: PyObject *__pyx_codeobj__114; jpayne@69: PyObject *__pyx_codeobj__116; jpayne@69: PyObject *__pyx_codeobj__118; jpayne@69: PyObject *__pyx_codeobj__119; jpayne@69: PyObject *__pyx_codeobj__121; jpayne@69: PyObject *__pyx_codeobj__123; jpayne@69: PyObject *__pyx_codeobj__124; jpayne@69: PyObject *__pyx_codeobj__126; jpayne@69: PyObject *__pyx_codeobj__128; jpayne@69: PyObject *__pyx_codeobj__130; jpayne@69: PyObject *__pyx_codeobj__131; jpayne@69: PyObject *__pyx_codeobj__133; jpayne@69: PyObject *__pyx_codeobj__136; jpayne@69: PyObject *__pyx_codeobj__138; jpayne@69: } __pyx_mstate; jpayne@69: jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #ifdef __cplusplus jpayne@69: namespace { jpayne@69: extern struct PyModuleDef __pyx_moduledef; jpayne@69: } /* anonymous namespace */ jpayne@69: #else jpayne@69: static struct PyModuleDef __pyx_moduledef; jpayne@69: #endif jpayne@69: jpayne@69: #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) jpayne@69: jpayne@69: #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) jpayne@69: jpayne@69: #define __pyx_m (PyState_FindModule(&__pyx_moduledef)) jpayne@69: #else jpayne@69: static __pyx_mstate __pyx_mstate_global_static = jpayne@69: #ifdef __cplusplus jpayne@69: {}; jpayne@69: #else jpayne@69: {0}; jpayne@69: #endif jpayne@69: static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; jpayne@69: #endif jpayne@69: /* #### Code section: module_state_clear ### */ jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: static int __pyx_m_clear(PyObject *m) { jpayne@69: __pyx_mstate *clear_module_state = __pyx_mstate(m); jpayne@69: if (!clear_module_state) return 0; jpayne@69: Py_CLEAR(clear_module_state->__pyx_d); jpayne@69: Py_CLEAR(clear_module_state->__pyx_b); jpayne@69: Py_CLEAR(clear_module_state->__pyx_cython_runtime); jpayne@69: Py_CLEAR(clear_module_state->__pyx_empty_tuple); jpayne@69: Py_CLEAR(clear_module_state->__pyx_empty_bytes); jpayne@69: Py_CLEAR(clear_module_state->__pyx_empty_unicode); jpayne@69: #ifdef __Pyx_CyFunction_USED jpayne@69: Py_CLEAR(clear_module_state->__pyx_CyFunctionType); jpayne@69: #endif jpayne@69: #ifdef __Pyx_FusedFunction_USED jpayne@69: Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); jpayne@69: #endif jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixFile); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_Parser); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asTuple); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asGTF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asGFF3); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asBed); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asVCF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixIterator); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIterator); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorHead); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_Tabixfile); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_BedProxy); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_5array_array); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcvcf_VCFRecord); jpayne@69: Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcvcf_VCFRecord); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcvcf_asVCFRecord); jpayne@69: Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcvcf_asVCFRecord); jpayne@69: Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse); jpayne@69: Py_CLEAR(clear_module_state->__pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_b_0); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_0); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_A); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_ACGTN); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ACGTN_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_ALT); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_BADLY_FORMATTED_FORMAT_STRING_Fo); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_BADLY_FORMATTED_HEADING); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_BADLY_FORMATTED_HEADING_Did_not); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_BAD_CHR_TAG_Error_calculating_ch); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_BAD_GENOTYPE); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_BAD_GENOTYPE_Cannot_parse_genoty); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_BAD_NUMBER_OF_COLUMNS); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_BAD_NUMBER_OF_COLUMNS_Wrong_numb); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_BAD_NUMBER_OF_PARAMETERS); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_BAD_NUMBER_OF_PARAMETERS_Found_u); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_BAD_NUMBER_OF_VALUES); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_BAD_NUMBER_OF_VALUES_Found_too_m); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_CHROM); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Can_only_handle_v3_3_and_v4_0_VC); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Character); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Conditional_genotype_quality); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_D); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_DP); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Description); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Description_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Don_t_understand_region_string_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_EC); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ERROR_FLAG_HAS_VALUE); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ERROR_FLAG_HAS_VALUE_Flag_fields); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ERROR_FORMAT_NOT_CHAR); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ERROR_FORMAT_NOT_CHAR_Eexpected); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ERROR_FORMAT_NOT_INTEGER); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ERROR_FORMAT_NOT_INTEGER_Expecte); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ERROR_FORMAT_NOT_NUMERICAL_Expec); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ERROR_INFO_STRING); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ERROR_INFO_STRING_Error_while_pa); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ERROR_TRAILING_DATA); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ERROR_TRAILING_DATA_Numerical_fi); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ERROR_UNKNOWN_KEY); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ERROR_UNKNOWN_KEY_Unknown_key_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Error); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Expected_alternate_allel_counts); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_FILTER); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_FILTER_NOT_DEFINED); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_FILTER_NOT_DEFINED_Identifier_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_FORMAT); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_FORMAT); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_FORMAT_MISSING_QUOTES); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_FORMAT_MISSING_QUOTES_Descriptio); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_FORMAT_NOT_DEFINED); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_FORMAT_NOT_DEFINED_Identifier_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_FT); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Flag); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Float); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_G); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_GL); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_GLE); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_GP); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_GQ); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_GT); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_GTdata); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_GTstring); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Genotype); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Genotype_Quality); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Genotype_likelihoods); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Genotype_posterior_probabilities); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_HEADING_NOT_SEPARATED_BY_TABS_He); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_HQ); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Haplotype_Quality); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_I); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ID); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_ID_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_INFO); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Integer); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_error_string_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_KeyError); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_MISSING_INDEL_ALLELE_REF_BASE_In); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_MISSING_REF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_MISSING_REF_Reference_allele_mis); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_MQ); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_N); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_NT_ALLELES); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_NT_GENOTYPES); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_NT_NR_ALLELES); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_NT_NUMBER); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_NT_PHASED_GENOTYPES); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_NT_UNKNOWN); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Number); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Number_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_b_PASS); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_PASS); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_PL); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_POS); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_POS_NOT_NUMERICAL); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_POS_NOT_NUMERICAL_Position_colum); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_POS_NOT_POSITIVE); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_POS_NOT_POSITIVE_Position_field); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_PQ); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_PS); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Phase_set); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Phasing_quality); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Phred_scaled_genotype_likelihood); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_PickleError); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_QUAL); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_QUAL_NOT_NUMERICAL); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_QUAL_NOT_NUMERICAL_Quality_field); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_REF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_RMS_mapping_quality); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Read_depth_at_this_position_for); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Required_key_s_not_found_in_data); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Sample_Genotype_Filter); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_String); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_Tabixfile); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Type); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Type_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_UNKNOWN_CHAR_IN_REF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_UNKNOWN_CHAR_IN_REF_Unknown_char); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_UNKNOWN_FORMAT_STRING); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_UNKNOWN_FORMAT_STRING_Unknown_fi); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Undefined_tag); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_Unknown_number_type_encountered); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_V33_BAD_ALLELE); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_V33_BAD_ALLELE_Cannot_interpret); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_V33_BAD_REF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_V33_BAD_REF_Reference_should_be); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_V33_UNMATCHED_DELETION); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_V33_UNMATCHED_DELETION_Deleted_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_V40_BAD_ALLELE); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_V40_BAD_ALLELE_Bad_allele_found); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_V40_MISSING_ANGLE_BRACKETS); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_V40_MISSING_ANGLE_BRACKETS_Forma); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_VCF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCFRecord); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_VCFRecord); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCFRecord___reduce_cython); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCFRecord___setstate_cython); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCFRecord_error); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF___del); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF___init); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF__add_definition); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF__parse); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF__parse_header); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_close); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_compare_calls); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_connect); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_convertGT); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_convertGTback); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_enter_default_format); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_error); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_fetch); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_format_format); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_format_formatdata); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_get_expected); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_getfilter); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_getformat); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_getheader); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_getinfo); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_getsamples); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_ignoreerror); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_inregion); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_parse); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_parse_data); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_parse_format); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_parse_formatdata); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_parse_header); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_parse_heading); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_VCF_says); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_setfilter); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_setformat); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_setheader); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_setinfo); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_setreference); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_setregions); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_setsamples); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_setversion); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_validate); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_warnerror); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_write); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_write_data); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_write_header); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_write_heading); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_VCF_writeheader); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_VCFv3_3); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_VCFv4_0); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_VCFv4_1); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_VCFv4_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ValueError); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_WRONG_REF); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_WRONG_REF_Wrong_reference_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_Warning); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ZERO_FOR_NON_FLAG_FIELD); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ZERO_FOR_NON_FLAG_FIELD_number_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ZERO_LENGTH_ALLELE); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_ZERO_LENGTH_ALLELE_Found_zero_le); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__10); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__11); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__12); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__13); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s__139); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__14); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__15); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__16); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__19); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__23); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__24); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__25); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__27); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__3); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s__33); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__34); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__4); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_b__5); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__5); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__6); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__7); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u__8); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_a); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_add); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_add_definition); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_addn); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_addns); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_all); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_allele); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_alleleRegEx); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_alleles); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_alt); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_alt); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_alt1); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_alt2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_append); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_args); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_asVCFRecord); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_asVCFRecord___reduce_cython); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_asVCFRecord___setstate_cython); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_ascii); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_bisect); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_blurp); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_c); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_chrom); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_chrom); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_close); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_collections); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_cols); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_compare_calls); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_compile); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_connect); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_convertGT); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_convertGTback); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_copy); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_copy_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_d); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_data); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_datagenerator); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_deepcopy); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_defaultdict); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_del); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_deletion_is); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_descr); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_description); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_dict); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_dict_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_dict_3); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_disable); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_doc); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_elts); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_enable); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_encoding); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_end); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_endswith); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_enter_default_format); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_enumerate); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_err); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_error); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_errorlabel); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_errors); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_errorstring); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_errwarn); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_expected); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_expected_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_expected_3); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_expected_4); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_f); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_fa); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_faref); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_faref_leftflank); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_fetch); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_fileformat); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_fileformat_VCFv); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_filename); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_filter); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_filter_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_filter_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_find); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_first); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_fmt); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_for); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_format); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_format); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_format_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_format_format); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_format_formatdata); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_formatdict); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_found); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_gc); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_genotypes); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_get); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_get_expected); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_get_sequence); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_getfilter); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_getformat); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_getheader); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_getinfo); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_getsamples); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_getstate); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_got); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_gts); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_gtsRegEx); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_have_deletions); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_header); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_header_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_headings); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_i); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_id); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_id_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_id_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_id_numbertype_number_type_descri); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_idx); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ielts); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ignored_errors); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ignoreerror); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_import); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_in_line); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_info); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_info_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_info_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_init); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_initializing); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_inregion); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_itemgetter); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_itervalues); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_join); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_k); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_key); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_keys); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_l); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_label); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_last); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_last_line); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_left); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_leftalign); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_leftalign_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_line); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_line_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_lineno); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_lineparse); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_lines); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_lines_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_longest); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_main); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_map); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_match); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_metaclass); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_min); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_missing); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_missingvalue); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_module); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_movable); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_n); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_na); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_name); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_namedtuple); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_needs_to_be_checked); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_new); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_newalts); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_nmb); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_nonref_alleles); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_number); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_number); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_numbertype); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_object); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_operator); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_opt); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_output); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_output_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_parameters_got); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse_data); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse_format); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse_formatdata); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse_header); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse_header_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse_heading); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parse_regions); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_parser); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_phased_genotypes); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pickle); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pos); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_pos); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pos1); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pos2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_prepare); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pysam); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pysam_libcvcf); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_s_pysam_libcvcf_pyx); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asVCFRecord); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_qual); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_qual); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_qualname); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_r); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_range); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_re); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_record); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_reduce); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ref); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_ref); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ref1); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_ref2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_reference); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_reference_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_reference_is); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_reference_is_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_region); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_regions); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_regions_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_replace); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_required); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_required_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_rest); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_result); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_s); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_sample); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_sample2column); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_samples); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_samples_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_samples_3); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_sdata); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_self); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_send); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_separator); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_sequence); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_set_name); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setfilter); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setformat); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setheader); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setinfo); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setreference); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setregions); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setsamples); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setstate); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_setversion); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_shortest); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_spec); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_split); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_start); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_startswith); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_state); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_sth_entry_not_found); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_stream); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_string); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_strip); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_super); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_sys); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_t); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_tabixfile); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_test); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_throw); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_type); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_u_type); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_update); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_upper); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_v); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_validate); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_value); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_values); jpayne@69: Py_CLEAR(clear_module_state->__pyx_kp_u_values_in_element); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_var); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_vcf); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_vcffile); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_version); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_version_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_warn_errors); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_warnerror); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_write); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_write_data); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_write_header); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_write_heading); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_writeheader); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_x); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_y); jpayne@69: Py_CLEAR(clear_module_state->__pyx_n_s_zip); jpayne@69: Py_CLEAR(clear_module_state->__pyx_float_0_0); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_0); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_1); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_2); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_3); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_4); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_5); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_6); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_7); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_8); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_9); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_10); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_11); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_12); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_13); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_14); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_15); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_16); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_17); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_18); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_19); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_20); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_21); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_22); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_23); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_24); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_25); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_26); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_27); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_28); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_29); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_30); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_31); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_32); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_33); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_40); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_100); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_29527880); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_214161357); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_239654613); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_3000000000); jpayne@69: Py_CLEAR(clear_module_state->__pyx_int_neg_1); jpayne@69: Py_CLEAR(clear_module_state->__pyx_slice__9); jpayne@69: Py_CLEAR(clear_module_state->__pyx_slice__17); jpayne@69: Py_CLEAR(clear_module_state->__pyx_slice__18); jpayne@69: Py_CLEAR(clear_module_state->__pyx_slice__20); jpayne@69: Py_CLEAR(clear_module_state->__pyx_slice__26); jpayne@69: Py_CLEAR(clear_module_state->__pyx_slice__28); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__21); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__22); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__30); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__31); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__32); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__35); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__36); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__37); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__39); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__41); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__42); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__44); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__45); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__47); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__49); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__52); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__53); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__54); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__56); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__57); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__59); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__61); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__62); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__64); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__66); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__68); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__70); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__71); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__73); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__75); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__77); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__79); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__81); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__83); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__85); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__87); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__89); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__91); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__93); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__95); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__97); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__100); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__103); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__106); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__109); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__111); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__113); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__115); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__117); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__120); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__122); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__125); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__127); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__129); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__132); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__134); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__135); jpayne@69: Py_CLEAR(clear_module_state->__pyx_tuple__137); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__29); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__38); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__40); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__43); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__46); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__48); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__50); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__51); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__55); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__58); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__60); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__63); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__65); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__67); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__69); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__72); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__74); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__76); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__78); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__80); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__82); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__84); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__86); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__88); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__90); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__92); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__94); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__96); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__98); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__99); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__101); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__102); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__104); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__105); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__107); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__108); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__110); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__112); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__114); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__116); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__118); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__119); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__121); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__123); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__124); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__126); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__128); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__130); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__131); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__133); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__136); jpayne@69: Py_CLEAR(clear_module_state->__pyx_codeobj__138); jpayne@69: return 0; jpayne@69: } jpayne@69: #endif jpayne@69: /* #### Code section: module_state_traverse ### */ jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { jpayne@69: __pyx_mstate *traverse_module_state = __pyx_mstate(m); jpayne@69: if (!traverse_module_state) return 0; jpayne@69: Py_VISIT(traverse_module_state->__pyx_d); jpayne@69: Py_VISIT(traverse_module_state->__pyx_b); jpayne@69: Py_VISIT(traverse_module_state->__pyx_cython_runtime); jpayne@69: Py_VISIT(traverse_module_state->__pyx_empty_tuple); jpayne@69: Py_VISIT(traverse_module_state->__pyx_empty_bytes); jpayne@69: Py_VISIT(traverse_module_state->__pyx_empty_unicode); jpayne@69: #ifdef __Pyx_CyFunction_USED jpayne@69: Py_VISIT(traverse_module_state->__pyx_CyFunctionType); jpayne@69: #endif jpayne@69: #ifdef __Pyx_FusedFunction_USED jpayne@69: Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); jpayne@69: #endif jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixFile); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_Parser); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asTuple); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asGTF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asGFF3); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asBed); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asVCF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixIterator); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIterator); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorHead); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_Tabixfile); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_BedProxy); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_5array_array); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcvcf_VCFRecord); jpayne@69: Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcvcf_VCFRecord); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcvcf_asVCFRecord); jpayne@69: Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcvcf_asVCFRecord); jpayne@69: Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse); jpayne@69: Py_VISIT(traverse_module_state->__pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_b_0); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_0); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_A); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_ACGTN); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ACGTN_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_ALT); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_BADLY_FORMATTED_FORMAT_STRING_Fo); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_BADLY_FORMATTED_HEADING); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_BADLY_FORMATTED_HEADING_Did_not); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_BAD_CHR_TAG_Error_calculating_ch); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_BAD_GENOTYPE); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_BAD_GENOTYPE_Cannot_parse_genoty); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_BAD_NUMBER_OF_COLUMNS); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_BAD_NUMBER_OF_COLUMNS_Wrong_numb); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_BAD_NUMBER_OF_PARAMETERS); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_BAD_NUMBER_OF_PARAMETERS_Found_u); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_BAD_NUMBER_OF_VALUES); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_BAD_NUMBER_OF_VALUES_Found_too_m); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_CHROM); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Can_only_handle_v3_3_and_v4_0_VC); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Character); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Conditional_genotype_quality); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_D); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_DP); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Description); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Description_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Don_t_understand_region_string_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_EC); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ERROR_FLAG_HAS_VALUE); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ERROR_FLAG_HAS_VALUE_Flag_fields); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ERROR_FORMAT_NOT_CHAR); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ERROR_FORMAT_NOT_CHAR_Eexpected); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ERROR_FORMAT_NOT_INTEGER); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ERROR_FORMAT_NOT_INTEGER_Expecte); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ERROR_FORMAT_NOT_NUMERICAL_Expec); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ERROR_INFO_STRING); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ERROR_INFO_STRING_Error_while_pa); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ERROR_TRAILING_DATA); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ERROR_TRAILING_DATA_Numerical_fi); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ERROR_UNKNOWN_KEY); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ERROR_UNKNOWN_KEY_Unknown_key_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Error); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Expected_alternate_allel_counts); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_FILTER); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_FILTER_NOT_DEFINED); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_FILTER_NOT_DEFINED_Identifier_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_FORMAT); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_FORMAT); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_FORMAT_MISSING_QUOTES); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_FORMAT_MISSING_QUOTES_Descriptio); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_FORMAT_NOT_DEFINED); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_FORMAT_NOT_DEFINED_Identifier_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_FT); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Flag); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Float); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_G); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_GL); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_GLE); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_GP); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_GQ); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_GT); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_GTdata); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_GTstring); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Genotype); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Genotype_Quality); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Genotype_likelihoods); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Genotype_posterior_probabilities); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_HEADING_NOT_SEPARATED_BY_TABS_He); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_HQ); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Haplotype_Quality); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_I); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ID); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_ID_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_INFO); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Integer); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_error_string_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_KeyError); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_MISSING_INDEL_ALLELE_REF_BASE_In); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_MISSING_REF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_MISSING_REF_Reference_allele_mis); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_MQ); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_N); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_NT_ALLELES); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_NT_GENOTYPES); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_NT_NR_ALLELES); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_NT_NUMBER); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_NT_PHASED_GENOTYPES); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_NT_UNKNOWN); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Number); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Number_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_b_PASS); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_PASS); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_PL); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_POS); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_POS_NOT_NUMERICAL); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_POS_NOT_NUMERICAL_Position_colum); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_POS_NOT_POSITIVE); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_POS_NOT_POSITIVE_Position_field); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_PQ); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_PS); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Phase_set); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Phasing_quality); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Phred_scaled_genotype_likelihood); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_PickleError); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_QUAL); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_QUAL_NOT_NUMERICAL); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_QUAL_NOT_NUMERICAL_Quality_field); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_REF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_RMS_mapping_quality); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Read_depth_at_this_position_for); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Required_key_s_not_found_in_data); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Sample_Genotype_Filter); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_String); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_Tabixfile); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Type); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Type_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_UNKNOWN_CHAR_IN_REF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_UNKNOWN_CHAR_IN_REF_Unknown_char); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_UNKNOWN_FORMAT_STRING); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_UNKNOWN_FORMAT_STRING_Unknown_fi); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Undefined_tag); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_Unknown_number_type_encountered); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_V33_BAD_ALLELE); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_V33_BAD_ALLELE_Cannot_interpret); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_V33_BAD_REF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_V33_BAD_REF_Reference_should_be); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_V33_UNMATCHED_DELETION); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_V33_UNMATCHED_DELETION_Deleted_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_V40_BAD_ALLELE); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_V40_BAD_ALLELE_Bad_allele_found); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_V40_MISSING_ANGLE_BRACKETS); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_V40_MISSING_ANGLE_BRACKETS_Forma); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_VCF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCFRecord); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_VCFRecord); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCFRecord___reduce_cython); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCFRecord___setstate_cython); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCFRecord_error); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF___del); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF___init); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF__add_definition); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF__parse); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF__parse_header); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_close); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_compare_calls); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_connect); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_convertGT); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_convertGTback); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_enter_default_format); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_error); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_fetch); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_format_format); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_format_formatdata); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_get_expected); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_getfilter); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_getformat); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_getheader); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_getinfo); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_getsamples); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_ignoreerror); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_inregion); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_parse); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_parse_data); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_parse_format); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_parse_formatdata); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_parse_header); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_parse_heading); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_VCF_says); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_setfilter); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_setformat); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_setheader); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_setinfo); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_setreference); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_setregions); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_setsamples); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_setversion); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_validate); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_warnerror); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_write); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_write_data); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_write_header); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_write_heading); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_VCF_writeheader); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_VCFv3_3); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_VCFv4_0); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_VCFv4_1); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_VCFv4_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ValueError); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_WRONG_REF); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_WRONG_REF_Wrong_reference_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_Warning); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ZERO_FOR_NON_FLAG_FIELD); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ZERO_FOR_NON_FLAG_FIELD_number_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ZERO_LENGTH_ALLELE); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_ZERO_LENGTH_ALLELE_Found_zero_le); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__10); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__11); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__12); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__13); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s__139); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__14); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__15); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__16); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__19); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__23); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__24); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__25); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__27); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__3); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s__33); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__34); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__4); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_b__5); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__5); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__6); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__7); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u__8); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_a); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_add); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_add_definition); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_addn); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_addns); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_all); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_allele); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_alleleRegEx); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_alleles); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_alt); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_alt); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_alt1); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_alt2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_append); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_args); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_asVCFRecord); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_asVCFRecord___reduce_cython); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_asVCFRecord___setstate_cython); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_ascii); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_bisect); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_blurp); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_c); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_chrom); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_chrom); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_close); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_collections); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_cols); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_compare_calls); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_compile); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_connect); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_convertGT); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_convertGTback); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_copy); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_copy_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_d); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_data); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_datagenerator); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_deepcopy); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_defaultdict); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_del); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_deletion_is); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_descr); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_description); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_dict); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_dict_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_dict_3); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_disable); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_doc); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_elts); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_enable); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_encoding); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_end); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_endswith); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_enter_default_format); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_enumerate); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_err); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_error); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_errorlabel); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_errors); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_errorstring); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_errwarn); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_expected); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_expected_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_expected_3); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_expected_4); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_f); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_fa); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_faref); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_faref_leftflank); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_fetch); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_fileformat); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_fileformat_VCFv); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_filename); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_filter); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_filter_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_filter_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_find); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_first); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_fmt); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_for); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_format); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_format); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_format_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_format_format); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_format_formatdata); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_formatdict); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_found); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_gc); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_genotypes); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_get); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_get_expected); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_get_sequence); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_getfilter); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_getformat); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_getheader); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_getinfo); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_getsamples); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_getstate); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_got); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_gts); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_gtsRegEx); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_have_deletions); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_header); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_header_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_headings); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_i); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_id); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_id_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_id_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_id_numbertype_number_type_descri); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_idx); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ielts); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ignored_errors); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ignoreerror); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_import); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_in_line); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_info); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_info_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_info_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_init); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_initializing); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_inregion); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_itemgetter); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_itervalues); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_join); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_k); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_key); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_keys); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_l); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_label); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_last); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_last_line); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_left); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_leftalign); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_leftalign_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_line); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_line_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_lineno); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_lineparse); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_lines); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_lines_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_longest); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_main); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_map); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_match); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_metaclass); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_min); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_missing); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_missingvalue); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_module); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_movable); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_n); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_na); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_name); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_namedtuple); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_needs_to_be_checked); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_new); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_newalts); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_nmb); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_nonref_alleles); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_number); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_number); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_numbertype); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_object); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_operator); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_opt); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_output); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_output_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_parameters_got); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse_data); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse_format); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse_formatdata); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse_header); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse_header_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse_heading); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parse_regions); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_parser); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_phased_genotypes); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pickle); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pos); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_pos); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pos1); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pos2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_prepare); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pysam); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pysam_libcvcf); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_s_pysam_libcvcf_pyx); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asVCFRecord); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_qual); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_qual); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_qualname); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_r); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_range); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_re); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_record); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_reduce); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ref); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_ref); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ref1); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_ref2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_reference); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_reference_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_reference_is); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_reference_is_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_region); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_regions); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_regions_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_replace); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_required); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_required_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_rest); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_result); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_s); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_sample); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_sample2column); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_samples); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_samples_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_samples_3); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_sdata); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_self); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_send); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_separator); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_sequence); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_set_name); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setfilter); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setformat); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setheader); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setinfo); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setreference); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setregions); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setsamples); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setstate); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_setversion); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_shortest); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_spec); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_split); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_start); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_startswith); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_state); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_sth_entry_not_found); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_stream); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_string); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_strip); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_super); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_sys); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_t); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_tabixfile); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_test); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_throw); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_type); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_u_type); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_update); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_upper); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_v); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_validate); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_value); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_values); jpayne@69: Py_VISIT(traverse_module_state->__pyx_kp_u_values_in_element); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_var); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_vcf); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_vcffile); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_version); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_version_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_warn_errors); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_warnerror); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_write); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_write_data); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_write_header); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_write_heading); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_writeheader); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_x); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_y); jpayne@69: Py_VISIT(traverse_module_state->__pyx_n_s_zip); jpayne@69: Py_VISIT(traverse_module_state->__pyx_float_0_0); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_0); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_1); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_2); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_3); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_4); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_5); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_6); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_7); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_8); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_9); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_10); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_11); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_12); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_13); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_14); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_15); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_16); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_17); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_18); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_19); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_20); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_21); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_22); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_23); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_24); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_25); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_26); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_27); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_28); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_29); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_30); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_31); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_32); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_33); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_40); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_100); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_29527880); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_214161357); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_239654613); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_3000000000); jpayne@69: Py_VISIT(traverse_module_state->__pyx_int_neg_1); jpayne@69: Py_VISIT(traverse_module_state->__pyx_slice__9); jpayne@69: Py_VISIT(traverse_module_state->__pyx_slice__17); jpayne@69: Py_VISIT(traverse_module_state->__pyx_slice__18); jpayne@69: Py_VISIT(traverse_module_state->__pyx_slice__20); jpayne@69: Py_VISIT(traverse_module_state->__pyx_slice__26); jpayne@69: Py_VISIT(traverse_module_state->__pyx_slice__28); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__21); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__22); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__30); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__31); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__32); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__35); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__36); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__37); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__39); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__41); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__42); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__44); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__45); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__47); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__49); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__52); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__53); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__54); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__56); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__57); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__59); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__61); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__62); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__64); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__66); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__68); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__70); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__71); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__73); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__75); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__77); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__79); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__81); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__83); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__85); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__87); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__89); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__91); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__93); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__95); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__97); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__100); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__103); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__106); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__109); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__111); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__113); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__115); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__117); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__120); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__122); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__125); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__127); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__129); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__132); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__134); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__135); jpayne@69: Py_VISIT(traverse_module_state->__pyx_tuple__137); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__29); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__38); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__40); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__43); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__46); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__48); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__50); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__51); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__55); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__58); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__60); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__63); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__65); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__67); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__69); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__72); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__74); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__76); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__78); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__80); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__82); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__84); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__86); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__88); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__90); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__92); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__94); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__96); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__98); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__99); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__101); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__102); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__104); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__105); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__107); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__108); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__110); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__112); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__114); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__116); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__118); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__119); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__121); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__123); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__124); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__126); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__128); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__130); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__131); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__133); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__136); jpayne@69: Py_VISIT(traverse_module_state->__pyx_codeobj__138); jpayne@69: return 0; jpayne@69: } jpayne@69: #endif jpayne@69: /* #### Code section: module_state_defines ### */ jpayne@69: #define __pyx_d __pyx_mstate_global->__pyx_d jpayne@69: #define __pyx_b __pyx_mstate_global->__pyx_b jpayne@69: #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime jpayne@69: #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple jpayne@69: #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes jpayne@69: #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode jpayne@69: #ifdef __Pyx_CyFunction_USED jpayne@69: #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType jpayne@69: #endif jpayne@69: #ifdef __Pyx_FusedFunction_USED jpayne@69: #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType jpayne@69: #endif jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType jpayne@69: #endif jpayne@69: #ifdef __Pyx_IterableCoroutine_USED jpayne@69: #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #define __pyx_ptype_5pysam_10libchtslib_HTSFile __pyx_mstate_global->__pyx_ptype_5pysam_10libchtslib_HTSFile jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #define __pyx_ptype_5pysam_9libctabix_tabix_file_iterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator jpayne@69: #define __pyx_ptype_5pysam_9libctabix_TabixFile __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixFile jpayne@69: #define __pyx_ptype_5pysam_9libctabix_Parser __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_Parser jpayne@69: #define __pyx_ptype_5pysam_9libctabix_asTuple __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asTuple jpayne@69: #define __pyx_ptype_5pysam_9libctabix_asGTF __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asGTF jpayne@69: #define __pyx_ptype_5pysam_9libctabix_asGFF3 __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asGFF3 jpayne@69: #define __pyx_ptype_5pysam_9libctabix_asBed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asBed jpayne@69: #define __pyx_ptype_5pysam_9libctabix_asVCF __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asVCF jpayne@69: #define __pyx_ptype_5pysam_9libctabix_TabixIterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixIterator jpayne@69: #define __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed jpayne@69: #define __pyx_ptype_5pysam_9libctabix_GZIterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIterator jpayne@69: #define __pyx_ptype_5pysam_9libctabix_GZIteratorHead __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIteratorHead jpayne@69: #define __pyx_ptype_5pysam_9libctabix_GZIteratorParsed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed jpayne@69: #define __pyx_ptype_5pysam_9libctabix_Tabixfile __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_Tabixfile jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #define __pyx_ptype_5pysam_16libctabixproxies_TupleProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy jpayne@69: #define __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator jpayne@69: #define __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy jpayne@69: #define __pyx_ptype_5pysam_16libctabixproxies_GTFProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy jpayne@69: #define __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy jpayne@69: #define __pyx_ptype_5pysam_16libctabixproxies_BedProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_BedProxy jpayne@69: #define __pyx_ptype_5pysam_16libctabixproxies_VCFProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #define __pyx_ptype_7cpython_5array_array __pyx_mstate_global->__pyx_ptype_7cpython_5array_array jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: #define __pyx_type_5pysam_7libcvcf_VCFRecord __pyx_mstate_global->__pyx_type_5pysam_7libcvcf_VCFRecord jpayne@69: #define __pyx_type_5pysam_7libcvcf_asVCFRecord __pyx_mstate_global->__pyx_type_5pysam_7libcvcf_asVCFRecord jpayne@69: #define __pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse __pyx_mstate_global->__pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse jpayne@69: #endif jpayne@69: #define __pyx_ptype_5pysam_7libcvcf_VCFRecord __pyx_mstate_global->__pyx_ptype_5pysam_7libcvcf_VCFRecord jpayne@69: #define __pyx_ptype_5pysam_7libcvcf_asVCFRecord __pyx_mstate_global->__pyx_ptype_5pysam_7libcvcf_asVCFRecord jpayne@69: #define __pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse __pyx_mstate_global->__pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse jpayne@69: #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_ jpayne@69: #define __pyx_kp_b_0 __pyx_mstate_global->__pyx_kp_b_0 jpayne@69: #define __pyx_kp_u_0 __pyx_mstate_global->__pyx_kp_u_0 jpayne@69: #define __pyx_n_u_A __pyx_mstate_global->__pyx_n_u_A jpayne@69: #define __pyx_n_u_ACGTN __pyx_mstate_global->__pyx_n_u_ACGTN jpayne@69: #define __pyx_kp_u_ACGTN_2 __pyx_mstate_global->__pyx_kp_u_ACGTN_2 jpayne@69: #define __pyx_n_u_ALT __pyx_mstate_global->__pyx_n_u_ALT jpayne@69: #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError jpayne@69: #define __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING __pyx_mstate_global->__pyx_n_s_BADLY_FORMATTED_FORMAT_STRING jpayne@69: #define __pyx_kp_u_BADLY_FORMATTED_FORMAT_STRING_Fo __pyx_mstate_global->__pyx_kp_u_BADLY_FORMATTED_FORMAT_STRING_Fo jpayne@69: #define __pyx_n_s_BADLY_FORMATTED_HEADING __pyx_mstate_global->__pyx_n_s_BADLY_FORMATTED_HEADING jpayne@69: #define __pyx_kp_u_BADLY_FORMATTED_HEADING_Did_not __pyx_mstate_global->__pyx_kp_u_BADLY_FORMATTED_HEADING_Did_not jpayne@69: #define __pyx_kp_u_BAD_CHR_TAG_Error_calculating_ch __pyx_mstate_global->__pyx_kp_u_BAD_CHR_TAG_Error_calculating_ch jpayne@69: #define __pyx_n_s_BAD_GENOTYPE __pyx_mstate_global->__pyx_n_s_BAD_GENOTYPE jpayne@69: #define __pyx_kp_u_BAD_GENOTYPE_Cannot_parse_genoty __pyx_mstate_global->__pyx_kp_u_BAD_GENOTYPE_Cannot_parse_genoty jpayne@69: #define __pyx_n_s_BAD_NUMBER_OF_COLUMNS __pyx_mstate_global->__pyx_n_s_BAD_NUMBER_OF_COLUMNS jpayne@69: #define __pyx_kp_u_BAD_NUMBER_OF_COLUMNS_Wrong_numb __pyx_mstate_global->__pyx_kp_u_BAD_NUMBER_OF_COLUMNS_Wrong_numb jpayne@69: #define __pyx_n_s_BAD_NUMBER_OF_PARAMETERS __pyx_mstate_global->__pyx_n_s_BAD_NUMBER_OF_PARAMETERS jpayne@69: #define __pyx_kp_u_BAD_NUMBER_OF_PARAMETERS_Found_u __pyx_mstate_global->__pyx_kp_u_BAD_NUMBER_OF_PARAMETERS_Found_u jpayne@69: #define __pyx_n_s_BAD_NUMBER_OF_VALUES __pyx_mstate_global->__pyx_n_s_BAD_NUMBER_OF_VALUES jpayne@69: #define __pyx_kp_u_BAD_NUMBER_OF_VALUES_Found_too_m __pyx_mstate_global->__pyx_kp_u_BAD_NUMBER_OF_VALUES_Found_too_m jpayne@69: #define __pyx_n_u_CHROM __pyx_mstate_global->__pyx_n_u_CHROM jpayne@69: #define __pyx_kp_u_Can_only_handle_v3_3_and_v4_0_VC __pyx_mstate_global->__pyx_kp_u_Can_only_handle_v3_3_and_v4_0_VC jpayne@69: #define __pyx_n_u_Character __pyx_mstate_global->__pyx_n_u_Character jpayne@69: #define __pyx_kp_u_Conditional_genotype_quality __pyx_mstate_global->__pyx_kp_u_Conditional_genotype_quality jpayne@69: #define __pyx_n_u_D __pyx_mstate_global->__pyx_n_u_D jpayne@69: #define __pyx_n_u_DP __pyx_mstate_global->__pyx_n_u_DP jpayne@69: #define __pyx_kp_u_Description __pyx_mstate_global->__pyx_kp_u_Description jpayne@69: #define __pyx_n_u_Description_2 __pyx_mstate_global->__pyx_n_u_Description_2 jpayne@69: #define __pyx_kp_u_Don_t_understand_region_string_s __pyx_mstate_global->__pyx_kp_u_Don_t_understand_region_string_s jpayne@69: #define __pyx_n_u_EC __pyx_mstate_global->__pyx_n_u_EC jpayne@69: #define __pyx_n_s_ERROR_FLAG_HAS_VALUE __pyx_mstate_global->__pyx_n_s_ERROR_FLAG_HAS_VALUE jpayne@69: #define __pyx_kp_u_ERROR_FLAG_HAS_VALUE_Flag_fields __pyx_mstate_global->__pyx_kp_u_ERROR_FLAG_HAS_VALUE_Flag_fields jpayne@69: #define __pyx_n_s_ERROR_FORMAT_NOT_CHAR __pyx_mstate_global->__pyx_n_s_ERROR_FORMAT_NOT_CHAR jpayne@69: #define __pyx_kp_u_ERROR_FORMAT_NOT_CHAR_Eexpected __pyx_mstate_global->__pyx_kp_u_ERROR_FORMAT_NOT_CHAR_Eexpected jpayne@69: #define __pyx_n_s_ERROR_FORMAT_NOT_INTEGER __pyx_mstate_global->__pyx_n_s_ERROR_FORMAT_NOT_INTEGER jpayne@69: #define __pyx_kp_u_ERROR_FORMAT_NOT_INTEGER_Expecte __pyx_mstate_global->__pyx_kp_u_ERROR_FORMAT_NOT_INTEGER_Expecte jpayne@69: #define __pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL __pyx_mstate_global->__pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL jpayne@69: #define __pyx_kp_u_ERROR_FORMAT_NOT_NUMERICAL_Expec __pyx_mstate_global->__pyx_kp_u_ERROR_FORMAT_NOT_NUMERICAL_Expec jpayne@69: #define __pyx_n_s_ERROR_INFO_STRING __pyx_mstate_global->__pyx_n_s_ERROR_INFO_STRING jpayne@69: #define __pyx_kp_u_ERROR_INFO_STRING_Error_while_pa __pyx_mstate_global->__pyx_kp_u_ERROR_INFO_STRING_Error_while_pa jpayne@69: #define __pyx_n_s_ERROR_TRAILING_DATA __pyx_mstate_global->__pyx_n_s_ERROR_TRAILING_DATA jpayne@69: #define __pyx_kp_u_ERROR_TRAILING_DATA_Numerical_fi __pyx_mstate_global->__pyx_kp_u_ERROR_TRAILING_DATA_Numerical_fi jpayne@69: #define __pyx_n_s_ERROR_UNKNOWN_KEY __pyx_mstate_global->__pyx_n_s_ERROR_UNKNOWN_KEY jpayne@69: #define __pyx_kp_u_ERROR_UNKNOWN_KEY_Unknown_key_s __pyx_mstate_global->__pyx_kp_u_ERROR_UNKNOWN_KEY_Unknown_key_s jpayne@69: #define __pyx_n_u_Error __pyx_mstate_global->__pyx_n_u_Error jpayne@69: #define __pyx_kp_u_Expected_alternate_allel_counts __pyx_mstate_global->__pyx_kp_u_Expected_alternate_allel_counts jpayne@69: #define __pyx_n_u_FILTER __pyx_mstate_global->__pyx_n_u_FILTER jpayne@69: #define __pyx_n_s_FILTER_NOT_DEFINED __pyx_mstate_global->__pyx_n_s_FILTER_NOT_DEFINED jpayne@69: #define __pyx_kp_u_FILTER_NOT_DEFINED_Identifier_s __pyx_mstate_global->__pyx_kp_u_FILTER_NOT_DEFINED_Identifier_s jpayne@69: #define __pyx_n_s_FORMAT __pyx_mstate_global->__pyx_n_s_FORMAT jpayne@69: #define __pyx_n_u_FORMAT __pyx_mstate_global->__pyx_n_u_FORMAT jpayne@69: #define __pyx_n_s_FORMAT_MISSING_QUOTES __pyx_mstate_global->__pyx_n_s_FORMAT_MISSING_QUOTES jpayne@69: #define __pyx_kp_u_FORMAT_MISSING_QUOTES_Descriptio __pyx_mstate_global->__pyx_kp_u_FORMAT_MISSING_QUOTES_Descriptio jpayne@69: #define __pyx_n_s_FORMAT_NOT_DEFINED __pyx_mstate_global->__pyx_n_s_FORMAT_NOT_DEFINED jpayne@69: #define __pyx_kp_u_FORMAT_NOT_DEFINED_Identifier_s __pyx_mstate_global->__pyx_kp_u_FORMAT_NOT_DEFINED_Identifier_s jpayne@69: #define __pyx_n_u_FT __pyx_mstate_global->__pyx_n_u_FT jpayne@69: #define __pyx_n_u_Flag __pyx_mstate_global->__pyx_n_u_Flag jpayne@69: #define __pyx_n_u_Float __pyx_mstate_global->__pyx_n_u_Float jpayne@69: #define __pyx_n_u_G __pyx_mstate_global->__pyx_n_u_G jpayne@69: #define __pyx_n_u_GL __pyx_mstate_global->__pyx_n_u_GL jpayne@69: #define __pyx_n_u_GLE __pyx_mstate_global->__pyx_n_u_GLE jpayne@69: #define __pyx_n_u_GP __pyx_mstate_global->__pyx_n_u_GP jpayne@69: #define __pyx_n_u_GQ __pyx_mstate_global->__pyx_n_u_GQ jpayne@69: #define __pyx_n_u_GT __pyx_mstate_global->__pyx_n_u_GT jpayne@69: #define __pyx_n_s_GTdata __pyx_mstate_global->__pyx_n_s_GTdata jpayne@69: #define __pyx_n_s_GTstring __pyx_mstate_global->__pyx_n_s_GTstring jpayne@69: #define __pyx_n_u_Genotype __pyx_mstate_global->__pyx_n_u_Genotype jpayne@69: #define __pyx_kp_u_Genotype_Quality __pyx_mstate_global->__pyx_kp_u_Genotype_Quality jpayne@69: #define __pyx_kp_u_Genotype_likelihoods __pyx_mstate_global->__pyx_kp_u_Genotype_likelihoods jpayne@69: #define __pyx_kp_u_Genotype_posterior_probabilities __pyx_mstate_global->__pyx_kp_u_Genotype_posterior_probabilities jpayne@69: #define __pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS __pyx_mstate_global->__pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS jpayne@69: #define __pyx_kp_u_HEADING_NOT_SEPARATED_BY_TABS_He __pyx_mstate_global->__pyx_kp_u_HEADING_NOT_SEPARATED_BY_TABS_He jpayne@69: #define __pyx_n_u_HQ __pyx_mstate_global->__pyx_n_u_HQ jpayne@69: #define __pyx_kp_u_Haplotype_Quality __pyx_mstate_global->__pyx_kp_u_Haplotype_Quality jpayne@69: #define __pyx_n_u_I __pyx_mstate_global->__pyx_n_u_I jpayne@69: #define __pyx_kp_u_ID __pyx_mstate_global->__pyx_kp_u_ID jpayne@69: #define __pyx_n_u_ID_2 __pyx_mstate_global->__pyx_n_u_ID_2 jpayne@69: #define __pyx_n_u_INFO __pyx_mstate_global->__pyx_n_u_INFO jpayne@69: #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0 jpayne@69: #define __pyx_n_u_Integer __pyx_mstate_global->__pyx_n_u_Integer jpayne@69: #define __pyx_kp_u_Invalid_error_string_s __pyx_mstate_global->__pyx_kp_u_Invalid_error_string_s jpayne@69: #define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError jpayne@69: #define __pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE __pyx_mstate_global->__pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE jpayne@69: #define __pyx_kp_u_MISSING_INDEL_ALLELE_REF_BASE_In __pyx_mstate_global->__pyx_kp_u_MISSING_INDEL_ALLELE_REF_BASE_In jpayne@69: #define __pyx_n_s_MISSING_REF __pyx_mstate_global->__pyx_n_s_MISSING_REF jpayne@69: #define __pyx_kp_u_MISSING_REF_Reference_allele_mis __pyx_mstate_global->__pyx_kp_u_MISSING_REF_Reference_allele_mis jpayne@69: #define __pyx_n_u_MQ __pyx_mstate_global->__pyx_n_u_MQ jpayne@69: #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError jpayne@69: #define __pyx_n_u_N __pyx_mstate_global->__pyx_n_u_N jpayne@69: #define __pyx_n_s_NT_ALLELES __pyx_mstate_global->__pyx_n_s_NT_ALLELES jpayne@69: #define __pyx_n_s_NT_GENOTYPES __pyx_mstate_global->__pyx_n_s_NT_GENOTYPES jpayne@69: #define __pyx_n_s_NT_NR_ALLELES __pyx_mstate_global->__pyx_n_s_NT_NR_ALLELES jpayne@69: #define __pyx_n_s_NT_NUMBER __pyx_mstate_global->__pyx_n_s_NT_NUMBER jpayne@69: #define __pyx_n_s_NT_PHASED_GENOTYPES __pyx_mstate_global->__pyx_n_s_NT_PHASED_GENOTYPES jpayne@69: #define __pyx_n_s_NT_UNKNOWN __pyx_mstate_global->__pyx_n_s_NT_UNKNOWN jpayne@69: #define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError jpayne@69: #define __pyx_kp_u_Number __pyx_mstate_global->__pyx_kp_u_Number jpayne@69: #define __pyx_n_u_Number_2 __pyx_mstate_global->__pyx_n_u_Number_2 jpayne@69: #define __pyx_n_b_PASS __pyx_mstate_global->__pyx_n_b_PASS jpayne@69: #define __pyx_n_u_PASS __pyx_mstate_global->__pyx_n_u_PASS jpayne@69: #define __pyx_n_u_PL __pyx_mstate_global->__pyx_n_u_PL jpayne@69: #define __pyx_n_u_POS __pyx_mstate_global->__pyx_n_u_POS jpayne@69: #define __pyx_n_s_POS_NOT_NUMERICAL __pyx_mstate_global->__pyx_n_s_POS_NOT_NUMERICAL jpayne@69: #define __pyx_kp_u_POS_NOT_NUMERICAL_Position_colum __pyx_mstate_global->__pyx_kp_u_POS_NOT_NUMERICAL_Position_colum jpayne@69: #define __pyx_n_s_POS_NOT_POSITIVE __pyx_mstate_global->__pyx_n_s_POS_NOT_POSITIVE jpayne@69: #define __pyx_kp_u_POS_NOT_POSITIVE_Position_field __pyx_mstate_global->__pyx_kp_u_POS_NOT_POSITIVE_Position_field jpayne@69: #define __pyx_n_u_PQ __pyx_mstate_global->__pyx_n_u_PQ jpayne@69: #define __pyx_n_u_PS __pyx_mstate_global->__pyx_n_u_PS jpayne@69: #define __pyx_kp_u_Phase_set __pyx_mstate_global->__pyx_kp_u_Phase_set jpayne@69: #define __pyx_kp_u_Phasing_quality __pyx_mstate_global->__pyx_kp_u_Phasing_quality jpayne@69: #define __pyx_kp_u_Phred_scaled_genotype_likelihood __pyx_mstate_global->__pyx_kp_u_Phred_scaled_genotype_likelihood jpayne@69: #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError jpayne@69: #define __pyx_n_u_QUAL __pyx_mstate_global->__pyx_n_u_QUAL jpayne@69: #define __pyx_n_s_QUAL_NOT_NUMERICAL __pyx_mstate_global->__pyx_n_s_QUAL_NOT_NUMERICAL jpayne@69: #define __pyx_kp_u_QUAL_NOT_NUMERICAL_Quality_field __pyx_mstate_global->__pyx_kp_u_QUAL_NOT_NUMERICAL_Quality_field jpayne@69: #define __pyx_n_u_REF __pyx_mstate_global->__pyx_n_u_REF jpayne@69: #define __pyx_kp_u_RMS_mapping_quality __pyx_mstate_global->__pyx_kp_u_RMS_mapping_quality jpayne@69: #define __pyx_kp_u_Read_depth_at_this_position_for __pyx_mstate_global->__pyx_kp_u_Read_depth_at_this_position_for jpayne@69: #define __pyx_kp_u_Required_key_s_not_found_in_data __pyx_mstate_global->__pyx_kp_u_Required_key_s_not_found_in_data jpayne@69: #define __pyx_kp_u_Sample_Genotype_Filter __pyx_mstate_global->__pyx_kp_u_Sample_Genotype_Filter jpayne@69: #define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration jpayne@69: #define __pyx_n_u_String __pyx_mstate_global->__pyx_n_u_String jpayne@69: #define __pyx_n_s_Tabixfile __pyx_mstate_global->__pyx_n_s_Tabixfile jpayne@69: #define __pyx_kp_u_Type __pyx_mstate_global->__pyx_kp_u_Type jpayne@69: #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError jpayne@69: #define __pyx_n_u_Type_2 __pyx_mstate_global->__pyx_n_u_Type_2 jpayne@69: #define __pyx_n_s_UNKNOWN_CHAR_IN_REF __pyx_mstate_global->__pyx_n_s_UNKNOWN_CHAR_IN_REF jpayne@69: #define __pyx_kp_u_UNKNOWN_CHAR_IN_REF_Unknown_char __pyx_mstate_global->__pyx_kp_u_UNKNOWN_CHAR_IN_REF_Unknown_char jpayne@69: #define __pyx_n_s_UNKNOWN_FORMAT_STRING __pyx_mstate_global->__pyx_n_s_UNKNOWN_FORMAT_STRING jpayne@69: #define __pyx_kp_u_UNKNOWN_FORMAT_STRING_Unknown_fi __pyx_mstate_global->__pyx_kp_u_UNKNOWN_FORMAT_STRING_Unknown_fi jpayne@69: #define __pyx_kp_u_Undefined_tag __pyx_mstate_global->__pyx_kp_u_Undefined_tag jpayne@69: #define __pyx_kp_u_Unknown_number_type_encountered __pyx_mstate_global->__pyx_kp_u_Unknown_number_type_encountered jpayne@69: #define __pyx_n_s_V33_BAD_ALLELE __pyx_mstate_global->__pyx_n_s_V33_BAD_ALLELE jpayne@69: #define __pyx_kp_u_V33_BAD_ALLELE_Cannot_interpret __pyx_mstate_global->__pyx_kp_u_V33_BAD_ALLELE_Cannot_interpret jpayne@69: #define __pyx_n_s_V33_BAD_REF __pyx_mstate_global->__pyx_n_s_V33_BAD_REF jpayne@69: #define __pyx_kp_u_V33_BAD_REF_Reference_should_be __pyx_mstate_global->__pyx_kp_u_V33_BAD_REF_Reference_should_be jpayne@69: #define __pyx_n_s_V33_UNMATCHED_DELETION __pyx_mstate_global->__pyx_n_s_V33_UNMATCHED_DELETION jpayne@69: #define __pyx_kp_u_V33_UNMATCHED_DELETION_Deleted_s __pyx_mstate_global->__pyx_kp_u_V33_UNMATCHED_DELETION_Deleted_s jpayne@69: #define __pyx_n_s_V40_BAD_ALLELE __pyx_mstate_global->__pyx_n_s_V40_BAD_ALLELE jpayne@69: #define __pyx_kp_u_V40_BAD_ALLELE_Bad_allele_found __pyx_mstate_global->__pyx_kp_u_V40_BAD_ALLELE_Bad_allele_found jpayne@69: #define __pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD __pyx_mstate_global->__pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD jpayne@69: #define __pyx_kp_u_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2 __pyx_mstate_global->__pyx_kp_u_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2 jpayne@69: #define __pyx_n_s_V40_MISSING_ANGLE_BRACKETS __pyx_mstate_global->__pyx_n_s_V40_MISSING_ANGLE_BRACKETS jpayne@69: #define __pyx_kp_u_V40_MISSING_ANGLE_BRACKETS_Forma __pyx_mstate_global->__pyx_kp_u_V40_MISSING_ANGLE_BRACKETS_Forma jpayne@69: #define __pyx_n_s_VCF __pyx_mstate_global->__pyx_n_s_VCF jpayne@69: #define __pyx_n_u_VCF __pyx_mstate_global->__pyx_n_u_VCF jpayne@69: #define __pyx_n_s_VCFRecord __pyx_mstate_global->__pyx_n_s_VCFRecord jpayne@69: #define __pyx_n_u_VCFRecord __pyx_mstate_global->__pyx_n_u_VCFRecord jpayne@69: #define __pyx_n_s_VCFRecord___reduce_cython __pyx_mstate_global->__pyx_n_s_VCFRecord___reduce_cython jpayne@69: #define __pyx_n_s_VCFRecord___setstate_cython __pyx_mstate_global->__pyx_n_s_VCFRecord___setstate_cython jpayne@69: #define __pyx_n_s_VCFRecord_error __pyx_mstate_global->__pyx_n_s_VCFRecord_error jpayne@69: #define __pyx_n_s_VCF___del __pyx_mstate_global->__pyx_n_s_VCF___del jpayne@69: #define __pyx_n_s_VCF___init __pyx_mstate_global->__pyx_n_s_VCF___init jpayne@69: #define __pyx_n_s_VCF__add_definition __pyx_mstate_global->__pyx_n_s_VCF__add_definition jpayne@69: #define __pyx_n_s_VCF__parse __pyx_mstate_global->__pyx_n_s_VCF__parse jpayne@69: #define __pyx_n_s_VCF__parse_header __pyx_mstate_global->__pyx_n_s_VCF__parse_header jpayne@69: #define __pyx_n_s_VCF_close __pyx_mstate_global->__pyx_n_s_VCF_close jpayne@69: #define __pyx_n_s_VCF_compare_calls __pyx_mstate_global->__pyx_n_s_VCF_compare_calls jpayne@69: #define __pyx_n_s_VCF_connect __pyx_mstate_global->__pyx_n_s_VCF_connect jpayne@69: #define __pyx_n_s_VCF_convertGT __pyx_mstate_global->__pyx_n_s_VCF_convertGT jpayne@69: #define __pyx_n_s_VCF_convertGTback __pyx_mstate_global->__pyx_n_s_VCF_convertGTback jpayne@69: #define __pyx_n_s_VCF_enter_default_format __pyx_mstate_global->__pyx_n_s_VCF_enter_default_format jpayne@69: #define __pyx_n_s_VCF_error __pyx_mstate_global->__pyx_n_s_VCF_error jpayne@69: #define __pyx_n_s_VCF_fetch __pyx_mstate_global->__pyx_n_s_VCF_fetch jpayne@69: #define __pyx_n_s_VCF_format_format __pyx_mstate_global->__pyx_n_s_VCF_format_format jpayne@69: #define __pyx_n_s_VCF_format_formatdata __pyx_mstate_global->__pyx_n_s_VCF_format_formatdata jpayne@69: #define __pyx_n_s_VCF_get_expected __pyx_mstate_global->__pyx_n_s_VCF_get_expected jpayne@69: #define __pyx_n_s_VCF_getfilter __pyx_mstate_global->__pyx_n_s_VCF_getfilter jpayne@69: #define __pyx_n_s_VCF_getformat __pyx_mstate_global->__pyx_n_s_VCF_getformat jpayne@69: #define __pyx_n_s_VCF_getheader __pyx_mstate_global->__pyx_n_s_VCF_getheader jpayne@69: #define __pyx_n_s_VCF_getinfo __pyx_mstate_global->__pyx_n_s_VCF_getinfo jpayne@69: #define __pyx_n_s_VCF_getsamples __pyx_mstate_global->__pyx_n_s_VCF_getsamples jpayne@69: #define __pyx_n_s_VCF_ignoreerror __pyx_mstate_global->__pyx_n_s_VCF_ignoreerror jpayne@69: #define __pyx_n_s_VCF_inregion __pyx_mstate_global->__pyx_n_s_VCF_inregion jpayne@69: #define __pyx_n_s_VCF_parse __pyx_mstate_global->__pyx_n_s_VCF_parse jpayne@69: #define __pyx_n_s_VCF_parse_data __pyx_mstate_global->__pyx_n_s_VCF_parse_data jpayne@69: #define __pyx_n_s_VCF_parse_format __pyx_mstate_global->__pyx_n_s_VCF_parse_format jpayne@69: #define __pyx_n_s_VCF_parse_formatdata __pyx_mstate_global->__pyx_n_s_VCF_parse_formatdata jpayne@69: #define __pyx_n_s_VCF_parse_header __pyx_mstate_global->__pyx_n_s_VCF_parse_header jpayne@69: #define __pyx_n_s_VCF_parse_heading __pyx_mstate_global->__pyx_n_s_VCF_parse_heading jpayne@69: #define __pyx_kp_u_VCF_says __pyx_mstate_global->__pyx_kp_u_VCF_says jpayne@69: #define __pyx_n_s_VCF_setfilter __pyx_mstate_global->__pyx_n_s_VCF_setfilter jpayne@69: #define __pyx_n_s_VCF_setformat __pyx_mstate_global->__pyx_n_s_VCF_setformat jpayne@69: #define __pyx_n_s_VCF_setheader __pyx_mstate_global->__pyx_n_s_VCF_setheader jpayne@69: #define __pyx_n_s_VCF_setinfo __pyx_mstate_global->__pyx_n_s_VCF_setinfo jpayne@69: #define __pyx_n_s_VCF_setreference __pyx_mstate_global->__pyx_n_s_VCF_setreference jpayne@69: #define __pyx_n_s_VCF_setregions __pyx_mstate_global->__pyx_n_s_VCF_setregions jpayne@69: #define __pyx_n_s_VCF_setsamples __pyx_mstate_global->__pyx_n_s_VCF_setsamples jpayne@69: #define __pyx_n_s_VCF_setversion __pyx_mstate_global->__pyx_n_s_VCF_setversion jpayne@69: #define __pyx_n_s_VCF_validate __pyx_mstate_global->__pyx_n_s_VCF_validate jpayne@69: #define __pyx_n_s_VCF_warnerror __pyx_mstate_global->__pyx_n_s_VCF_warnerror jpayne@69: #define __pyx_n_s_VCF_write __pyx_mstate_global->__pyx_n_s_VCF_write jpayne@69: #define __pyx_n_s_VCF_write_data __pyx_mstate_global->__pyx_n_s_VCF_write_data jpayne@69: #define __pyx_n_s_VCF_write_header __pyx_mstate_global->__pyx_n_s_VCF_write_header jpayne@69: #define __pyx_n_s_VCF_write_heading __pyx_mstate_global->__pyx_n_s_VCF_write_heading jpayne@69: #define __pyx_n_s_VCF_writeheader __pyx_mstate_global->__pyx_n_s_VCF_writeheader jpayne@69: #define __pyx_kp_u_VCFv3_3 __pyx_mstate_global->__pyx_kp_u_VCFv3_3 jpayne@69: #define __pyx_kp_u_VCFv4_0 __pyx_mstate_global->__pyx_kp_u_VCFv4_0 jpayne@69: #define __pyx_kp_u_VCFv4_1 __pyx_mstate_global->__pyx_kp_u_VCFv4_1 jpayne@69: #define __pyx_kp_u_VCFv4_2 __pyx_mstate_global->__pyx_kp_u_VCFv4_2 jpayne@69: #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError jpayne@69: #define __pyx_n_s_WRONG_REF __pyx_mstate_global->__pyx_n_s_WRONG_REF jpayne@69: #define __pyx_kp_u_WRONG_REF_Wrong_reference_s __pyx_mstate_global->__pyx_kp_u_WRONG_REF_Wrong_reference_s jpayne@69: #define __pyx_n_u_Warning __pyx_mstate_global->__pyx_n_u_Warning jpayne@69: #define __pyx_n_s_ZERO_FOR_NON_FLAG_FIELD __pyx_mstate_global->__pyx_n_s_ZERO_FOR_NON_FLAG_FIELD jpayne@69: #define __pyx_kp_u_ZERO_FOR_NON_FLAG_FIELD_number_s __pyx_mstate_global->__pyx_kp_u_ZERO_FOR_NON_FLAG_FIELD_number_s jpayne@69: #define __pyx_n_s_ZERO_LENGTH_ALLELE __pyx_mstate_global->__pyx_n_s_ZERO_LENGTH_ALLELE jpayne@69: #define __pyx_kp_u_ZERO_LENGTH_ALLELE_Found_zero_le __pyx_mstate_global->__pyx_kp_u_ZERO_LENGTH_ALLELE_Found_zero_le jpayne@69: #define __pyx_kp_u__10 __pyx_mstate_global->__pyx_kp_u__10 jpayne@69: #define __pyx_kp_u__11 __pyx_mstate_global->__pyx_kp_u__11 jpayne@69: #define __pyx_kp_u__12 __pyx_mstate_global->__pyx_kp_u__12 jpayne@69: #define __pyx_kp_u__13 __pyx_mstate_global->__pyx_kp_u__13 jpayne@69: #define __pyx_n_s__139 __pyx_mstate_global->__pyx_n_s__139 jpayne@69: #define __pyx_kp_u__14 __pyx_mstate_global->__pyx_kp_u__14 jpayne@69: #define __pyx_kp_u__15 __pyx_mstate_global->__pyx_kp_u__15 jpayne@69: #define __pyx_kp_u__16 __pyx_mstate_global->__pyx_kp_u__16 jpayne@69: #define __pyx_kp_u__19 __pyx_mstate_global->__pyx_kp_u__19 jpayne@69: #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2 jpayne@69: #define __pyx_kp_u__23 __pyx_mstate_global->__pyx_kp_u__23 jpayne@69: #define __pyx_kp_u__24 __pyx_mstate_global->__pyx_kp_u__24 jpayne@69: #define __pyx_kp_u__25 __pyx_mstate_global->__pyx_kp_u__25 jpayne@69: #define __pyx_kp_u__27 __pyx_mstate_global->__pyx_kp_u__27 jpayne@69: #define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3 jpayne@69: #define __pyx_n_s__33 __pyx_mstate_global->__pyx_n_s__33 jpayne@69: #define __pyx_kp_u__34 __pyx_mstate_global->__pyx_kp_u__34 jpayne@69: #define __pyx_kp_u__4 __pyx_mstate_global->__pyx_kp_u__4 jpayne@69: #define __pyx_kp_b__5 __pyx_mstate_global->__pyx_kp_b__5 jpayne@69: #define __pyx_kp_u__5 __pyx_mstate_global->__pyx_kp_u__5 jpayne@69: #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6 jpayne@69: #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7 jpayne@69: #define __pyx_kp_u__8 __pyx_mstate_global->__pyx_kp_u__8 jpayne@69: #define __pyx_n_s_a __pyx_mstate_global->__pyx_n_s_a jpayne@69: #define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add jpayne@69: #define __pyx_n_s_add_definition __pyx_mstate_global->__pyx_n_s_add_definition jpayne@69: #define __pyx_n_s_addn __pyx_mstate_global->__pyx_n_s_addn jpayne@69: #define __pyx_n_s_addns __pyx_mstate_global->__pyx_n_s_addns jpayne@69: #define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all jpayne@69: #define __pyx_n_s_allele __pyx_mstate_global->__pyx_n_s_allele jpayne@69: #define __pyx_n_s_alleleRegEx __pyx_mstate_global->__pyx_n_s_alleleRegEx jpayne@69: #define __pyx_kp_u_alleles __pyx_mstate_global->__pyx_kp_u_alleles jpayne@69: #define __pyx_n_s_alt __pyx_mstate_global->__pyx_n_s_alt jpayne@69: #define __pyx_n_u_alt __pyx_mstate_global->__pyx_n_u_alt jpayne@69: #define __pyx_n_s_alt1 __pyx_mstate_global->__pyx_n_s_alt1 jpayne@69: #define __pyx_n_s_alt2 __pyx_mstate_global->__pyx_n_s_alt2 jpayne@69: #define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append jpayne@69: #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args jpayne@69: #define __pyx_n_s_asVCFRecord __pyx_mstate_global->__pyx_n_s_asVCFRecord jpayne@69: #define __pyx_n_s_asVCFRecord___reduce_cython __pyx_mstate_global->__pyx_n_s_asVCFRecord___reduce_cython jpayne@69: #define __pyx_n_s_asVCFRecord___setstate_cython __pyx_mstate_global->__pyx_n_s_asVCFRecord___setstate_cython jpayne@69: #define __pyx_n_u_ascii __pyx_mstate_global->__pyx_n_u_ascii jpayne@69: #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines jpayne@69: #define __pyx_n_s_bisect __pyx_mstate_global->__pyx_n_s_bisect jpayne@69: #define __pyx_n_s_blurp __pyx_mstate_global->__pyx_n_s_blurp jpayne@69: #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c jpayne@69: #define __pyx_n_s_chrom __pyx_mstate_global->__pyx_n_s_chrom jpayne@69: #define __pyx_n_u_chrom __pyx_mstate_global->__pyx_n_u_chrom jpayne@69: #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem jpayne@69: #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback jpayne@69: #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close jpayne@69: #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections jpayne@69: #define __pyx_n_s_cols __pyx_mstate_global->__pyx_n_s_cols jpayne@69: #define __pyx_n_s_compare_calls __pyx_mstate_global->__pyx_n_s_compare_calls jpayne@69: #define __pyx_n_s_compile __pyx_mstate_global->__pyx_n_s_compile jpayne@69: #define __pyx_n_s_connect __pyx_mstate_global->__pyx_n_s_connect jpayne@69: #define __pyx_n_s_convertGT __pyx_mstate_global->__pyx_n_s_convertGT jpayne@69: #define __pyx_n_s_convertGTback __pyx_mstate_global->__pyx_n_s_convertGTback jpayne@69: #define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy jpayne@69: #define __pyx_n_s_copy_2 __pyx_mstate_global->__pyx_n_s_copy_2 jpayne@69: #define __pyx_n_s_d __pyx_mstate_global->__pyx_n_s_d jpayne@69: #define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data jpayne@69: #define __pyx_n_s_datagenerator __pyx_mstate_global->__pyx_n_s_datagenerator jpayne@69: #define __pyx_n_s_deepcopy __pyx_mstate_global->__pyx_n_s_deepcopy jpayne@69: #define __pyx_n_s_defaultdict __pyx_mstate_global->__pyx_n_s_defaultdict jpayne@69: #define __pyx_n_s_del __pyx_mstate_global->__pyx_n_s_del jpayne@69: #define __pyx_kp_u_deletion_is __pyx_mstate_global->__pyx_kp_u_deletion_is jpayne@69: #define __pyx_n_u_descr __pyx_mstate_global->__pyx_n_u_descr jpayne@69: #define __pyx_n_s_description __pyx_mstate_global->__pyx_n_s_description jpayne@69: #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict jpayne@69: #define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2 jpayne@69: #define __pyx_n_s_dict_3 __pyx_mstate_global->__pyx_n_s_dict_3 jpayne@69: #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable jpayne@69: #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc jpayne@69: #define __pyx_n_s_elts __pyx_mstate_global->__pyx_n_s_elts jpayne@69: #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable jpayne@69: #define __pyx_n_s_encoding __pyx_mstate_global->__pyx_n_s_encoding jpayne@69: #define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end jpayne@69: #define __pyx_n_s_endswith __pyx_mstate_global->__pyx_n_s_endswith jpayne@69: #define __pyx_n_s_enter_default_format __pyx_mstate_global->__pyx_n_s_enter_default_format jpayne@69: #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate jpayne@69: #define __pyx_n_s_err __pyx_mstate_global->__pyx_n_s_err jpayne@69: #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error jpayne@69: #define __pyx_n_s_errorlabel __pyx_mstate_global->__pyx_n_s_errorlabel jpayne@69: #define __pyx_n_s_errors __pyx_mstate_global->__pyx_n_s_errors jpayne@69: #define __pyx_n_s_errorstring __pyx_mstate_global->__pyx_n_s_errorstring jpayne@69: #define __pyx_n_s_errwarn __pyx_mstate_global->__pyx_n_s_errwarn jpayne@69: #define __pyx_kp_u_expected __pyx_mstate_global->__pyx_kp_u_expected jpayne@69: #define __pyx_kp_u_expected_2 __pyx_mstate_global->__pyx_kp_u_expected_2 jpayne@69: #define __pyx_kp_u_expected_3 __pyx_mstate_global->__pyx_kp_u_expected_3 jpayne@69: #define __pyx_n_s_expected_4 __pyx_mstate_global->__pyx_n_s_expected_4 jpayne@69: #define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f jpayne@69: #define __pyx_n_s_fa __pyx_mstate_global->__pyx_n_s_fa jpayne@69: #define __pyx_n_s_faref __pyx_mstate_global->__pyx_n_s_faref jpayne@69: #define __pyx_n_s_faref_leftflank __pyx_mstate_global->__pyx_n_s_faref_leftflank jpayne@69: #define __pyx_n_s_fetch __pyx_mstate_global->__pyx_n_s_fetch jpayne@69: #define __pyx_n_u_fileformat __pyx_mstate_global->__pyx_n_u_fileformat jpayne@69: #define __pyx_kp_u_fileformat_VCFv __pyx_mstate_global->__pyx_kp_u_fileformat_VCFv jpayne@69: #define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename jpayne@69: #define __pyx_n_s_filter __pyx_mstate_global->__pyx_n_s_filter jpayne@69: #define __pyx_n_s_filter_2 __pyx_mstate_global->__pyx_n_s_filter_2 jpayne@69: #define __pyx_n_u_filter_2 __pyx_mstate_global->__pyx_n_u_filter_2 jpayne@69: #define __pyx_n_s_find __pyx_mstate_global->__pyx_n_s_find jpayne@69: #define __pyx_n_s_first __pyx_mstate_global->__pyx_n_s_first jpayne@69: #define __pyx_n_s_fmt __pyx_mstate_global->__pyx_n_s_fmt jpayne@69: #define __pyx_kp_u_for __pyx_mstate_global->__pyx_kp_u_for jpayne@69: #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format jpayne@69: #define __pyx_n_u_format __pyx_mstate_global->__pyx_n_u_format jpayne@69: #define __pyx_n_s_format_2 __pyx_mstate_global->__pyx_n_s_format_2 jpayne@69: #define __pyx_n_s_format_format __pyx_mstate_global->__pyx_n_s_format_format jpayne@69: #define __pyx_n_s_format_formatdata __pyx_mstate_global->__pyx_n_s_format_formatdata jpayne@69: #define __pyx_n_s_formatdict __pyx_mstate_global->__pyx_n_s_formatdict jpayne@69: #define __pyx_kp_u_found __pyx_mstate_global->__pyx_kp_u_found jpayne@69: #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc jpayne@69: #define __pyx_kp_u_genotypes __pyx_mstate_global->__pyx_kp_u_genotypes jpayne@69: #define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get jpayne@69: #define __pyx_n_s_get_expected __pyx_mstate_global->__pyx_n_s_get_expected jpayne@69: #define __pyx_n_s_get_sequence __pyx_mstate_global->__pyx_n_s_get_sequence jpayne@69: #define __pyx_n_s_getfilter __pyx_mstate_global->__pyx_n_s_getfilter jpayne@69: #define __pyx_n_s_getformat __pyx_mstate_global->__pyx_n_s_getformat jpayne@69: #define __pyx_n_s_getheader __pyx_mstate_global->__pyx_n_s_getheader jpayne@69: #define __pyx_n_s_getinfo __pyx_mstate_global->__pyx_n_s_getinfo jpayne@69: #define __pyx_n_s_getsamples __pyx_mstate_global->__pyx_n_s_getsamples jpayne@69: #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate jpayne@69: #define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got jpayne@69: #define __pyx_n_s_gts __pyx_mstate_global->__pyx_n_s_gts jpayne@69: #define __pyx_n_s_gtsRegEx __pyx_mstate_global->__pyx_n_s_gtsRegEx jpayne@69: #define __pyx_n_s_have_deletions __pyx_mstate_global->__pyx_n_s_have_deletions jpayne@69: #define __pyx_n_s_header __pyx_mstate_global->__pyx_n_s_header jpayne@69: #define __pyx_n_s_header_2 __pyx_mstate_global->__pyx_n_s_header_2 jpayne@69: #define __pyx_n_s_headings __pyx_mstate_global->__pyx_n_s_headings jpayne@69: #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i jpayne@69: #define __pyx_kp_u_id __pyx_mstate_global->__pyx_kp_u_id jpayne@69: #define __pyx_n_s_id_2 __pyx_mstate_global->__pyx_n_s_id_2 jpayne@69: #define __pyx_n_u_id_2 __pyx_mstate_global->__pyx_n_u_id_2 jpayne@69: #define __pyx_kp_u_id_numbertype_number_type_descri __pyx_mstate_global->__pyx_kp_u_id_numbertype_number_type_descri jpayne@69: #define __pyx_n_s_idx __pyx_mstate_global->__pyx_n_s_idx jpayne@69: #define __pyx_n_s_ielts __pyx_mstate_global->__pyx_n_s_ielts jpayne@69: #define __pyx_n_s_ignored_errors __pyx_mstate_global->__pyx_n_s_ignored_errors jpayne@69: #define __pyx_n_s_ignoreerror __pyx_mstate_global->__pyx_n_s_ignoreerror jpayne@69: #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import jpayne@69: #define __pyx_kp_u_in_line __pyx_mstate_global->__pyx_kp_u_in_line jpayne@69: #define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info jpayne@69: #define __pyx_n_s_info_2 __pyx_mstate_global->__pyx_n_s_info_2 jpayne@69: #define __pyx_n_u_info_2 __pyx_mstate_global->__pyx_n_u_info_2 jpayne@69: #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init jpayne@69: #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass jpayne@69: #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing jpayne@69: #define __pyx_n_s_inregion __pyx_mstate_global->__pyx_n_s_inregion jpayne@69: #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine jpayne@69: #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled jpayne@69: #define __pyx_n_s_itemgetter __pyx_mstate_global->__pyx_n_s_itemgetter jpayne@69: #define __pyx_n_s_itervalues __pyx_mstate_global->__pyx_n_s_itervalues jpayne@69: #define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join jpayne@69: #define __pyx_n_s_k __pyx_mstate_global->__pyx_n_s_k jpayne@69: #define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key jpayne@69: #define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys jpayne@69: #define __pyx_n_s_l __pyx_mstate_global->__pyx_n_s_l jpayne@69: #define __pyx_n_s_label __pyx_mstate_global->__pyx_n_s_label jpayne@69: #define __pyx_n_s_last __pyx_mstate_global->__pyx_n_s_last jpayne@69: #define __pyx_n_s_last_line __pyx_mstate_global->__pyx_n_s_last_line jpayne@69: #define __pyx_n_s_left __pyx_mstate_global->__pyx_n_s_left jpayne@69: #define __pyx_n_s_leftalign __pyx_mstate_global->__pyx_n_s_leftalign jpayne@69: #define __pyx_n_s_leftalign_2 __pyx_mstate_global->__pyx_n_s_leftalign_2 jpayne@69: #define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line jpayne@69: #define __pyx_n_s_line_2 __pyx_mstate_global->__pyx_n_s_line_2 jpayne@69: #define __pyx_n_s_lineno __pyx_mstate_global->__pyx_n_s_lineno jpayne@69: #define __pyx_n_s_lineparse __pyx_mstate_global->__pyx_n_s_lineparse jpayne@69: #define __pyx_n_s_lines __pyx_mstate_global->__pyx_n_s_lines jpayne@69: #define __pyx_n_s_lines_2 __pyx_mstate_global->__pyx_n_s_lines_2 jpayne@69: #define __pyx_n_s_longest __pyx_mstate_global->__pyx_n_s_longest jpayne@69: #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main jpayne@69: #define __pyx_n_s_map __pyx_mstate_global->__pyx_n_s_map jpayne@69: #define __pyx_n_s_match __pyx_mstate_global->__pyx_n_s_match jpayne@69: #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass jpayne@69: #define __pyx_n_s_min __pyx_mstate_global->__pyx_n_s_min jpayne@69: #define __pyx_n_u_missing __pyx_mstate_global->__pyx_n_u_missing jpayne@69: #define __pyx_n_s_missingvalue __pyx_mstate_global->__pyx_n_s_missingvalue jpayne@69: #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module jpayne@69: #define __pyx_n_s_movable __pyx_mstate_global->__pyx_n_s_movable jpayne@69: #define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries jpayne@69: #define __pyx_n_s_n __pyx_mstate_global->__pyx_n_s_n jpayne@69: #define __pyx_n_s_na __pyx_mstate_global->__pyx_n_s_na jpayne@69: #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name jpayne@69: #define __pyx_n_s_namedtuple __pyx_mstate_global->__pyx_n_s_namedtuple jpayne@69: #define __pyx_kp_u_needs_to_be_checked __pyx_mstate_global->__pyx_kp_u_needs_to_be_checked jpayne@69: #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new jpayne@69: #define __pyx_n_s_newalts __pyx_mstate_global->__pyx_n_s_newalts jpayne@69: #define __pyx_n_s_nmb __pyx_mstate_global->__pyx_n_s_nmb jpayne@69: #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non jpayne@69: #define __pyx_kp_u_nonref_alleles __pyx_mstate_global->__pyx_kp_u_nonref_alleles jpayne@69: #define __pyx_n_s_number __pyx_mstate_global->__pyx_n_s_number jpayne@69: #define __pyx_n_u_number __pyx_mstate_global->__pyx_n_u_number jpayne@69: #define __pyx_n_s_numbertype __pyx_mstate_global->__pyx_n_s_numbertype jpayne@69: #define __pyx_n_s_object __pyx_mstate_global->__pyx_n_s_object jpayne@69: #define __pyx_n_s_operator __pyx_mstate_global->__pyx_n_s_operator jpayne@69: #define __pyx_n_s_opt __pyx_mstate_global->__pyx_n_s_opt jpayne@69: #define __pyx_kp_u_output __pyx_mstate_global->__pyx_kp_u_output jpayne@69: #define __pyx_n_s_output_2 __pyx_mstate_global->__pyx_n_s_output_2 jpayne@69: #define __pyx_kp_u_parameters_got __pyx_mstate_global->__pyx_kp_u_parameters_got jpayne@69: #define __pyx_n_s_parse __pyx_mstate_global->__pyx_n_s_parse jpayne@69: #define __pyx_n_s_parse_2 __pyx_mstate_global->__pyx_n_s_parse_2 jpayne@69: #define __pyx_n_s_parse_data __pyx_mstate_global->__pyx_n_s_parse_data jpayne@69: #define __pyx_n_s_parse_format __pyx_mstate_global->__pyx_n_s_parse_format jpayne@69: #define __pyx_n_s_parse_formatdata __pyx_mstate_global->__pyx_n_s_parse_formatdata jpayne@69: #define __pyx_n_s_parse_header __pyx_mstate_global->__pyx_n_s_parse_header jpayne@69: #define __pyx_n_s_parse_header_2 __pyx_mstate_global->__pyx_n_s_parse_header_2 jpayne@69: #define __pyx_n_s_parse_heading __pyx_mstate_global->__pyx_n_s_parse_heading jpayne@69: #define __pyx_n_s_parse_regions __pyx_mstate_global->__pyx_n_s_parse_regions jpayne@69: #define __pyx_n_s_parser __pyx_mstate_global->__pyx_n_s_parser jpayne@69: #define __pyx_kp_u_phased_genotypes __pyx_mstate_global->__pyx_kp_u_phased_genotypes jpayne@69: #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle jpayne@69: #define __pyx_n_s_pos __pyx_mstate_global->__pyx_n_s_pos jpayne@69: #define __pyx_n_u_pos __pyx_mstate_global->__pyx_n_u_pos jpayne@69: #define __pyx_n_s_pos1 __pyx_mstate_global->__pyx_n_s_pos1 jpayne@69: #define __pyx_n_s_pos2 __pyx_mstate_global->__pyx_n_s_pos2 jpayne@69: #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare jpayne@69: #define __pyx_n_s_pysam __pyx_mstate_global->__pyx_n_s_pysam jpayne@69: #define __pyx_n_s_pysam_libcvcf __pyx_mstate_global->__pyx_n_s_pysam_libcvcf jpayne@69: #define __pyx_kp_s_pysam_libcvcf_pyx __pyx_mstate_global->__pyx_kp_s_pysam_libcvcf_pyx jpayne@69: #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError jpayne@69: #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum jpayne@69: #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result jpayne@69: #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state jpayne@69: #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type jpayne@69: #define __pyx_n_s_pyx_unpickle_asVCFRecord __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asVCFRecord jpayne@69: #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable jpayne@69: #define __pyx_n_s_qual __pyx_mstate_global->__pyx_n_s_qual jpayne@69: #define __pyx_n_u_qual __pyx_mstate_global->__pyx_n_u_qual jpayne@69: #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname jpayne@69: #define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r jpayne@69: #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range jpayne@69: #define __pyx_n_s_re __pyx_mstate_global->__pyx_n_s_re jpayne@69: #define __pyx_n_s_record __pyx_mstate_global->__pyx_n_s_record jpayne@69: #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce jpayne@69: #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython jpayne@69: #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex jpayne@69: #define __pyx_n_s_ref __pyx_mstate_global->__pyx_n_s_ref jpayne@69: #define __pyx_n_u_ref __pyx_mstate_global->__pyx_n_u_ref jpayne@69: #define __pyx_n_s_ref1 __pyx_mstate_global->__pyx_n_s_ref1 jpayne@69: #define __pyx_n_s_ref2 __pyx_mstate_global->__pyx_n_s_ref2 jpayne@69: #define __pyx_n_s_reference __pyx_mstate_global->__pyx_n_s_reference jpayne@69: #define __pyx_n_s_reference_2 __pyx_mstate_global->__pyx_n_s_reference_2 jpayne@69: #define __pyx_kp_u_reference_is __pyx_mstate_global->__pyx_kp_u_reference_is jpayne@69: #define __pyx_kp_u_reference_is_2 __pyx_mstate_global->__pyx_kp_u_reference_is_2 jpayne@69: #define __pyx_n_s_region __pyx_mstate_global->__pyx_n_s_region jpayne@69: #define __pyx_n_s_regions __pyx_mstate_global->__pyx_n_s_regions jpayne@69: #define __pyx_n_s_regions_2 __pyx_mstate_global->__pyx_n_s_regions_2 jpayne@69: #define __pyx_n_s_replace __pyx_mstate_global->__pyx_n_s_replace jpayne@69: #define __pyx_n_s_required __pyx_mstate_global->__pyx_n_s_required jpayne@69: #define __pyx_n_s_required_2 __pyx_mstate_global->__pyx_n_s_required_2 jpayne@69: #define __pyx_n_s_rest __pyx_mstate_global->__pyx_n_s_rest jpayne@69: #define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result jpayne@69: #define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s jpayne@69: #define __pyx_n_s_sample __pyx_mstate_global->__pyx_n_s_sample jpayne@69: #define __pyx_n_s_sample2column __pyx_mstate_global->__pyx_n_s_sample2column jpayne@69: #define __pyx_n_s_samples __pyx_mstate_global->__pyx_n_s_samples jpayne@69: #define __pyx_kp_u_samples_2 __pyx_mstate_global->__pyx_kp_u_samples_2 jpayne@69: #define __pyx_n_s_samples_3 __pyx_mstate_global->__pyx_n_s_samples_3 jpayne@69: #define __pyx_n_s_sdata __pyx_mstate_global->__pyx_n_s_sdata jpayne@69: #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self jpayne@69: #define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send jpayne@69: #define __pyx_n_s_separator __pyx_mstate_global->__pyx_n_s_separator jpayne@69: #define __pyx_n_s_sequence __pyx_mstate_global->__pyx_n_s_sequence jpayne@69: #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name jpayne@69: #define __pyx_n_s_setfilter __pyx_mstate_global->__pyx_n_s_setfilter jpayne@69: #define __pyx_n_s_setformat __pyx_mstate_global->__pyx_n_s_setformat jpayne@69: #define __pyx_n_s_setheader __pyx_mstate_global->__pyx_n_s_setheader jpayne@69: #define __pyx_n_s_setinfo __pyx_mstate_global->__pyx_n_s_setinfo jpayne@69: #define __pyx_n_s_setreference __pyx_mstate_global->__pyx_n_s_setreference jpayne@69: #define __pyx_n_s_setregions __pyx_mstate_global->__pyx_n_s_setregions jpayne@69: #define __pyx_n_s_setsamples __pyx_mstate_global->__pyx_n_s_setsamples jpayne@69: #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate jpayne@69: #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython jpayne@69: #define __pyx_n_s_setversion __pyx_mstate_global->__pyx_n_s_setversion jpayne@69: #define __pyx_n_s_shortest __pyx_mstate_global->__pyx_n_s_shortest jpayne@69: #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec jpayne@69: #define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split jpayne@69: #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start jpayne@69: #define __pyx_n_s_startswith __pyx_mstate_global->__pyx_n_s_startswith jpayne@69: #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state jpayne@69: #define __pyx_kp_u_sth_entry_not_found __pyx_mstate_global->__pyx_kp_u_sth_entry_not_found jpayne@69: #define __pyx_n_s_stream __pyx_mstate_global->__pyx_n_s_stream jpayne@69: #define __pyx_n_s_string __pyx_mstate_global->__pyx_n_s_string jpayne@69: #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource jpayne@69: #define __pyx_n_s_strip __pyx_mstate_global->__pyx_n_s_strip jpayne@69: #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super jpayne@69: #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys jpayne@69: #define __pyx_n_s_t __pyx_mstate_global->__pyx_n_s_t jpayne@69: #define __pyx_n_s_tabixfile __pyx_mstate_global->__pyx_n_s_tabixfile jpayne@69: #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test jpayne@69: #define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw jpayne@69: #define __pyx_n_s_type __pyx_mstate_global->__pyx_n_s_type jpayne@69: #define __pyx_n_u_type __pyx_mstate_global->__pyx_n_u_type jpayne@69: #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update jpayne@69: #define __pyx_n_s_upper __pyx_mstate_global->__pyx_n_s_upper jpayne@69: #define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate jpayne@69: #define __pyx_n_s_v __pyx_mstate_global->__pyx_n_s_v jpayne@69: #define __pyx_n_s_validate __pyx_mstate_global->__pyx_n_s_validate jpayne@69: #define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value jpayne@69: #define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values jpayne@69: #define __pyx_kp_u_values_in_element __pyx_mstate_global->__pyx_kp_u_values_in_element jpayne@69: #define __pyx_n_s_var __pyx_mstate_global->__pyx_n_s_var jpayne@69: #define __pyx_n_s_vcf __pyx_mstate_global->__pyx_n_s_vcf jpayne@69: #define __pyx_n_s_vcffile __pyx_mstate_global->__pyx_n_s_vcffile jpayne@69: #define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version jpayne@69: #define __pyx_n_s_version_2 __pyx_mstate_global->__pyx_n_s_version_2 jpayne@69: #define __pyx_n_s_warn_errors __pyx_mstate_global->__pyx_n_s_warn_errors jpayne@69: #define __pyx_n_s_warnerror __pyx_mstate_global->__pyx_n_s_warnerror jpayne@69: #define __pyx_n_s_write __pyx_mstate_global->__pyx_n_s_write jpayne@69: #define __pyx_n_s_write_data __pyx_mstate_global->__pyx_n_s_write_data jpayne@69: #define __pyx_n_s_write_header __pyx_mstate_global->__pyx_n_s_write_header jpayne@69: #define __pyx_n_s_write_heading __pyx_mstate_global->__pyx_n_s_write_heading jpayne@69: #define __pyx_n_s_writeheader __pyx_mstate_global->__pyx_n_s_writeheader jpayne@69: #define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x jpayne@69: #define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y jpayne@69: #define __pyx_n_s_zip __pyx_mstate_global->__pyx_n_s_zip jpayne@69: #define __pyx_float_0_0 __pyx_mstate_global->__pyx_float_0_0 jpayne@69: #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 jpayne@69: #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 jpayne@69: #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2 jpayne@69: #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3 jpayne@69: #define __pyx_int_4 __pyx_mstate_global->__pyx_int_4 jpayne@69: #define __pyx_int_5 __pyx_mstate_global->__pyx_int_5 jpayne@69: #define __pyx_int_6 __pyx_mstate_global->__pyx_int_6 jpayne@69: #define __pyx_int_7 __pyx_mstate_global->__pyx_int_7 jpayne@69: #define __pyx_int_8 __pyx_mstate_global->__pyx_int_8 jpayne@69: #define __pyx_int_9 __pyx_mstate_global->__pyx_int_9 jpayne@69: #define __pyx_int_10 __pyx_mstate_global->__pyx_int_10 jpayne@69: #define __pyx_int_11 __pyx_mstate_global->__pyx_int_11 jpayne@69: #define __pyx_int_12 __pyx_mstate_global->__pyx_int_12 jpayne@69: #define __pyx_int_13 __pyx_mstate_global->__pyx_int_13 jpayne@69: #define __pyx_int_14 __pyx_mstate_global->__pyx_int_14 jpayne@69: #define __pyx_int_15 __pyx_mstate_global->__pyx_int_15 jpayne@69: #define __pyx_int_16 __pyx_mstate_global->__pyx_int_16 jpayne@69: #define __pyx_int_17 __pyx_mstate_global->__pyx_int_17 jpayne@69: #define __pyx_int_18 __pyx_mstate_global->__pyx_int_18 jpayne@69: #define __pyx_int_19 __pyx_mstate_global->__pyx_int_19 jpayne@69: #define __pyx_int_20 __pyx_mstate_global->__pyx_int_20 jpayne@69: #define __pyx_int_21 __pyx_mstate_global->__pyx_int_21 jpayne@69: #define __pyx_int_22 __pyx_mstate_global->__pyx_int_22 jpayne@69: #define __pyx_int_23 __pyx_mstate_global->__pyx_int_23 jpayne@69: #define __pyx_int_24 __pyx_mstate_global->__pyx_int_24 jpayne@69: #define __pyx_int_25 __pyx_mstate_global->__pyx_int_25 jpayne@69: #define __pyx_int_26 __pyx_mstate_global->__pyx_int_26 jpayne@69: #define __pyx_int_27 __pyx_mstate_global->__pyx_int_27 jpayne@69: #define __pyx_int_28 __pyx_mstate_global->__pyx_int_28 jpayne@69: #define __pyx_int_29 __pyx_mstate_global->__pyx_int_29 jpayne@69: #define __pyx_int_30 __pyx_mstate_global->__pyx_int_30 jpayne@69: #define __pyx_int_31 __pyx_mstate_global->__pyx_int_31 jpayne@69: #define __pyx_int_32 __pyx_mstate_global->__pyx_int_32 jpayne@69: #define __pyx_int_33 __pyx_mstate_global->__pyx_int_33 jpayne@69: #define __pyx_int_40 __pyx_mstate_global->__pyx_int_40 jpayne@69: #define __pyx_int_100 __pyx_mstate_global->__pyx_int_100 jpayne@69: #define __pyx_int_29527880 __pyx_mstate_global->__pyx_int_29527880 jpayne@69: #define __pyx_int_214161357 __pyx_mstate_global->__pyx_int_214161357 jpayne@69: #define __pyx_int_239654613 __pyx_mstate_global->__pyx_int_239654613 jpayne@69: #define __pyx_int_3000000000 __pyx_mstate_global->__pyx_int_3000000000 jpayne@69: #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 jpayne@69: #define __pyx_slice__9 __pyx_mstate_global->__pyx_slice__9 jpayne@69: #define __pyx_slice__17 __pyx_mstate_global->__pyx_slice__17 jpayne@69: #define __pyx_slice__18 __pyx_mstate_global->__pyx_slice__18 jpayne@69: #define __pyx_slice__20 __pyx_mstate_global->__pyx_slice__20 jpayne@69: #define __pyx_slice__26 __pyx_mstate_global->__pyx_slice__26 jpayne@69: #define __pyx_slice__28 __pyx_mstate_global->__pyx_slice__28 jpayne@69: #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21 jpayne@69: #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22 jpayne@69: #define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30 jpayne@69: #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 jpayne@69: #define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32 jpayne@69: #define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35 jpayne@69: #define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36 jpayne@69: #define __pyx_tuple__37 __pyx_mstate_global->__pyx_tuple__37 jpayne@69: #define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39 jpayne@69: #define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41 jpayne@69: #define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42 jpayne@69: #define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44 jpayne@69: #define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45 jpayne@69: #define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47 jpayne@69: #define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49 jpayne@69: #define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52 jpayne@69: #define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53 jpayne@69: #define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54 jpayne@69: #define __pyx_tuple__56 __pyx_mstate_global->__pyx_tuple__56 jpayne@69: #define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57 jpayne@69: #define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59 jpayne@69: #define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61 jpayne@69: #define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62 jpayne@69: #define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64 jpayne@69: #define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66 jpayne@69: #define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68 jpayne@69: #define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70 jpayne@69: #define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71 jpayne@69: #define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73 jpayne@69: #define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75 jpayne@69: #define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77 jpayne@69: #define __pyx_tuple__79 __pyx_mstate_global->__pyx_tuple__79 jpayne@69: #define __pyx_tuple__81 __pyx_mstate_global->__pyx_tuple__81 jpayne@69: #define __pyx_tuple__83 __pyx_mstate_global->__pyx_tuple__83 jpayne@69: #define __pyx_tuple__85 __pyx_mstate_global->__pyx_tuple__85 jpayne@69: #define __pyx_tuple__87 __pyx_mstate_global->__pyx_tuple__87 jpayne@69: #define __pyx_tuple__89 __pyx_mstate_global->__pyx_tuple__89 jpayne@69: #define __pyx_tuple__91 __pyx_mstate_global->__pyx_tuple__91 jpayne@69: #define __pyx_tuple__93 __pyx_mstate_global->__pyx_tuple__93 jpayne@69: #define __pyx_tuple__95 __pyx_mstate_global->__pyx_tuple__95 jpayne@69: #define __pyx_tuple__97 __pyx_mstate_global->__pyx_tuple__97 jpayne@69: #define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100 jpayne@69: #define __pyx_tuple__103 __pyx_mstate_global->__pyx_tuple__103 jpayne@69: #define __pyx_tuple__106 __pyx_mstate_global->__pyx_tuple__106 jpayne@69: #define __pyx_tuple__109 __pyx_mstate_global->__pyx_tuple__109 jpayne@69: #define __pyx_tuple__111 __pyx_mstate_global->__pyx_tuple__111 jpayne@69: #define __pyx_tuple__113 __pyx_mstate_global->__pyx_tuple__113 jpayne@69: #define __pyx_tuple__115 __pyx_mstate_global->__pyx_tuple__115 jpayne@69: #define __pyx_tuple__117 __pyx_mstate_global->__pyx_tuple__117 jpayne@69: #define __pyx_tuple__120 __pyx_mstate_global->__pyx_tuple__120 jpayne@69: #define __pyx_tuple__122 __pyx_mstate_global->__pyx_tuple__122 jpayne@69: #define __pyx_tuple__125 __pyx_mstate_global->__pyx_tuple__125 jpayne@69: #define __pyx_tuple__127 __pyx_mstate_global->__pyx_tuple__127 jpayne@69: #define __pyx_tuple__129 __pyx_mstate_global->__pyx_tuple__129 jpayne@69: #define __pyx_tuple__132 __pyx_mstate_global->__pyx_tuple__132 jpayne@69: #define __pyx_tuple__134 __pyx_mstate_global->__pyx_tuple__134 jpayne@69: #define __pyx_tuple__135 __pyx_mstate_global->__pyx_tuple__135 jpayne@69: #define __pyx_tuple__137 __pyx_mstate_global->__pyx_tuple__137 jpayne@69: #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29 jpayne@69: #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38 jpayne@69: #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40 jpayne@69: #define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 jpayne@69: #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46 jpayne@69: #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48 jpayne@69: #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50 jpayne@69: #define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51 jpayne@69: #define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55 jpayne@69: #define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58 jpayne@69: #define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60 jpayne@69: #define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63 jpayne@69: #define __pyx_codeobj__65 __pyx_mstate_global->__pyx_codeobj__65 jpayne@69: #define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67 jpayne@69: #define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69 jpayne@69: #define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72 jpayne@69: #define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74 jpayne@69: #define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76 jpayne@69: #define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78 jpayne@69: #define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80 jpayne@69: #define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82 jpayne@69: #define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 jpayne@69: #define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86 jpayne@69: #define __pyx_codeobj__88 __pyx_mstate_global->__pyx_codeobj__88 jpayne@69: #define __pyx_codeobj__90 __pyx_mstate_global->__pyx_codeobj__90 jpayne@69: #define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92 jpayne@69: #define __pyx_codeobj__94 __pyx_mstate_global->__pyx_codeobj__94 jpayne@69: #define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96 jpayne@69: #define __pyx_codeobj__98 __pyx_mstate_global->__pyx_codeobj__98 jpayne@69: #define __pyx_codeobj__99 __pyx_mstate_global->__pyx_codeobj__99 jpayne@69: #define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101 jpayne@69: #define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102 jpayne@69: #define __pyx_codeobj__104 __pyx_mstate_global->__pyx_codeobj__104 jpayne@69: #define __pyx_codeobj__105 __pyx_mstate_global->__pyx_codeobj__105 jpayne@69: #define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107 jpayne@69: #define __pyx_codeobj__108 __pyx_mstate_global->__pyx_codeobj__108 jpayne@69: #define __pyx_codeobj__110 __pyx_mstate_global->__pyx_codeobj__110 jpayne@69: #define __pyx_codeobj__112 __pyx_mstate_global->__pyx_codeobj__112 jpayne@69: #define __pyx_codeobj__114 __pyx_mstate_global->__pyx_codeobj__114 jpayne@69: #define __pyx_codeobj__116 __pyx_mstate_global->__pyx_codeobj__116 jpayne@69: #define __pyx_codeobj__118 __pyx_mstate_global->__pyx_codeobj__118 jpayne@69: #define __pyx_codeobj__119 __pyx_mstate_global->__pyx_codeobj__119 jpayne@69: #define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121 jpayne@69: #define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123 jpayne@69: #define __pyx_codeobj__124 __pyx_mstate_global->__pyx_codeobj__124 jpayne@69: #define __pyx_codeobj__126 __pyx_mstate_global->__pyx_codeobj__126 jpayne@69: #define __pyx_codeobj__128 __pyx_mstate_global->__pyx_codeobj__128 jpayne@69: #define __pyx_codeobj__130 __pyx_mstate_global->__pyx_codeobj__130 jpayne@69: #define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131 jpayne@69: #define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133 jpayne@69: #define __pyx_codeobj__136 __pyx_mstate_global->__pyx_codeobj__136 jpayne@69: #define __pyx_codeobj__138 __pyx_mstate_global->__pyx_codeobj__138 jpayne@69: /* #### Code section: module_code ### */ jpayne@69: jpayne@69: /* "cpython/complex.pxd":19 jpayne@69: * jpayne@69: * @property jpayne@69: * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<< jpayne@69: * return self.cval.real jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { jpayne@69: double __pyx_r; jpayne@69: jpayne@69: /* "cpython/complex.pxd":20 jpayne@69: * @property jpayne@69: * cdef inline double real(self) noexcept: jpayne@69: * return self.cval.real # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * @property jpayne@69: */ jpayne@69: __pyx_r = __pyx_v_self->cval.real; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "cpython/complex.pxd":19 jpayne@69: * jpayne@69: * @property jpayne@69: * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<< jpayne@69: * return self.cval.real jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L0:; jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "cpython/complex.pxd":23 jpayne@69: * jpayne@69: * @property jpayne@69: * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<< jpayne@69: * return self.cval.imag jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { jpayne@69: double __pyx_r; jpayne@69: jpayne@69: /* "cpython/complex.pxd":24 jpayne@69: * @property jpayne@69: * cdef inline double imag(self) noexcept: jpayne@69: * return self.cval.imag # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # PyTypeObject PyComplex_Type jpayne@69: */ jpayne@69: __pyx_r = __pyx_v_self->cval.imag; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "cpython/complex.pxd":23 jpayne@69: * jpayne@69: * @property jpayne@69: * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<< jpayne@69: * return self.cval.imag jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L0:; jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":112 jpayne@69: * jpayne@69: * jpayne@69: * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< jpayne@69: * """Return a new reference to the value of the context variable, jpayne@69: * or the default value of the context variable, jpayne@69: */ jpayne@69: jpayne@69: 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) { jpayne@69: PyObject *__pyx_v_default_value = ((PyObject *)Py_None); jpayne@69: PyObject *__pyx_v_value; jpayne@69: PyObject *__pyx_v_pyvalue = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_t_1; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("get_value", 1); jpayne@69: if (__pyx_optional_args) { jpayne@69: if (__pyx_optional_args->__pyx_n > 0) { jpayne@69: __pyx_v_default_value = __pyx_optional_args->default_value; jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":117 jpayne@69: * or None if no such value or default was found. jpayne@69: * """ jpayne@69: * cdef PyObject *value = NULL # <<<<<<<<<<<<<< jpayne@69: * PyContextVar_Get(var, NULL, &value) jpayne@69: * if value is NULL: jpayne@69: */ jpayne@69: __pyx_v_value = NULL; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":118 jpayne@69: * """ jpayne@69: * cdef PyObject *value = NULL jpayne@69: * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< jpayne@69: * if value is NULL: jpayne@69: * # context variable does not have a default jpayne@69: */ jpayne@69: __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 118, __pyx_L1_error) jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":119 jpayne@69: * cdef PyObject *value = NULL jpayne@69: * PyContextVar_Get(var, NULL, &value) jpayne@69: * if value is NULL: # <<<<<<<<<<<<<< jpayne@69: * # context variable does not have a default jpayne@69: * pyvalue = default_value jpayne@69: */ jpayne@69: __pyx_t_2 = (__pyx_v_value == NULL); jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":121 jpayne@69: * if value is NULL: jpayne@69: * # context variable does not have a default jpayne@69: * pyvalue = default_value # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * # value or default value of context variable jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_v_default_value); jpayne@69: __pyx_v_pyvalue = __pyx_v_default_value; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":119 jpayne@69: * cdef PyObject *value = NULL jpayne@69: * PyContextVar_Get(var, NULL, &value) jpayne@69: * if value is NULL: # <<<<<<<<<<<<<< jpayne@69: * # context variable does not have a default jpayne@69: * pyvalue = default_value jpayne@69: */ jpayne@69: goto __pyx_L3; jpayne@69: } jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":124 jpayne@69: * else: jpayne@69: * # value or default value of context variable jpayne@69: * pyvalue = value # <<<<<<<<<<<<<< jpayne@69: * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' jpayne@69: * return pyvalue jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_3 = ((PyObject *)__pyx_v_value); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __pyx_v_pyvalue = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":125 jpayne@69: * # value or default value of context variable jpayne@69: * pyvalue = value jpayne@69: * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< jpayne@69: * return pyvalue jpayne@69: * jpayne@69: */ jpayne@69: Py_XDECREF(__pyx_v_value); jpayne@69: } jpayne@69: __pyx_L3:; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":126 jpayne@69: * pyvalue = value jpayne@69: * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' jpayne@69: * return pyvalue # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_pyvalue); jpayne@69: __pyx_r = __pyx_v_pyvalue; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":112 jpayne@69: * jpayne@69: * jpayne@69: * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< jpayne@69: * """Return a new reference to the value of the context variable, jpayne@69: * or the default value of the context variable, jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = 0; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_pyvalue); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":129 jpayne@69: * jpayne@69: * jpayne@69: * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< jpayne@69: * """Return a new reference to the value of the context variable, jpayne@69: * or the provided default value if no such value was found. jpayne@69: */ jpayne@69: jpayne@69: 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) { jpayne@69: PyObject *__pyx_v_default_value = ((PyObject *)Py_None); jpayne@69: PyObject *__pyx_v_value; jpayne@69: PyObject *__pyx_v_pyvalue = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_t_1; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("get_value_no_default", 1); jpayne@69: if (__pyx_optional_args) { jpayne@69: if (__pyx_optional_args->__pyx_n > 0) { jpayne@69: __pyx_v_default_value = __pyx_optional_args->default_value; jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":135 jpayne@69: * Ignores the default value of the context variable, if any. jpayne@69: * """ jpayne@69: * cdef PyObject *value = NULL # <<<<<<<<<<<<<< jpayne@69: * PyContextVar_Get(var, default_value, &value) jpayne@69: * # value of context variable or 'default_value' jpayne@69: */ jpayne@69: __pyx_v_value = NULL; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":136 jpayne@69: * """ jpayne@69: * cdef PyObject *value = NULL jpayne@69: * PyContextVar_Get(var, default_value, &value) # <<<<<<<<<<<<<< jpayne@69: * # value of context variable or 'default_value' jpayne@69: * pyvalue = value jpayne@69: */ jpayne@69: __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(2, 136, __pyx_L1_error) jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":138 jpayne@69: * PyContextVar_Get(var, default_value, &value) jpayne@69: * # value of context variable or 'default_value' jpayne@69: * pyvalue = value # <<<<<<<<<<<<<< jpayne@69: * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' jpayne@69: * return pyvalue jpayne@69: */ jpayne@69: __pyx_t_2 = ((PyObject *)__pyx_v_value); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_v_pyvalue = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":139 jpayne@69: * # value of context variable or 'default_value' jpayne@69: * pyvalue = value jpayne@69: * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< jpayne@69: * return pyvalue jpayne@69: */ jpayne@69: Py_XDECREF(__pyx_v_value); jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":140 jpayne@69: * pyvalue = value jpayne@69: * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' jpayne@69: * return pyvalue # <<<<<<<<<<<<<< jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_pyvalue); jpayne@69: __pyx_r = __pyx_v_pyvalue; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "cpython/contextvars.pxd":129 jpayne@69: * jpayne@69: * jpayne@69: * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< jpayne@69: * """Return a new reference to the value of the context variable, jpayne@69: * or the provided default value if no such value was found. jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = 0; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_pyvalue); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":104 jpayne@69: * __data_union data jpayne@69: * jpayne@69: * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< jpayne@69: * # This implementation of getbuffer is geared towards Cython jpayne@69: * # requirements, and does not yet fulfill the PEP. jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: 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*/ jpayne@69: CYTHON_UNUSED static int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: int __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) { jpayne@69: PyObject *__pyx_v_item_count = NULL; jpayne@69: int __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: char *__pyx_t_2; jpayne@69: int __pyx_t_3; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: Py_ssize_t __pyx_t_5; jpayne@69: int __pyx_t_6; jpayne@69: char __pyx_t_7; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: if (unlikely(__pyx_v_info == NULL)) { jpayne@69: PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); jpayne@69: return -1; jpayne@69: } jpayne@69: __Pyx_RefNannySetupContext("__getbuffer__", 0); jpayne@69: __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); jpayne@69: __Pyx_GIVEREF(__pyx_v_info->obj); jpayne@69: jpayne@69: /* "array.pxd":109 jpayne@69: * # In particular strided access is always provided regardless jpayne@69: * # of flags jpayne@69: * item_count = Py_SIZE(self) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * info.suboffsets = NULL jpayne@69: */ jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 109, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_item_count = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "array.pxd":111 jpayne@69: * item_count = Py_SIZE(self) jpayne@69: * jpayne@69: * info.suboffsets = NULL # <<<<<<<<<<<<<< jpayne@69: * info.buf = self.data.as_chars jpayne@69: * info.readonly = 0 jpayne@69: */ jpayne@69: __pyx_v_info->suboffsets = NULL; jpayne@69: jpayne@69: /* "array.pxd":112 jpayne@69: * jpayne@69: * info.suboffsets = NULL jpayne@69: * info.buf = self.data.as_chars # <<<<<<<<<<<<<< jpayne@69: * info.readonly = 0 jpayne@69: * info.ndim = 1 jpayne@69: */ jpayne@69: __pyx_t_2 = __pyx_v_self->data.as_chars; jpayne@69: __pyx_v_info->buf = __pyx_t_2; jpayne@69: jpayne@69: /* "array.pxd":113 jpayne@69: * info.suboffsets = NULL jpayne@69: * info.buf = self.data.as_chars jpayne@69: * info.readonly = 0 # <<<<<<<<<<<<<< jpayne@69: * info.ndim = 1 jpayne@69: * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) jpayne@69: */ jpayne@69: __pyx_v_info->readonly = 0; jpayne@69: jpayne@69: /* "array.pxd":114 jpayne@69: * info.buf = self.data.as_chars jpayne@69: * info.readonly = 0 jpayne@69: * info.ndim = 1 # <<<<<<<<<<<<<< jpayne@69: * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) jpayne@69: * info.len = info.itemsize * item_count jpayne@69: */ jpayne@69: __pyx_v_info->ndim = 1; jpayne@69: jpayne@69: /* "array.pxd":115 jpayne@69: * info.readonly = 0 jpayne@69: * info.ndim = 1 jpayne@69: * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<< jpayne@69: * info.len = info.itemsize * item_count jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_3 = __pyx_v_self->ob_descr->itemsize; jpayne@69: __pyx_v_info->itemsize = __pyx_t_3; jpayne@69: jpayne@69: /* "array.pxd":116 jpayne@69: * info.ndim = 1 jpayne@69: * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) jpayne@69: * info.len = info.itemsize * item_count # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) jpayne@69: */ jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 116, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 116, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 116, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_v_info->len = __pyx_t_5; jpayne@69: jpayne@69: /* "array.pxd":118 jpayne@69: * info.len = info.itemsize * item_count jpayne@69: * jpayne@69: * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<< jpayne@69: * if not info.shape: jpayne@69: * raise MemoryError() jpayne@69: */ jpayne@69: __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2))); jpayne@69: jpayne@69: /* "array.pxd":119 jpayne@69: * jpayne@69: * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) jpayne@69: * if not info.shape: # <<<<<<<<<<<<<< jpayne@69: * raise MemoryError() jpayne@69: * info.shape[0] = item_count # constant regardless of resizing jpayne@69: */ jpayne@69: __pyx_t_6 = (!(__pyx_v_info->shape != 0)); jpayne@69: if (unlikely(__pyx_t_6)) { jpayne@69: jpayne@69: /* "array.pxd":120 jpayne@69: * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) jpayne@69: * if not info.shape: jpayne@69: * raise MemoryError() # <<<<<<<<<<<<<< jpayne@69: * info.shape[0] = item_count # constant regardless of resizing jpayne@69: * info.strides = &info.itemsize jpayne@69: */ jpayne@69: PyErr_NoMemory(); __PYX_ERR(3, 120, __pyx_L1_error) jpayne@69: jpayne@69: /* "array.pxd":119 jpayne@69: * jpayne@69: * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) jpayne@69: * if not info.shape: # <<<<<<<<<<<<<< jpayne@69: * raise MemoryError() jpayne@69: * info.shape[0] = item_count # constant regardless of resizing jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":121 jpayne@69: * if not info.shape: jpayne@69: * raise MemoryError() jpayne@69: * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<< jpayne@69: * info.strides = &info.itemsize jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 121, __pyx_L1_error) jpayne@69: (__pyx_v_info->shape[0]) = __pyx_t_5; jpayne@69: jpayne@69: /* "array.pxd":122 jpayne@69: * raise MemoryError() jpayne@69: * info.shape[0] = item_count # constant regardless of resizing jpayne@69: * info.strides = &info.itemsize # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * info.format = (info.shape + 1) jpayne@69: */ jpayne@69: __pyx_v_info->strides = (&__pyx_v_info->itemsize); jpayne@69: jpayne@69: /* "array.pxd":124 jpayne@69: * info.strides = &info.itemsize jpayne@69: * jpayne@69: * info.format = (info.shape + 1) # <<<<<<<<<<<<<< jpayne@69: * info.format[0] = self.ob_descr.typecode jpayne@69: * info.format[1] = 0 jpayne@69: */ jpayne@69: __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1)); jpayne@69: jpayne@69: /* "array.pxd":125 jpayne@69: * jpayne@69: * info.format = (info.shape + 1) jpayne@69: * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<< jpayne@69: * info.format[1] = 0 jpayne@69: * info.obj = self jpayne@69: */ jpayne@69: __pyx_t_7 = __pyx_v_self->ob_descr->typecode; jpayne@69: (__pyx_v_info->format[0]) = __pyx_t_7; jpayne@69: jpayne@69: /* "array.pxd":126 jpayne@69: * info.format = (info.shape + 1) jpayne@69: * info.format[0] = self.ob_descr.typecode jpayne@69: * info.format[1] = 0 # <<<<<<<<<<<<<< jpayne@69: * info.obj = self jpayne@69: * jpayne@69: */ jpayne@69: (__pyx_v_info->format[1]) = 0; jpayne@69: jpayne@69: /* "array.pxd":127 jpayne@69: * info.format[0] = self.ob_descr.typecode jpayne@69: * info.format[1] = 0 jpayne@69: * info.obj = self # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def __releasebuffer__(self, Py_buffer* info): jpayne@69: */ jpayne@69: __Pyx_INCREF((PyObject *)__pyx_v_self); jpayne@69: __Pyx_GIVEREF((PyObject *)__pyx_v_self); jpayne@69: __Pyx_GOTREF(__pyx_v_info->obj); jpayne@69: __Pyx_DECREF(__pyx_v_info->obj); jpayne@69: __pyx_v_info->obj = ((PyObject *)__pyx_v_self); jpayne@69: jpayne@69: /* "array.pxd":104 jpayne@69: * __data_union data jpayne@69: * jpayne@69: * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< jpayne@69: * # This implementation of getbuffer is geared towards Cython jpayne@69: * # requirements, and does not yet fulfill the PEP. jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = 0; jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = -1; jpayne@69: if (__pyx_v_info->obj != NULL) { jpayne@69: __Pyx_GOTREF(__pyx_v_info->obj); jpayne@69: __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; jpayne@69: } jpayne@69: goto __pyx_L2; jpayne@69: __pyx_L0:; jpayne@69: if (__pyx_v_info->obj == Py_None) { jpayne@69: __Pyx_GOTREF(__pyx_v_info->obj); jpayne@69: __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; jpayne@69: } jpayne@69: __pyx_L2:; jpayne@69: __Pyx_XDECREF(__pyx_v_item_count); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":129 jpayne@69: * info.obj = self jpayne@69: * jpayne@69: * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< jpayne@69: * PyObject_Free(info.shape) jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ jpayne@69: CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: } jpayne@69: jpayne@69: static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) { jpayne@69: jpayne@69: /* "array.pxd":130 jpayne@69: * jpayne@69: * def __releasebuffer__(self, Py_buffer* info): jpayne@69: * PyObject_Free(info.shape) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr) jpayne@69: */ jpayne@69: PyObject_Free(__pyx_v_info->shape); jpayne@69: jpayne@69: /* "array.pxd":129 jpayne@69: * info.obj = self jpayne@69: * jpayne@69: * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< jpayne@69: * PyObject_Free(info.shape) jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":141 jpayne@69: * jpayne@69: * jpayne@69: * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< jpayne@69: * """ fast creation of a new array, given a template array. jpayne@69: * type will be same as template. jpayne@69: */ jpayne@69: jpayne@69: static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) { jpayne@69: arrayobject *__pyx_v_op = 0; jpayne@69: arrayobject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: int __pyx_t_3; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("clone", 1); jpayne@69: jpayne@69: /* "array.pxd":145 jpayne@69: * type will be same as template. jpayne@69: * if zero is true, new array will be initialized with zeroes.""" jpayne@69: * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<< jpayne@69: * if zero and op is not None: jpayne@69: * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) jpayne@69: */ jpayne@69: __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(3, 145, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_op = ((arrayobject *)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "array.pxd":146 jpayne@69: * if zero is true, new array will be initialized with zeroes.""" jpayne@69: * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) jpayne@69: * if zero and op is not None: # <<<<<<<<<<<<<< jpayne@69: * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) jpayne@69: * return op jpayne@69: */ jpayne@69: if (__pyx_v_zero) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_v_zero; jpayne@69: goto __pyx_L4_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None); jpayne@69: __pyx_t_2 = __pyx_t_3; jpayne@69: __pyx_L4_bool_binop_done:; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "array.pxd":147 jpayne@69: * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) jpayne@69: * if zero and op is not None: jpayne@69: * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<< jpayne@69: * return op jpayne@69: * jpayne@69: */ jpayne@69: (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize))); jpayne@69: jpayne@69: /* "array.pxd":146 jpayne@69: * if zero is true, new array will be initialized with zeroes.""" jpayne@69: * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) jpayne@69: * if zero and op is not None: # <<<<<<<<<<<<<< jpayne@69: * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) jpayne@69: * return op jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":148 jpayne@69: * if zero and op is not None: jpayne@69: * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) jpayne@69: * return op # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef inline array copy(array self): jpayne@69: */ jpayne@69: __Pyx_XDECREF((PyObject *)__pyx_r); jpayne@69: __Pyx_INCREF((PyObject *)__pyx_v_op); jpayne@69: __pyx_r = __pyx_v_op; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "array.pxd":141 jpayne@69: * jpayne@69: * jpayne@69: * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< jpayne@69: * """ fast creation of a new array, given a template array. jpayne@69: * type will be same as template. jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = 0; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF((PyObject *)__pyx_v_op); jpayne@69: __Pyx_XGIVEREF((PyObject *)__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":150 jpayne@69: * return op jpayne@69: * jpayne@69: * cdef inline array copy(array self): # <<<<<<<<<<<<<< jpayne@69: * """ make a copy of an array. """ jpayne@69: * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) jpayne@69: */ jpayne@69: jpayne@69: static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) { jpayne@69: arrayobject *__pyx_v_op = 0; jpayne@69: arrayobject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("copy", 1); jpayne@69: jpayne@69: /* "array.pxd":152 jpayne@69: * cdef inline array copy(array self): jpayne@69: * """ make a copy of an array. """ jpayne@69: * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<< jpayne@69: * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) jpayne@69: * return op jpayne@69: */ jpayne@69: __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(3, 152, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_op = ((arrayobject *)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "array.pxd":153 jpayne@69: * """ make a copy of an array. """ jpayne@69: * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) jpayne@69: * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<< jpayne@69: * return op jpayne@69: * jpayne@69: */ jpayne@69: (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))); jpayne@69: jpayne@69: /* "array.pxd":154 jpayne@69: * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) jpayne@69: * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) jpayne@69: * return op # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: jpayne@69: */ jpayne@69: __Pyx_XDECREF((PyObject *)__pyx_r); jpayne@69: __Pyx_INCREF((PyObject *)__pyx_v_op); jpayne@69: __pyx_r = __pyx_v_op; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "array.pxd":150 jpayne@69: * return op jpayne@69: * jpayne@69: * cdef inline array copy(array self): # <<<<<<<<<<<<<< jpayne@69: * """ make a copy of an array. """ jpayne@69: * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = 0; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF((PyObject *)__pyx_v_op); jpayne@69: __Pyx_XGIVEREF((PyObject *)__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":156 jpayne@69: * return op jpayne@69: * jpayne@69: * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< jpayne@69: * """ efficient appending of new stuff of same type jpayne@69: * (e.g. of same array type) jpayne@69: */ jpayne@69: jpayne@69: static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) { jpayne@69: Py_ssize_t __pyx_v_itemsize; jpayne@69: Py_ssize_t __pyx_v_origsize; jpayne@69: int __pyx_r; jpayne@69: int __pyx_t_1; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: jpayne@69: /* "array.pxd":160 jpayne@69: * (e.g. of same array type) jpayne@69: * n: number of elements (not number of bytes!) """ jpayne@69: * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<< jpayne@69: * cdef Py_ssize_t origsize = Py_SIZE(self) jpayne@69: * resize_smart(self, origsize + n) jpayne@69: */ jpayne@69: __pyx_t_1 = __pyx_v_self->ob_descr->itemsize; jpayne@69: __pyx_v_itemsize = __pyx_t_1; jpayne@69: jpayne@69: /* "array.pxd":161 jpayne@69: * n: number of elements (not number of bytes!) """ jpayne@69: * cdef Py_ssize_t itemsize = self.ob_descr.itemsize jpayne@69: * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<< jpayne@69: * resize_smart(self, origsize + n) jpayne@69: * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) jpayne@69: */ jpayne@69: __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self)); jpayne@69: jpayne@69: /* "array.pxd":162 jpayne@69: * cdef Py_ssize_t itemsize = self.ob_descr.itemsize jpayne@69: * cdef Py_ssize_t origsize = Py_SIZE(self) jpayne@69: * resize_smart(self, origsize + n) # <<<<<<<<<<<<<< jpayne@69: * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) jpayne@69: * return 0 jpayne@69: */ jpayne@69: __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 162, __pyx_L1_error) jpayne@69: jpayne@69: /* "array.pxd":163 jpayne@69: * cdef Py_ssize_t origsize = Py_SIZE(self) jpayne@69: * resize_smart(self, origsize + n) jpayne@69: * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<< jpayne@69: * return 0 jpayne@69: * jpayne@69: */ jpayne@69: (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize))); jpayne@69: jpayne@69: /* "array.pxd":164 jpayne@69: * resize_smart(self, origsize + n) jpayne@69: * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) jpayne@69: * return 0 # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef inline int extend(array self, array other) except -1: jpayne@69: */ jpayne@69: __pyx_r = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "array.pxd":156 jpayne@69: * return op jpayne@69: * jpayne@69: * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< jpayne@69: * """ efficient appending of new stuff of same type jpayne@69: * (e.g. of same array type) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = -1; jpayne@69: __pyx_L0:; jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":166 jpayne@69: * return 0 jpayne@69: * jpayne@69: * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< jpayne@69: * """ extend array with data from another array; types must match. """ jpayne@69: * if self.ob_descr.typecode != other.ob_descr.typecode: jpayne@69: */ jpayne@69: jpayne@69: static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) { jpayne@69: int __pyx_r; jpayne@69: int __pyx_t_1; jpayne@69: int __pyx_t_2; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: jpayne@69: /* "array.pxd":168 jpayne@69: * cdef inline int extend(array self, array other) except -1: jpayne@69: * """ extend array with data from another array; types must match. """ jpayne@69: * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< jpayne@69: * PyErr_BadArgument() jpayne@69: * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) jpayne@69: */ jpayne@69: __pyx_t_1 = (__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode); jpayne@69: if (__pyx_t_1) { jpayne@69: jpayne@69: /* "array.pxd":169 jpayne@69: * """ extend array with data from another array; types must match. """ jpayne@69: * if self.ob_descr.typecode != other.ob_descr.typecode: jpayne@69: * PyErr_BadArgument() # <<<<<<<<<<<<<< jpayne@69: * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(3, 169, __pyx_L1_error) jpayne@69: jpayne@69: /* "array.pxd":168 jpayne@69: * cdef inline int extend(array self, array other) except -1: jpayne@69: * """ extend array with data from another array; types must match. """ jpayne@69: * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< jpayne@69: * PyErr_BadArgument() jpayne@69: * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":170 jpayne@69: * if self.ob_descr.typecode != other.ob_descr.typecode: jpayne@69: * PyErr_BadArgument() jpayne@69: * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef inline void zero(array self) noexcept: jpayne@69: */ jpayne@69: __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(3, 170, __pyx_L1_error) jpayne@69: __pyx_r = __pyx_t_2; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "array.pxd":166 jpayne@69: * return 0 jpayne@69: * jpayne@69: * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< jpayne@69: * """ extend array with data from another array; types must match. """ jpayne@69: * if self.ob_descr.typecode != other.ob_descr.typecode: jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = -1; jpayne@69: __pyx_L0:; jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "array.pxd":172 jpayne@69: * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) jpayne@69: * jpayne@69: * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<< jpayne@69: * """ set all elements of array to zero. """ jpayne@69: * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) jpayne@69: */ jpayne@69: jpayne@69: static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) { jpayne@69: jpayne@69: /* "array.pxd":174 jpayne@69: * cdef inline void zero(array self) noexcept: jpayne@69: * """ set all elements of array to zero. """ jpayne@69: * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<< jpayne@69: */ jpayne@69: (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize))); jpayne@69: jpayne@69: /* "array.pxd":172 jpayne@69: * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) jpayne@69: * jpayne@69: * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<< jpayne@69: * """ set all elements of array to zero. """ jpayne@69: * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":68 jpayne@69: * jpayne@69: * # Utility function. Uses 0-based coordinates jpayne@69: * def get_sequence(chrom, start, end, fa): # <<<<<<<<<<<<<< jpayne@69: * # obtain sequence from .fa file, without truncation jpayne@69: * if end<=start: return "" jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_1get_sequence(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_get_sequence, "get_sequence(chrom, start, end, fa)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_1get_sequence = {"get_sequence", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_1get_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_get_sequence}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_1get_sequence(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_chrom = 0; jpayne@69: PyObject *__pyx_v_start = 0; jpayne@69: PyObject *__pyx_v_end = 0; jpayne@69: PyObject *__pyx_v_fa = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[4] = {0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("get_sequence (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_chrom,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_fa,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chrom)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 1); __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 2); __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fa)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 3); __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_sequence") < 0)) __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 4)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: } jpayne@69: __pyx_v_chrom = values[0]; jpayne@69: __pyx_v_start = values[1]; jpayne@69: __pyx_v_end = values[2]; jpayne@69: __pyx_v_fa = values[3]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 68, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.get_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_get_sequence(__pyx_self, __pyx_v_chrom, __pyx_v_start, __pyx_v_end, __pyx_v_fa); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_get_sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_fa) { jpayne@69: PyObject *__pyx_v_sequence = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: int __pyx_t_3; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: unsigned int __pyx_t_8; jpayne@69: Py_ssize_t __pyx_t_9; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("get_sequence", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":70 jpayne@69: * def get_sequence(chrom, start, end, fa): jpayne@69: * # obtain sequence from .fa file, without truncation jpayne@69: * if end<=start: return "" # <<<<<<<<<<<<<< jpayne@69: * if not fa: return "N"*(end-start) jpayne@69: * if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper() jpayne@69: */ jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_v_end, __pyx_v_start, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 70, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_kp_u_); jpayne@69: __pyx_r = __pyx_kp_u_; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":71 jpayne@69: * # obtain sequence from .fa file, without truncation jpayne@69: * if end<=start: return "" jpayne@69: * if not fa: return "N"*(end-start) # <<<<<<<<<<<<<< jpayne@69: * if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper() jpayne@69: * sequence = fa.fetch(chrom, start, end).upper() jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fa); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 71, __pyx_L1_error) jpayne@69: __pyx_t_3 = (!__pyx_t_2); jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_4 = PyNumber_Multiply(__pyx_n_u_N, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_r = __pyx_t_4; jpayne@69: __pyx_t_4 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":72 jpayne@69: * if end<=start: return "" jpayne@69: * if not fa: return "N"*(end-start) jpayne@69: * if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper() # <<<<<<<<<<<<<< jpayne@69: * sequence = fa.fetch(chrom, start, end).upper() jpayne@69: * if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence)) jpayne@69: */ jpayne@69: __pyx_t_4 = PyObject_RichCompare(__pyx_v_start, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_4 = PyNumber_Negative(__pyx_v_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = PyNumber_Multiply(__pyx_n_u_N, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_7, __pyx_v_chrom, __pyx_int_0, __pyx_v_end, __pyx_v_fa}; jpayne@69: __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 4+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_upper); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_r = __pyx_t_6; jpayne@69: __pyx_t_6 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":73 jpayne@69: * if not fa: return "N"*(end-start) jpayne@69: * if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper() jpayne@69: * sequence = fa.fetch(chrom, start, end).upper() # <<<<<<<<<<<<<< jpayne@69: * if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence)) jpayne@69: * return sequence jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fa, __pyx_n_s_fetch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_chrom, __pyx_v_start, __pyx_v_end}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 3+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_v_sequence = __pyx_t_6; jpayne@69: __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":74 jpayne@69: * if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper() jpayne@69: * sequence = fa.fetch(chrom, start, end).upper() jpayne@69: * if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence)) # <<<<<<<<<<<<<< jpayne@69: * return sequence jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_1 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __pyx_t_4 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyNumber_Multiply(__pyx_n_u_N, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_sequence, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_sequence, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":75 jpayne@69: * sequence = fa.fetch(chrom, start, end).upper() jpayne@69: * if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence)) jpayne@69: * return sequence # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # Utility function. Parses a region string jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_sequence); jpayne@69: __pyx_r = __pyx_v_sequence; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":68 jpayne@69: * jpayne@69: * # Utility function. Uses 0-based coordinates jpayne@69: * def get_sequence(chrom, start, end, fa): # <<<<<<<<<<<<<< jpayne@69: * # obtain sequence from .fa file, without truncation jpayne@69: * if end<=start: return "" jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.get_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_sequence); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":78 jpayne@69: * jpayne@69: * # Utility function. Parses a region string jpayne@69: * def parse_regions( string ): # <<<<<<<<<<<<<< jpayne@69: * result = [] jpayne@69: * for r in string.split(','): jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3parse_regions(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_2parse_regions, "parse_regions(string)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3parse_regions = {"parse_regions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3parse_regions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_2parse_regions}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3parse_regions(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_string = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("parse_regions (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_string)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 78, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_regions") < 0)) __PYX_ERR(0, 78, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_string = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_regions", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 78, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.parse_regions", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_2parse_regions(__pyx_self, __pyx_v_string); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_2parse_regions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string) { jpayne@69: PyObject *__pyx_v_result = NULL; jpayne@69: PyObject *__pyx_v_r = NULL; jpayne@69: PyObject *__pyx_v_elts = NULL; jpayne@69: PyObject *__pyx_v_chrom = NULL; jpayne@69: PyObject *__pyx_v_start = NULL; jpayne@69: PyObject *__pyx_v_end = NULL; jpayne@69: PyObject *__pyx_v_ielts = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: Py_ssize_t __pyx_t_5; jpayne@69: PyObject *(*__pyx_t_6)(PyObject *); jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: Py_ssize_t __pyx_t_8; jpayne@69: int __pyx_t_9; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: PyObject *__pyx_t_13 = NULL; jpayne@69: PyObject *__pyx_t_14 = NULL; jpayne@69: int __pyx_t_15; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("parse_regions", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":79 jpayne@69: * # Utility function. Parses a region string jpayne@69: * def parse_regions( string ): jpayne@69: * result = [] # <<<<<<<<<<<<<< jpayne@69: * for r in string.split(','): jpayne@69: * elts = r.split(':') jpayne@69: */ jpayne@69: __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_result = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":80 jpayne@69: * def parse_regions( string ): jpayne@69: * result = [] jpayne@69: * for r in string.split(','): # <<<<<<<<<<<<<< jpayne@69: * elts = r.split(':') jpayne@69: * chrom, start, end = elts[0], 0, 3000000000 jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__2}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { jpayne@69: __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_5 = 0; jpayne@69: __pyx_t_6 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_6)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_5 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_5 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_6(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 80, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":81 jpayne@69: * result = [] jpayne@69: * for r in string.split(','): jpayne@69: * elts = r.split(':') # <<<<<<<<<<<<<< jpayne@69: * chrom, start, end = elts[0], 0, 3000000000 jpayne@69: * if len(elts)==1: pass jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u__3}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_elts, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":82 jpayne@69: * for r in string.split(','): jpayne@69: * elts = r.split(':') jpayne@69: * chrom, start, end = elts[0], 0, 3000000000 # <<<<<<<<<<<<<< jpayne@69: * if len(elts)==1: pass jpayne@69: * elif len(elts)==2: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __pyx_int_0; jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __pyx_t_7 = __pyx_int_3000000000; jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_chrom, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_start, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_end, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":83 jpayne@69: * elts = r.split(':') jpayne@69: * chrom, start, end = elts[0], 0, 3000000000 jpayne@69: * if len(elts)==1: pass # <<<<<<<<<<<<<< jpayne@69: * elif len(elts)==2: jpayne@69: * if len(elts[1])>0: jpayne@69: */ jpayne@69: __pyx_t_8 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 83, __pyx_L1_error) jpayne@69: __pyx_t_9 = (__pyx_t_8 == 1); jpayne@69: if (__pyx_t_9) { jpayne@69: goto __pyx_L5; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":84 jpayne@69: * chrom, start, end = elts[0], 0, 3000000000 jpayne@69: * if len(elts)==1: pass jpayne@69: * elif len(elts)==2: # <<<<<<<<<<<<<< jpayne@69: * if len(elts[1])>0: jpayne@69: * ielts = elts[1].split('-') jpayne@69: */ jpayne@69: __pyx_t_8 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 84, __pyx_L1_error) jpayne@69: __pyx_t_9 = (__pyx_t_8 == 2); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":85 jpayne@69: * if len(elts)==1: pass jpayne@69: * elif len(elts)==2: jpayne@69: * if len(elts[1])>0: # <<<<<<<<<<<<<< jpayne@69: * ielts = elts[1].split('-') jpayne@69: * if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r) jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 85, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_8 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 85, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_9 = (__pyx_t_8 > 0); jpayne@69: if (__pyx_t_9) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":86 jpayne@69: * elif len(elts)==2: jpayne@69: * if len(elts[1])>0: jpayne@69: * ielts = elts[1].split('-') # <<<<<<<<<<<<<< jpayne@69: * if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r) jpayne@69: * try: start, end = int(ielts[0])-1, int(ielts[1]) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__4}; jpayne@69: __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 86, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_ielts, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":87 jpayne@69: * if len(elts[1])>0: jpayne@69: * ielts = elts[1].split('-') jpayne@69: * if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r) # <<<<<<<<<<<<<< jpayne@69: * try: start, end = int(ielts[0])-1, int(ielts[1]) jpayne@69: * except: raise ValueError("Don't understand region string '%s'" % r) jpayne@69: */ jpayne@69: __pyx_t_8 = PyObject_Length(__pyx_v_ielts); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 87, __pyx_L1_error) jpayne@69: __pyx_t_9 = (__pyx_t_8 != 2); jpayne@69: if (__pyx_t_9) { jpayne@69: __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Don_t_understand_region_string_s, __pyx_v_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 87, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":88 jpayne@69: * ielts = elts[1].split('-') jpayne@69: * if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r) jpayne@69: * try: start, end = int(ielts[0])-1, int(ielts[1]) # <<<<<<<<<<<<<< jpayne@69: * except: raise ValueError("Don't understand region string '%s'" % r) jpayne@69: * else: jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); jpayne@69: __Pyx_XGOTREF(__pyx_t_10); jpayne@69: __Pyx_XGOTREF(__pyx_t_11); jpayne@69: __Pyx_XGOTREF(__pyx_t_12); jpayne@69: /*try:*/ { jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ielts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L8_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 88, __pyx_L8_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_7, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L8_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_ielts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 88, __pyx_L8_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L8_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_end, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: goto __pyx_L15_try_end; jpayne@69: __pyx_L8_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":89 jpayne@69: * if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r) jpayne@69: * try: start, end = int(ielts[0])-1, int(ielts[1]) jpayne@69: * except: raise ValueError("Don't understand region string '%s'" % r) # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * raise ValueError("Don't understand region string '%s'" % r) jpayne@69: */ jpayne@69: /*except:*/ { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.parse_regions", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 89, __pyx_L10_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_3); jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_7); jpayne@69: __pyx_t_13 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Don_t_understand_region_string_s, __pyx_v_r); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 89, __pyx_L10_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_13); jpayne@69: __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 89, __pyx_L10_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_14); jpayne@69: __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: __Pyx_Raise(__pyx_t_14, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: __PYX_ERR(0, 89, __pyx_L10_except_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":88 jpayne@69: * ielts = elts[1].split('-') jpayne@69: * if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r) jpayne@69: * try: start, end = int(ielts[0])-1, int(ielts[1]) # <<<<<<<<<<<<<< jpayne@69: * except: raise ValueError("Don't understand region string '%s'" % r) jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_L10_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_10); jpayne@69: __Pyx_XGIVEREF(__pyx_t_11); jpayne@69: __Pyx_XGIVEREF(__pyx_t_12); jpayne@69: __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L15_try_end:; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":85 jpayne@69: * if len(elts)==1: pass jpayne@69: * elif len(elts)==2: jpayne@69: * if len(elts[1])>0: # <<<<<<<<<<<<<< jpayne@69: * ielts = elts[1].split('-') jpayne@69: * if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":84 jpayne@69: * chrom, start, end = elts[0], 0, 3000000000 jpayne@69: * if len(elts)==1: pass jpayne@69: * elif len(elts)==2: # <<<<<<<<<<<<<< jpayne@69: * if len(elts[1])>0: jpayne@69: * ielts = elts[1].split('-') jpayne@69: */ jpayne@69: goto __pyx_L5; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":91 jpayne@69: * except: raise ValueError("Don't understand region string '%s'" % r) jpayne@69: * else: jpayne@69: * raise ValueError("Don't understand region string '%s'" % r) # <<<<<<<<<<<<<< jpayne@69: * result.append( (chrom,start,end) ) jpayne@69: * return result jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Don_t_understand_region_string_s, __pyx_v_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 91, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_Raise(__pyx_t_1, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __PYX_ERR(0, 91, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_L5:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":92 jpayne@69: * else: jpayne@69: * raise ValueError("Don't understand region string '%s'" % r) jpayne@69: * result.append( (chrom,start,end) ) # <<<<<<<<<<<<<< jpayne@69: * return result jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_v_chrom); jpayne@69: __Pyx_GIVEREF(__pyx_v_chrom); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom)) __PYX_ERR(0, 92, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_start); jpayne@69: __Pyx_GIVEREF(__pyx_v_start); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start)) __PYX_ERR(0, 92, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_end); jpayne@69: __Pyx_GIVEREF(__pyx_v_end); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end)) __PYX_ERR(0, 92, __pyx_L1_error); jpayne@69: __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 92, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":80 jpayne@69: * def parse_regions( string ): jpayne@69: * result = [] jpayne@69: * for r in string.split(','): # <<<<<<<<<<<<<< jpayne@69: * elts = r.split(':') jpayne@69: * chrom, start, end = elts[0], 0, 3000000000 jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":93 jpayne@69: * raise ValueError("Don't understand region string '%s'" % r) jpayne@69: * result.append( (chrom,start,end) ) jpayne@69: * return result # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_result); jpayne@69: __pyx_r = __pyx_v_result; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":78 jpayne@69: * jpayne@69: * # Utility function. Parses a region string jpayne@69: * def parse_regions( string ): # <<<<<<<<<<<<<< jpayne@69: * result = [] jpayne@69: * for r in string.split(','): jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_13); jpayne@69: __Pyx_XDECREF(__pyx_t_14); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.parse_regions", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_result); jpayne@69: __Pyx_XDECREF(__pyx_v_r); jpayne@69: __Pyx_XDECREF(__pyx_v_elts); jpayne@69: __Pyx_XDECREF(__pyx_v_chrom); jpayne@69: __Pyx_XDECREF(__pyx_v_start); jpayne@69: __Pyx_XDECREF(__pyx_v_end); jpayne@69: __Pyx_XDECREF(__pyx_v_ielts); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":114 jpayne@69: * cdef uint32_t pos jpayne@69: * jpayne@69: * def __init__(self, vcf): # <<<<<<<<<<<<<< jpayne@69: * self.vcf = vcf jpayne@69: * self.encoding = vcf.encoding jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static int __pyx_pw_5pysam_7libcvcf_9VCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ jpayne@69: static int __pyx_pw_5pysam_7libcvcf_9VCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { jpayne@69: PyObject *__pyx_v_vcf = 0; jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: int __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vcf,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vcf)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_VARARGS(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 114, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_vcf = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 114, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return -1; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord___init__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self), __pyx_v_vcf); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static int __pyx_pf_5pysam_7libcvcf_9VCFRecord___init__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf) { jpayne@69: int __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__init__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":115 jpayne@69: * jpayne@69: * def __init__(self, vcf): jpayne@69: * self.vcf = vcf # <<<<<<<<<<<<<< jpayne@69: * self.encoding = vcf.encoding jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_v_vcf); jpayne@69: __Pyx_GIVEREF(__pyx_v_vcf); jpayne@69: __Pyx_GOTREF(__pyx_v_self->vcf); jpayne@69: __Pyx_DECREF(__pyx_v_self->vcf); jpayne@69: __pyx_v_self->vcf = __pyx_v_vcf; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":116 jpayne@69: * def __init__(self, vcf): jpayne@69: * self.vcf = vcf jpayne@69: * self.encoding = vcf.encoding # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # if len(data) != len(self.vcf._samples): jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vcf, __pyx_n_s_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: __Pyx_GOTREF(__pyx_v_self->__pyx_base.encoding); jpayne@69: __Pyx_DECREF(__pyx_v_self->__pyx_base.encoding); jpayne@69: __pyx_v_self->__pyx_base.encoding = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":114 jpayne@69: * cdef uint32_t pos jpayne@69: * jpayne@69: * def __init__(self, vcf): # <<<<<<<<<<<<<< jpayne@69: * self.vcf = vcf jpayne@69: * self.encoding = vcf.encoding jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = 0; jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = -1; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":127 jpayne@69: * # len(data))) jpayne@69: * jpayne@69: * def __cinit__(self, vcf): # <<<<<<<<<<<<<< jpayne@69: * # start indexed access at genotypes jpayne@69: * self.offset = 9 jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static int __pyx_pw_5pysam_7libcvcf_9VCFRecord_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ jpayne@69: static int __pyx_pw_5pysam_7libcvcf_9VCFRecord_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { jpayne@69: PyObject *__pyx_v_vcf = 0; jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: int __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vcf,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vcf)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_VARARGS(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 127, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_vcf = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 127, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return -1; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_2__cinit__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self), __pyx_v_vcf); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static int __pyx_pf_5pysam_7libcvcf_9VCFRecord_2__cinit__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf) { jpayne@69: int __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__cinit__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":129 jpayne@69: * def __cinit__(self, vcf): jpayne@69: * # start indexed access at genotypes jpayne@69: * self.offset = 9 # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * self.vcf = vcf jpayne@69: */ jpayne@69: __pyx_v_self->__pyx_base.offset = 9; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":131 jpayne@69: * self.offset = 9 jpayne@69: * jpayne@69: * self.vcf = vcf # <<<<<<<<<<<<<< jpayne@69: * self.encoding = vcf.encoding jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_v_vcf); jpayne@69: __Pyx_GIVEREF(__pyx_v_vcf); jpayne@69: __Pyx_GOTREF(__pyx_v_self->vcf); jpayne@69: __Pyx_DECREF(__pyx_v_self->vcf); jpayne@69: __pyx_v_self->vcf = __pyx_v_vcf; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":132 jpayne@69: * jpayne@69: * self.vcf = vcf jpayne@69: * self.encoding = vcf.encoding # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def error(self, line, error, opt=None): jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vcf, __pyx_n_s_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: __Pyx_GOTREF(__pyx_v_self->__pyx_base.encoding); jpayne@69: __Pyx_DECREF(__pyx_v_self->__pyx_base.encoding); jpayne@69: __pyx_v_self->__pyx_base.encoding = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":127 jpayne@69: * # len(data))) jpayne@69: * jpayne@69: * def __cinit__(self, vcf): # <<<<<<<<<<<<<< jpayne@69: * # start indexed access at genotypes jpayne@69: * self.offset = 9 jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = 0; jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = -1; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":134 jpayne@69: * self.encoding = vcf.encoding jpayne@69: * jpayne@69: * def error(self, line, error, opt=None): # <<<<<<<<<<<<<< jpayne@69: * '''raise error.''' jpayne@69: * # pass to vcf file for error handling jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_5error(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_9VCFRecord_4error, "VCFRecord.error(self, line, error, opt=None)\nraise error."); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_9VCFRecord_5error = {"error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_9VCFRecord_5error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_9VCFRecord_4error}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_5error(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: PyObject *__pyx_v_error = 0; jpayne@69: PyObject *__pyx_v_opt = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("error (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line,&__pyx_n_s_error,&__pyx_n_s_opt,0}; jpayne@69: values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_error)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("error", 0, 2, 3, 1); __PYX_ERR(0, 134, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_opt); jpayne@69: if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "error") < 0)) __PYX_ERR(0, 134, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_line = values[0]; jpayne@69: __pyx_v_error = values[1]; jpayne@69: __pyx_v_opt = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("error", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 134, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.error", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_4error(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self), __pyx_v_line, __pyx_v_error, __pyx_v_opt); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_4error(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("error", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":137 jpayne@69: * '''raise error.''' jpayne@69: * # pass to vcf file for error handling jpayne@69: * return self.vcf.error(line, error, opt) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef update(self, char * buffer, size_t nbytes): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_line, __pyx_v_error, __pyx_v_opt}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":134 jpayne@69: * self.encoding = vcf.encoding jpayne@69: * jpayne@69: * def error(self, line, error, opt=None): # <<<<<<<<<<<<<< jpayne@69: * '''raise error.''' jpayne@69: * # pass to vcf file for error handling jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.error", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":139 jpayne@69: * return self.vcf.error(line, error, opt) jpayne@69: * jpayne@69: * cdef update(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< jpayne@69: * '''update internal data. jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: static PyObject *__pyx_f_5pysam_7libcvcf_9VCFRecord_update(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("update", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":144 jpayne@69: * nbytes does not include the terminal '\0'. jpayne@69: * ''' jpayne@69: * libctabixproxies.TupleProxy.update(self, buffer, nbytes) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * self.contig = self.fields[0] jpayne@69: */ jpayne@69: __pyx_t_1 = __pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy->update(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":146 jpayne@69: * libctabixproxies.TupleProxy.update(self, buffer, nbytes) jpayne@69: * jpayne@69: * self.contig = self.fields[0] # <<<<<<<<<<<<<< jpayne@69: * # vcf counts from 1 - correct here jpayne@69: * self.pos = atoi(self.fields[1]) - 1 jpayne@69: */ jpayne@69: __pyx_v_self->contig = (__pyx_v_self->__pyx_base.fields[0]); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":148 jpayne@69: * self.contig = self.fields[0] jpayne@69: * # vcf counts from 1 - correct here jpayne@69: * self.pos = atoi(self.fields[1]) - 1 # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def __len__(self): jpayne@69: */ jpayne@69: __pyx_v_self->pos = (atoi((__pyx_v_self->__pyx_base.fields[1])) - 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":139 jpayne@69: * return self.vcf.error(line, error, opt) jpayne@69: * jpayne@69: * cdef update(self, char * buffer, size_t nbytes): # <<<<<<<<<<<<<< jpayne@69: * '''update internal data. jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.update", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = 0; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":150 jpayne@69: * self.pos = atoi(self.fields[1]) - 1 jpayne@69: * jpayne@69: * def __len__(self): # <<<<<<<<<<<<<< jpayne@69: * return max(0, self.nfields - 9) jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static Py_ssize_t __pyx_pw_5pysam_7libcvcf_9VCFRecord_7__len__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static Py_ssize_t __pyx_pw_5pysam_7libcvcf_9VCFRecord_7__len__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: Py_ssize_t __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_6__len__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static Py_ssize_t __pyx_pf_5pysam_7libcvcf_9VCFRecord_6__len__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: Py_ssize_t __pyx_r; jpayne@69: long __pyx_t_1; jpayne@69: long __pyx_t_2; jpayne@69: long __pyx_t_3; jpayne@69: int __pyx_t_4; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":151 jpayne@69: * jpayne@69: * def __len__(self): jpayne@69: * return max(0, self.nfields - 9) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property contig: jpayne@69: */ jpayne@69: __pyx_t_1 = (__pyx_v_self->__pyx_base.nfields - 9); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_4 = (__pyx_t_1 > __pyx_t_2); jpayne@69: if (__pyx_t_4) { jpayne@69: __pyx_t_3 = __pyx_t_1; jpayne@69: } else { jpayne@69: __pyx_t_3 = __pyx_t_2; jpayne@69: } jpayne@69: __pyx_r = __pyx_t_3; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":150 jpayne@69: * self.pos = atoi(self.fields[1]) - 1 jpayne@69: * jpayne@69: * def __len__(self): # <<<<<<<<<<<<<< jpayne@69: * return max(0, self.nfields - 9) jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L0:; jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":154 jpayne@69: * jpayne@69: * property contig: jpayne@69: * def __get__(self): return self.contig # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property pos: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_6contig_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_6contig_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_6contig___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_6contig___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->contig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.contig.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":157 jpayne@69: * jpayne@69: * property pos: jpayne@69: * def __get__(self): return self.pos # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property id: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_3pos_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_3pos___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_3pos___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":160 jpayne@69: * jpayne@69: * property id: jpayne@69: * def __get__(self): return self.fields[2] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property ref: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_2id_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_2id_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_2id___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_2id___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":163 jpayne@69: * jpayne@69: * property ref: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * return self.fields[3] jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_3ref_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_3ref___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_3ref___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":164 jpayne@69: * property ref: jpayne@69: * def __get__(self): jpayne@69: * return self.fields[3] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property alt: jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":163 jpayne@69: * jpayne@69: * property ref: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * return self.fields[3] jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":167 jpayne@69: * jpayne@69: * property alt: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * # convert v3.3 to v4.0 alleles below jpayne@69: * alt = self.fields[4] jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_3alt_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_3alt_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_3alt___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_3alt___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_v_alt = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: unsigned int __pyx_t_6; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":169 jpayne@69: * def __get__(self): jpayne@69: * # convert v3.3 to v4.0 alleles below jpayne@69: * alt = self.fields[4] # <<<<<<<<<<<<<< jpayne@69: * if alt == ".": alt = [] jpayne@69: * else: alt = alt.upper().split(',') jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[4])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_alt = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":170 jpayne@69: * # convert v3.3 to v4.0 alleles below jpayne@69: * alt = self.fields[4] jpayne@69: * if alt == ".": alt = [] # <<<<<<<<<<<<<< jpayne@69: * else: alt = alt.upper().split(',') jpayne@69: * return alt jpayne@69: */ jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_alt, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 170, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L3; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":171 jpayne@69: * alt = self.fields[4] jpayne@69: * if alt == ".": alt = [] jpayne@69: * else: alt = alt.upper().split(',') # <<<<<<<<<<<<<< jpayne@69: * return alt jpayne@69: * jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_alt, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__2}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_L3:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":172 jpayne@69: * if alt == ".": alt = [] jpayne@69: * else: alt = alt.upper().split(',') jpayne@69: * return alt # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property qual: jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_alt); jpayne@69: __pyx_r = __pyx_v_alt; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":167 jpayne@69: * jpayne@69: * property alt: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * # convert v3.3 to v4.0 alleles below jpayne@69: * alt = self.fields[4] jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.alt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_alt); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":175 jpayne@69: * jpayne@69: * property qual: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * qual = self.fields[5] jpayne@69: * if qual == b".": qual = -1 jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_4qual_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_4qual_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_4qual___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_4qual___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_v_qual = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: PyObject *__pyx_t_9 = NULL; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: unsigned int __pyx_t_13; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":176 jpayne@69: * property qual: jpayne@69: * def __get__(self): jpayne@69: * qual = self.fields[5] # <<<<<<<<<<<<<< jpayne@69: * if qual == b".": qual = -1 jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[5])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_qual = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":177 jpayne@69: * def __get__(self): jpayne@69: * qual = self.fields[5] jpayne@69: * if qual == b".": qual = -1 # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * try: qual = float(qual) jpayne@69: */ jpayne@69: __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_v_qual, __pyx_kp_b__5, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 177, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: __Pyx_INCREF(__pyx_int_neg_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_qual, __pyx_int_neg_1); jpayne@69: goto __pyx_L3; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":179 jpayne@69: * if qual == b".": qual = -1 jpayne@69: * else: jpayne@69: * try: qual = float(qual) # <<<<<<<<<<<<<< jpayne@69: * except: self.vcf.error(str(self),self.QUAL_NOT_NUMERICAL) jpayne@69: * return qual jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); jpayne@69: __Pyx_XGOTREF(__pyx_t_3); jpayne@69: __Pyx_XGOTREF(__pyx_t_4); jpayne@69: __Pyx_XGOTREF(__pyx_t_5); jpayne@69: /*try:*/ { jpayne@69: __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_qual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_qual, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: goto __pyx_L9_try_end; jpayne@69: __pyx_L4_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":180 jpayne@69: * else: jpayne@69: * try: qual = float(qual) jpayne@69: * except: self.vcf.error(str(self),self.QUAL_NOT_NUMERICAL) # <<<<<<<<<<<<<< jpayne@69: * return qual jpayne@69: * jpayne@69: */ jpayne@69: /*except:*/ { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.qual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 180, __pyx_L6_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_6); jpayne@69: __Pyx_XGOTREF(__pyx_t_7); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 180, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_10 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 180, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 180, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_13 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_9))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_9, function); jpayne@69: __pyx_t_13 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_t_10, __pyx_t_11}; jpayne@69: __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_13, 2+__pyx_t_13); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 180, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: goto __pyx_L5_exception_handled; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":179 jpayne@69: * if qual == b".": qual = -1 jpayne@69: * else: jpayne@69: * try: qual = float(qual) # <<<<<<<<<<<<<< jpayne@69: * except: self.vcf.error(str(self),self.QUAL_NOT_NUMERICAL) jpayne@69: * return qual jpayne@69: */ jpayne@69: __pyx_L6_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_3); jpayne@69: __Pyx_XGIVEREF(__pyx_t_4); jpayne@69: __Pyx_XGIVEREF(__pyx_t_5); jpayne@69: __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L5_exception_handled:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_3); jpayne@69: __Pyx_XGIVEREF(__pyx_t_4); jpayne@69: __Pyx_XGIVEREF(__pyx_t_5); jpayne@69: __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); jpayne@69: __pyx_L9_try_end:; jpayne@69: } jpayne@69: } jpayne@69: __pyx_L3:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":181 jpayne@69: * try: qual = float(qual) jpayne@69: * except: self.vcf.error(str(self),self.QUAL_NOT_NUMERICAL) jpayne@69: * return qual # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property filter: jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_qual); jpayne@69: __pyx_r = __pyx_v_qual; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":175 jpayne@69: * jpayne@69: * property qual: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * qual = self.fields[5] jpayne@69: * if qual == b".": qual = -1 jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_9); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_XDECREF(__pyx_t_12); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.qual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_qual); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":184 jpayne@69: * jpayne@69: * property filter: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * f = self.fields[6] jpayne@69: * # postpone checking that filters exist. Encode missing filter or no filtering as empty list jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_6filter_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_6filter_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_6filter___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_6filter___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: char *__pyx_v_f; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_t_1; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: int __pyx_t_3; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: unsigned int __pyx_t_6; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":185 jpayne@69: * property filter: jpayne@69: * def __get__(self): jpayne@69: * f = self.fields[6] # <<<<<<<<<<<<<< jpayne@69: * # postpone checking that filters exist. Encode missing filter or no filtering as empty list jpayne@69: * if f == b"." or f == b"PASS" or f == b"0": return [] jpayne@69: */ jpayne@69: __pyx_v_f = (__pyx_v_self->__pyx_base.fields[6]); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":187 jpayne@69: * f = self.fields[6] jpayne@69: * # postpone checking that filters exist. Encode missing filter or no filtering as empty list jpayne@69: * if f == b"." or f == b"PASS" or f == b"0": return [] # <<<<<<<<<<<<<< jpayne@69: * else: return f.split(';') jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_kp_b__5, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 187, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (!__pyx_t_3) { jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_3; jpayne@69: goto __pyx_L4_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_PASS, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 187, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (!__pyx_t_3) { jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_3; jpayne@69: goto __pyx_L4_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_kp_b_0, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 187, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_1 = __pyx_t_3; jpayne@69: __pyx_L4_bool_binop_done:; jpayne@69: if (__pyx_t_1) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_r = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":188 jpayne@69: * # postpone checking that filters exist. Encode missing filter or no filtering as empty list jpayne@69: * if f == b"." or f == b"PASS" or f == b"0": return [] jpayne@69: * else: return f.split(';') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property info: jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 188, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_5))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_5, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__6}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: } jpayne@69: __pyx_r = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":184 jpayne@69: * jpayne@69: * property filter: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * f = self.fields[6] jpayne@69: * # postpone checking that filters exist. Encode missing filter or no filtering as empty list jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.filter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":191 jpayne@69: * jpayne@69: * property info: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * col = self.fields[7] jpayne@69: * # dictionary of keys, and list of values jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_4info_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_4info_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_4info___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_4info___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: char *__pyx_v_col; jpayne@69: PyObject *__pyx_v_info = NULL; jpayne@69: PyObject *__pyx_v_blurp = NULL; jpayne@69: PyObject *__pyx_v_elts = NULL; jpayne@69: PyObject *__pyx_v_v = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: unsigned int __pyx_t_5; jpayne@69: Py_ssize_t __pyx_t_6; jpayne@69: PyObject *(*__pyx_t_7)(PyObject *); jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: Py_ssize_t __pyx_t_9; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":192 jpayne@69: * property info: jpayne@69: * def __get__(self): jpayne@69: * col = self.fields[7] # <<<<<<<<<<<<<< jpayne@69: * # dictionary of keys, and list of values jpayne@69: * info = {} jpayne@69: */ jpayne@69: __pyx_v_col = (__pyx_v_self->__pyx_base.fields[7]); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":194 jpayne@69: * col = self.fields[7] jpayne@69: * # dictionary of keys, and list of values jpayne@69: * info = {} # <<<<<<<<<<<<<< jpayne@69: * if col != b".": jpayne@69: * for blurp in col.split(';'): jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_info = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":195 jpayne@69: * # dictionary of keys, and list of values jpayne@69: * info = {} jpayne@69: * if col != b".": # <<<<<<<<<<<<<< jpayne@69: * for blurp in col.split(';'): jpayne@69: * elts = blurp.split('=') jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_kp_b__5, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 195, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":196 jpayne@69: * info = {} jpayne@69: * if col != b".": jpayne@69: * for blurp in col.split(';'): # <<<<<<<<<<<<<< jpayne@69: * elts = blurp.split('=') jpayne@69: * if len(elts) == 1: v = None jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__6}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { jpayne@69: __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_7 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_7)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_4))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_7(__pyx_t_4); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 196, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_blurp, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":197 jpayne@69: * if col != b".": jpayne@69: * for blurp in col.split(';'): jpayne@69: * elts = blurp.split('=') # <<<<<<<<<<<<<< jpayne@69: * if len(elts) == 1: v = None jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_blurp, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_8 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_8)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_u__7}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_elts, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":198 jpayne@69: * for blurp in col.split(';'): jpayne@69: * elts = blurp.split('=') jpayne@69: * if len(elts) == 1: v = None # <<<<<<<<<<<<<< jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: * else: self.vcf.error(str(self),self.ERROR_INFO_STRING) jpayne@69: */ jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 198, __pyx_L1_error) jpayne@69: __pyx_t_2 = (__pyx_t_9 == 1); jpayne@69: if (__pyx_t_2) { jpayne@69: __Pyx_INCREF(Py_None); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, Py_None); jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":199 jpayne@69: * elts = blurp.split('=') jpayne@69: * if len(elts) == 1: v = None jpayne@69: * elif len(elts) == 2: v = elts[1] # <<<<<<<<<<<<<< jpayne@69: * else: self.vcf.error(str(self),self.ERROR_INFO_STRING) jpayne@69: * info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self.vcf)) jpayne@69: */ jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 199, __pyx_L1_error) jpayne@69: __pyx_t_2 = (__pyx_t_9 == 2); jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":200 jpayne@69: * if len(elts) == 1: v = None jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: * else: self.vcf.error(str(self),self.ERROR_INFO_STRING) # <<<<<<<<<<<<<< jpayne@69: * info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self.vcf)) jpayne@69: * return info jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_8 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 200, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ERROR_INFO_STRING); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 200, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_11 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_11)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_8, __pyx_t_10}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_L6:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":201 jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: * else: self.vcf.error(str(self),self.ERROR_INFO_STRING) jpayne@69: * info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self.vcf)) # <<<<<<<<<<<<<< jpayne@69: * return info jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_parse_formatdata); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 201, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: if (unlikely(!__pyx_v_v)) { __Pyx_RaiseUnboundLocalError("v"); __PYX_ERR(0, 201, __pyx_L1_error) } jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 201, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_v_self->vcf); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 201, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_12, __pyx_t_10, __pyx_v_v, __pyx_t_8, __pyx_t_11}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_info, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 201, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":196 jpayne@69: * info = {} jpayne@69: * if col != b".": jpayne@69: * for blurp in col.split(';'): # <<<<<<<<<<<<<< jpayne@69: * elts = blurp.split('=') jpayne@69: * if len(elts) == 1: v = None jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":195 jpayne@69: * # dictionary of keys, and list of values jpayne@69: * info = {} jpayne@69: * if col != b".": # <<<<<<<<<<<<<< jpayne@69: * for blurp in col.split(';'): jpayne@69: * elts = blurp.split('=') jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":202 jpayne@69: * else: self.vcf.error(str(self),self.ERROR_INFO_STRING) jpayne@69: * info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self.vcf)) jpayne@69: * return info # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property format: jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_info); jpayne@69: __pyx_r = __pyx_v_info; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":191 jpayne@69: * jpayne@69: * property info: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * col = self.fields[7] jpayne@69: * # dictionary of keys, and list of values jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_XDECREF(__pyx_t_12); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_info); jpayne@69: __Pyx_XDECREF(__pyx_v_blurp); jpayne@69: __Pyx_XDECREF(__pyx_v_elts); jpayne@69: __Pyx_XDECREF(__pyx_v_v); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":205 jpayne@69: * jpayne@69: * property format: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * return self.fields[8].split(':') jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_6format_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_6format_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_6format___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_6format___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":206 jpayne@69: * property format: jpayne@69: * def __get__(self): jpayne@69: * return self.fields[8].split(':') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * property samples: jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_2 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_2)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u__3}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":205 jpayne@69: * jpayne@69: * property format: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * return self.fields[8].split(':') jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":209 jpayne@69: * jpayne@69: * property samples: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * return self.vcf._samples jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_7samples_1__get__(PyObject *__pyx_v_self); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_7samples_1__get__(PyObject *__pyx_v_self) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_7samples___get__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_7samples___get__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__get__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":210 jpayne@69: * property samples: jpayne@69: * def __get__(self): jpayne@69: * return self.vcf._samples # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def __getitem__(self, key): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":209 jpayne@69: * jpayne@69: * property samples: jpayne@69: * def __get__(self): # <<<<<<<<<<<<<< jpayne@69: * return self.vcf._samples jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.samples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":212 jpayne@69: * return self.vcf._samples jpayne@69: * jpayne@69: * def __getitem__(self, key): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # parse sample columns jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_8__getitem__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self), ((PyObject *)__pyx_v_key)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_8__getitem__(struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_key) { jpayne@69: PyObject *__pyx_v_values = NULL; jpayne@69: PyObject *__pyx_v_alt = NULL; jpayne@69: PyObject *__pyx_v_format = NULL; jpayne@69: PyObject *__pyx_v_result = NULL; jpayne@69: Py_ssize_t __pyx_v_idx; jpayne@69: PyObject *__pyx_v_expected = NULL; jpayne@69: PyObject *__pyx_v_value = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: Py_ssize_t __pyx_t_4; jpayne@69: unsigned int __pyx_t_5; jpayne@69: Py_ssize_t __pyx_t_6; jpayne@69: int __pyx_t_7; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: PyObject *__pyx_t_9 = NULL; jpayne@69: Py_UCS4 __pyx_t_10; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: Py_ssize_t __pyx_t_12; jpayne@69: Py_ssize_t __pyx_t_13; jpayne@69: int __pyx_t_14; jpayne@69: PyObject *__pyx_t_15 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__getitem__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":215 jpayne@69: * jpayne@69: * # parse sample columns jpayne@69: * values = self.fields[self.vcf._sample2column[key]].split(':') # <<<<<<<<<<<<<< jpayne@69: * alt = self.alt jpayne@69: * format = self.format jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_sample2column); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 215, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyBytes_FromString((__pyx_v_self->__pyx_base.fields[__pyx_t_4])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__3}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_values = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":216 jpayne@69: * # parse sample columns jpayne@69: * values = self.fields[self.vcf._sample2column[key]].split(':') jpayne@69: * alt = self.alt # <<<<<<<<<<<<<< jpayne@69: * format = self.format jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_alt = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":217 jpayne@69: * values = self.fields[self.vcf._sample2column[key]].split(':') jpayne@69: * alt = self.alt jpayne@69: * format = self.format # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * if len(values) > len(format): jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_format = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":219 jpayne@69: * format = self.format jpayne@69: * jpayne@69: * if len(values) > len(format): # <<<<<<<<<<<<<< jpayne@69: * self.vcf.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\ jpayne@69: * (len(values),key,len(format))) jpayne@69: */ jpayne@69: __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 219, __pyx_L1_error) jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 219, __pyx_L1_error) jpayne@69: __pyx_t_7 = (__pyx_t_4 > __pyx_t_6); jpayne@69: if (__pyx_t_7) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":220 jpayne@69: * jpayne@69: * if len(values) > len(format): jpayne@69: * self.vcf.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\ # <<<<<<<<<<<<<< jpayne@69: * (len(values),key,len(format))) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_8 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 220, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BAD_NUMBER_OF_VALUES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = PyTuple_New(7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 220, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_10 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_found); jpayne@69: __pyx_t_6 += 7; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_found); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_found); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":221 jpayne@69: * if len(values) > len(format): jpayne@69: * self.vcf.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\ jpayne@69: * (len(values),key,len(format))) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * result = {} jpayne@69: */ jpayne@69: __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 221, __pyx_L1_error) jpayne@69: __pyx_t_11 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_4, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 221, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11); jpayne@69: __Pyx_GIVEREF(__pyx_t_11); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_values_in_element); jpayne@69: __pyx_t_6 += 19; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_values_in_element); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_values_in_element); jpayne@69: __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_key), __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 221, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10; jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11); jpayne@69: __Pyx_GIVEREF(__pyx_t_11); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_expected); jpayne@69: __pyx_t_6 += 11; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_expected); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_kp_u_expected); jpayne@69: __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 221, __pyx_L1_error) jpayne@69: __pyx_t_11 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_4, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 221, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11); jpayne@69: __Pyx_GIVEREF(__pyx_t_11); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__8); jpayne@69: __pyx_t_6 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__8); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_kp_u__8); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":220 jpayne@69: * jpayne@69: * if len(values) > len(format): jpayne@69: * self.vcf.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\ # <<<<<<<<<<<<<< jpayne@69: * (len(values),key,len(format))) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_9, 7, __pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 220, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_t_8, __pyx_t_3, __pyx_t_11}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":219 jpayne@69: * format = self.format jpayne@69: * jpayne@69: * if len(values) > len(format): # <<<<<<<<<<<<<< jpayne@69: * self.vcf.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\ jpayne@69: * (len(values),key,len(format))) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":223 jpayne@69: * (len(values),key,len(format))) jpayne@69: * jpayne@69: * result = {} # <<<<<<<<<<<<<< jpayne@69: * for idx in range(len(format)): jpayne@69: * expected = self.vcf.get_expected(format[idx], self.vcf._format, alt) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_result = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":224 jpayne@69: * jpayne@69: * result = {} jpayne@69: * for idx in range(len(format)): # <<<<<<<<<<<<<< jpayne@69: * expected = self.vcf.get_expected(format[idx], self.vcf._format, alt) jpayne@69: * if idx < len(values): value = values[idx] jpayne@69: */ jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 224, __pyx_L1_error) jpayne@69: __pyx_t_4 = __pyx_t_6; jpayne@69: for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { jpayne@69: __pyx_v_idx = __pyx_t_12; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":225 jpayne@69: * result = {} jpayne@69: * for idx in range(len(format)): jpayne@69: * expected = self.vcf.get_expected(format[idx], self.vcf._format, alt) # <<<<<<<<<<<<<< jpayne@69: * if idx < len(values): value = values[idx] jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_get_expected); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 225, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_format_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_8 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_8)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_t_11, __pyx_t_3, __pyx_v_alt}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_expected, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":226 jpayne@69: * for idx in range(len(format)): jpayne@69: * expected = self.vcf.get_expected(format[idx], self.vcf._format, alt) jpayne@69: * if idx < len(values): value = values[idx] # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * if expected == -1: value = "." jpayne@69: */ jpayne@69: __pyx_t_13 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 226, __pyx_L1_error) jpayne@69: __pyx_t_7 = (__pyx_v_idx < __pyx_t_13); jpayne@69: if (__pyx_t_7) { jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":228 jpayne@69: * if idx < len(values): value = values[idx] jpayne@69: * else: jpayne@69: * if expected == -1: value = "." # <<<<<<<<<<<<<< jpayne@69: * else: value = ",".join(["."]*expected) jpayne@69: * jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_7 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_expected, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 228, __pyx_L1_error) jpayne@69: if (__pyx_t_7) { jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_value, __pyx_kp_u__5); jpayne@69: goto __pyx_L7; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":229 jpayne@69: * else: jpayne@69: * if expected == -1: value = "." jpayne@69: * else: value = ",".join(["."]*expected) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data)) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__5); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__5)) __PYX_ERR(0, 229, __pyx_L1_error); jpayne@69: { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_expected); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 229, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_temp); jpayne@69: __Pyx_DECREF(__pyx_t_1); jpayne@69: __pyx_t_1 = __pyx_temp; jpayne@69: } jpayne@69: __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_L7:; jpayne@69: } jpayne@69: __pyx_L6:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":231 jpayne@69: * else: value = ",".join(["."]*expected) jpayne@69: * jpayne@69: * result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data)) # <<<<<<<<<<<<<< jpayne@69: * if expected != -1 and len(result[format[idx]]) != expected: jpayne@69: * self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_parse_formatdata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_format_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 231, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_8 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_9 = __Pyx_PyObject_Unicode(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_8 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_8)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_v_value, __pyx_t_11, __pyx_t_9}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_t_1, __pyx_t_2) < 0))) __PYX_ERR(0, 231, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":232 jpayne@69: * jpayne@69: * result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data)) jpayne@69: * if expected != -1 and len(result[format[idx]]) != expected: # <<<<<<<<<<<<<< jpayne@69: * self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]])) jpayne@69: */ jpayne@69: __pyx_t_14 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_expected, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) jpayne@69: if (__pyx_t_14) { jpayne@69: } else { jpayne@69: __pyx_t_7 = __pyx_t_14; jpayne@69: goto __pyx_L9_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_13 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 232, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_expected, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_7 = __pyx_t_14; jpayne@69: __pyx_L9_bool_binop_done:; jpayne@69: if (__pyx_t_7) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":233 jpayne@69: * result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data)) jpayne@69: * if expected != -1 and len(result[format[idx]]) != expected: jpayne@69: * self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS, # <<<<<<<<<<<<<< jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]])) jpayne@69: * if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]])) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->vcf, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_self->__pyx_base.data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 233, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 233, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BAD_NUMBER_OF_PARAMETERS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 233, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":234 jpayne@69: * if expected != -1 and len(result[format[idx]]) != expected: jpayne@69: * self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]])) # <<<<<<<<<<<<<< jpayne@69: * if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]])) jpayne@69: * result[format[idx]] = result[format[idx]][:expected] jpayne@69: */ jpayne@69: __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_13 = 0; jpayne@69: __pyx_t_10 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_id); jpayne@69: __pyx_t_13 += 3; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_id); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_id); jpayne@69: __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 234, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_8), __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 234, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_10; jpayne@69: __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15); jpayne@69: __Pyx_GIVEREF(__pyx_t_15); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_15); jpayne@69: __pyx_t_15 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_expected_2); jpayne@69: __pyx_t_13 += 11; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_expected_2); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_expected_2); jpayne@69: __pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_expected), __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 234, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_10; jpayne@69: __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15); jpayne@69: __Pyx_GIVEREF(__pyx_t_15); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_15); jpayne@69: __pyx_t_15 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_parameters_got); jpayne@69: __pyx_t_13 += 17; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_parameters_got); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_parameters_got); jpayne@69: __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 234, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 234, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: __pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_8), __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 234, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_10; jpayne@69: __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15); jpayne@69: __Pyx_GIVEREF(__pyx_t_15); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_15); jpayne@69: __pyx_t_15 = 0; jpayne@69: __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_3, 6, __pyx_t_13, __pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 234, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_11, __pyx_t_9, __pyx_t_15}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":235 jpayne@69: * self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]])) jpayne@69: * if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]])) # <<<<<<<<<<<<<< jpayne@69: * result[format[idx]] = result[format[idx]][:expected] jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_13 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_expected, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_7) { jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_9, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_13 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_9 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_GIVEREF(__pyx_t_15); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_15)) __PYX_ERR(0, 235, __pyx_L1_error); jpayne@69: { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_temp); jpayne@69: __Pyx_DECREF(__pyx_t_11); jpayne@69: __pyx_t_11 = __pyx_temp; jpayne@69: } jpayne@69: __pyx_t_15 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_t_2, __pyx_t_9) < 0))) __PYX_ERR(0, 235, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":236 jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]])) jpayne@69: * if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]])) jpayne@69: * result[format[idx]] = result[format[idx]][:expected] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * return result jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_9, 0, 0, NULL, &__pyx_v_expected, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_t_9, __pyx_t_2) < 0))) __PYX_ERR(0, 236, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":232 jpayne@69: * jpayne@69: * result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data)) jpayne@69: * if expected != -1 and len(result[format[idx]]) != expected: # <<<<<<<<<<<<<< jpayne@69: * self.vcf.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]])) jpayne@69: */ jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":238 jpayne@69: * result[format[idx]] = result[format[idx]][:expected] jpayne@69: * jpayne@69: * return result # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_result); jpayne@69: __pyx_r = __pyx_v_result; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":212 jpayne@69: * return self.vcf._samples jpayne@69: * jpayne@69: * def __getitem__(self, key): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # parse sample columns jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_9); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_XDECREF(__pyx_t_15); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_values); jpayne@69: __Pyx_XDECREF(__pyx_v_alt); jpayne@69: __Pyx_XDECREF(__pyx_v_format); jpayne@69: __Pyx_XDECREF(__pyx_v_result); jpayne@69: __Pyx_XDECREF(__pyx_v_expected); jpayne@69: __Pyx_XDECREF(__pyx_v_value); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __reduce_cython__(self): # <<<<<<<<<<<<<< jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_11__reduce_cython__(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_9VCFRecord_10__reduce_cython__, "VCFRecord.__reduce_cython__(self)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_9VCFRecord_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_9VCFRecord_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_9VCFRecord_10__reduce_cython__}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_11__reduce_cython__(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: if (unlikely(__pyx_nargs > 0)) { jpayne@69: __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} jpayne@69: if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_10__reduce_cython__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__reduce_cython__", 1); jpayne@69: jpayne@69: /* "(tree fragment)":2 jpayne@69: * def __reduce_cython__(self): jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< jpayne@69: * def __setstate_cython__(self, __pyx_state): jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: */ jpayne@69: __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); jpayne@69: __PYX_ERR(1, 2, __pyx_L1_error) jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __reduce_cython__(self): # <<<<<<<<<<<<<< jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":3 jpayne@69: * def __reduce_cython__(self): jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_13__setstate_cython__(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_9VCFRecord_12__setstate_cython__, "VCFRecord.__setstate_cython__(self, __pyx_state)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_9VCFRecord_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_9VCFRecord_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_9VCFRecord_12__setstate_cython__}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_9VCFRecord_13__setstate_cython__(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v___pyx_state = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_9VCFRecord_12__setstate_cython__(((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_v_self), __pyx_v___pyx_state); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_9VCFRecord_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__setstate_cython__", 1); jpayne@69: jpayne@69: /* "(tree fragment)":4 jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< jpayne@69: */ jpayne@69: __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); jpayne@69: __PYX_ERR(1, 4, __pyx_L1_error) jpayne@69: jpayne@69: /* "(tree fragment)":3 jpayne@69: * def __reduce_cython__(self): jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCFRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":244 jpayne@69: * '''converts a :term:`tabix row` into a VCF record.''' jpayne@69: * cdef vcffile jpayne@69: * def __init__(self, vcffile): # <<<<<<<<<<<<<< jpayne@69: * self.vcffile = vcffile jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static int __pyx_pw_5pysam_7libcvcf_11asVCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ jpayne@69: static int __pyx_pw_5pysam_7libcvcf_11asVCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { jpayne@69: PyObject *__pyx_v_vcffile = 0; jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: int __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vcffile,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vcffile)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_VARARGS(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 244, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_vcffile = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 244, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.asVCFRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return -1; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_11asVCFRecord___init__(((struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *)__pyx_v_self), __pyx_v_vcffile); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static int __pyx_pf_5pysam_7libcvcf_11asVCFRecord___init__(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v_self, PyObject *__pyx_v_vcffile) { jpayne@69: int __pyx_r; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__init__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":245 jpayne@69: * cdef vcffile jpayne@69: * def __init__(self, vcffile): jpayne@69: * self.vcffile = vcffile # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * cdef parse(self, char * buffer, int len): jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_v_vcffile); jpayne@69: __Pyx_GIVEREF(__pyx_v_vcffile); jpayne@69: __Pyx_GOTREF(__pyx_v_self->vcffile); jpayne@69: __Pyx_DECREF(__pyx_v_self->vcffile); jpayne@69: __pyx_v_self->vcffile = __pyx_v_vcffile; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":244 jpayne@69: * '''converts a :term:`tabix row` into a VCF record.''' jpayne@69: * cdef vcffile jpayne@69: * def __init__(self, vcffile): # <<<<<<<<<<<<<< jpayne@69: * self.vcffile = vcffile jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = 0; jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":247 jpayne@69: * self.vcffile = vcffile jpayne@69: * jpayne@69: * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<< jpayne@69: * cdef VCFRecord r jpayne@69: * r = VCFRecord(self.vcffile) jpayne@69: */ jpayne@69: jpayne@69: static PyObject *__pyx_f_5pysam_7libcvcf_11asVCFRecord_parse(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) { jpayne@69: struct __pyx_obj_5pysam_7libcvcf_VCFRecord *__pyx_v_r = 0; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("parse", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":249 jpayne@69: * cdef parse(self, char * buffer, int len): jpayne@69: * cdef VCFRecord r jpayne@69: * r = VCFRecord(self.vcffile) # <<<<<<<<<<<<<< jpayne@69: * r.copy(buffer, len) jpayne@69: * return r jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_7libcvcf_VCFRecord), __pyx_v_self->vcffile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_r = ((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":250 jpayne@69: * cdef VCFRecord r jpayne@69: * r = VCFRecord(self.vcffile) jpayne@69: * r.copy(buffer, len) # <<<<<<<<<<<<<< jpayne@69: * return r jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_7libcvcf_VCFRecord *)__pyx_v_r->__pyx_base.__pyx_vtab)->__pyx_base.copy(((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":251 jpayne@69: * r = VCFRecord(self.vcffile) jpayne@69: * r.copy(buffer, len) jpayne@69: * return r # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * class VCF(object): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF((PyObject *)__pyx_v_r); jpayne@69: __pyx_r = ((PyObject *)__pyx_v_r); jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":247 jpayne@69: * self.vcffile = vcffile jpayne@69: * jpayne@69: * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<< jpayne@69: * cdef VCFRecord r jpayne@69: * r = VCFRecord(self.vcffile) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.asVCFRecord.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = 0; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF((PyObject *)__pyx_v_r); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __reduce_cython__(self): # <<<<<<<<<<<<<< jpayne@69: * cdef tuple state jpayne@69: * cdef object _dict jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_11asVCFRecord_3__reduce_cython__(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_11asVCFRecord_2__reduce_cython__, "asVCFRecord.__reduce_cython__(self)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_11asVCFRecord_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_11asVCFRecord_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_11asVCFRecord_2__reduce_cython__}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_11asVCFRecord_3__reduce_cython__(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: if (unlikely(__pyx_nargs > 0)) { jpayne@69: __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} jpayne@69: if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_11asVCFRecord_2__reduce_cython__(((struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *)__pyx_v_self)); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_11asVCFRecord_2__reduce_cython__(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v_self) { jpayne@69: PyObject *__pyx_v_state = 0; jpayne@69: PyObject *__pyx_v__dict = 0; jpayne@69: int __pyx_v_use_setstate; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: int __pyx_t_4; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__reduce_cython__", 1); jpayne@69: jpayne@69: /* "(tree fragment)":5 jpayne@69: * cdef object _dict jpayne@69: * cdef bint use_setstate jpayne@69: * state = (self.encoding, self.vcffile) # <<<<<<<<<<<<<< jpayne@69: * _dict = getattr(self, '__dict__', None) jpayne@69: * if _dict is not None: jpayne@69: */ jpayne@69: __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding); jpayne@69: __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_self->vcffile); jpayne@69: __Pyx_GIVEREF(__pyx_v_self->vcffile); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->vcffile)) __PYX_ERR(1, 5, __pyx_L1_error); jpayne@69: __pyx_v_state = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":6 jpayne@69: * cdef bint use_setstate jpayne@69: * state = (self.encoding, self.vcffile) jpayne@69: * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< jpayne@69: * if _dict is not None: jpayne@69: * state += (_dict,) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v__dict = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":7 jpayne@69: * state = (self.encoding, self.vcffile) jpayne@69: * _dict = getattr(self, '__dict__', None) jpayne@69: * if _dict is not None: # <<<<<<<<<<<<<< jpayne@69: * state += (_dict,) jpayne@69: * use_setstate = True jpayne@69: */ jpayne@69: __pyx_t_2 = (__pyx_v__dict != Py_None); jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "(tree fragment)":8 jpayne@69: * _dict = getattr(self, '__dict__', None) jpayne@69: * if _dict is not None: jpayne@69: * state += (_dict,) # <<<<<<<<<<<<<< jpayne@69: * use_setstate = True jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_v__dict); jpayne@69: __Pyx_GIVEREF(__pyx_v__dict); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error); jpayne@69: __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":9 jpayne@69: * if _dict is not None: jpayne@69: * state += (_dict,) jpayne@69: * use_setstate = True # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * use_setstate = self.encoding is not None or self.vcffile is not None jpayne@69: */ jpayne@69: __pyx_v_use_setstate = 1; jpayne@69: jpayne@69: /* "(tree fragment)":7 jpayne@69: * state = (self.encoding, self.vcffile) jpayne@69: * _dict = getattr(self, '__dict__', None) jpayne@69: * if _dict is not None: # <<<<<<<<<<<<<< jpayne@69: * state += (_dict,) jpayne@69: * use_setstate = True jpayne@69: */ jpayne@69: goto __pyx_L3; jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":11 jpayne@69: * use_setstate = True jpayne@69: * else: jpayne@69: * use_setstate = self.encoding is not None or self.vcffile is not None # <<<<<<<<<<<<<< jpayne@69: * if use_setstate: jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, None), state jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_4 = (__pyx_v_self->__pyx_base.encoding != Py_None); jpayne@69: if (!__pyx_t_4) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: goto __pyx_L4_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_4 = (__pyx_v_self->vcffile != Py_None); jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: __pyx_L4_bool_binop_done:; jpayne@69: __pyx_v_use_setstate = __pyx_t_2; jpayne@69: } jpayne@69: __pyx_L3:; jpayne@69: jpayne@69: /* "(tree fragment)":12 jpayne@69: * else: jpayne@69: * use_setstate = self.encoding is not None or self.vcffile is not None jpayne@69: * if use_setstate: # <<<<<<<<<<<<<< jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, None), state jpayne@69: * else: jpayne@69: */ jpayne@69: if (__pyx_v_use_setstate) { jpayne@69: jpayne@69: /* "(tree fragment)":13 jpayne@69: * use_setstate = self.encoding is not None or self.vcffile is not None jpayne@69: * if use_setstate: jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, None), state # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, state) jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_asVCFRecord); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); jpayne@69: __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_int_239654613); jpayne@69: __Pyx_GIVEREF(__pyx_int_239654613); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_239654613)) __PYX_ERR(1, 13, __pyx_L1_error); jpayne@69: __Pyx_INCREF(Py_None); jpayne@69: __Pyx_GIVEREF(Py_None); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error); jpayne@69: __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_state); jpayne@69: __Pyx_GIVEREF(__pyx_v_state); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error); jpayne@69: __pyx_t_3 = 0; jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_r = __pyx_t_5; jpayne@69: __pyx_t_5 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "(tree fragment)":12 jpayne@69: * else: jpayne@69: * use_setstate = self.encoding is not None or self.vcffile is not None jpayne@69: * if use_setstate: # <<<<<<<<<<<<<< jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, None), state jpayne@69: * else: jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":15 jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, None), state jpayne@69: * else: jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, state) # <<<<<<<<<<<<<< jpayne@69: * def __setstate_cython__(self, __pyx_state): jpayne@69: * __pyx_unpickle_asVCFRecord__set_state(self, __pyx_state) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_asVCFRecord); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); jpayne@69: __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_int_239654613); jpayne@69: __Pyx_GIVEREF(__pyx_int_239654613); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_239654613)) __PYX_ERR(1, 15, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_state); jpayne@69: __Pyx_GIVEREF(__pyx_v_state); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error); jpayne@69: __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_GIVEREF(__pyx_t_5); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error); jpayne@69: __pyx_t_5 = 0; jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_r = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __reduce_cython__(self): # <<<<<<<<<<<<<< jpayne@69: * cdef tuple state jpayne@69: * cdef object _dict jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.asVCFRecord.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_state); jpayne@69: __Pyx_XDECREF(__pyx_v__dict); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":16 jpayne@69: * else: jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, state) jpayne@69: * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * __pyx_unpickle_asVCFRecord__set_state(self, __pyx_state) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_11asVCFRecord_5__setstate_cython__(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_11asVCFRecord_4__setstate_cython__, "asVCFRecord.__setstate_cython__(self, __pyx_state)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_11asVCFRecord_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_11asVCFRecord_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_11asVCFRecord_4__setstate_cython__}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_11asVCFRecord_5__setstate_cython__(PyObject *__pyx_v_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v___pyx_state = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v___pyx_state = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.asVCFRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_11asVCFRecord_4__setstate_cython__(((struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *)__pyx_v_self), __pyx_v___pyx_state); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_11asVCFRecord_4__setstate_cython__(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v_self, PyObject *__pyx_v___pyx_state) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__setstate_cython__", 1); jpayne@69: jpayne@69: /* "(tree fragment)":17 jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, state) jpayne@69: * def __setstate_cython__(self, __pyx_state): jpayne@69: * __pyx_unpickle_asVCFRecord__set_state(self, __pyx_state) # <<<<<<<<<<<<<< jpayne@69: */ jpayne@69: if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error) jpayne@69: __pyx_t_1 = __pyx_f_5pysam_7libcvcf___pyx_unpickle_asVCFRecord__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":16 jpayne@69: * else: jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, state) jpayne@69: * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * __pyx_unpickle_asVCFRecord__set_state(self, __pyx_state) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.asVCFRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":330 jpayne@69: * _lines = None jpayne@69: * jpayne@69: * def __init__(self, _copy=None, reference=None, regions=None, # <<<<<<<<<<<<<< jpayne@69: * lines=None, leftalign=False): jpayne@69: * # make error identifiers accessible by name jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_1__init__(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF___init__, "VCF.__init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF___init__}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_1__init__(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v__copy = 0; jpayne@69: PyObject *__pyx_v_reference = 0; jpayne@69: PyObject *__pyx_v_regions = 0; jpayne@69: PyObject *__pyx_v_lines = 0; jpayne@69: PyObject *__pyx_v_leftalign = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[6] = {0,0,0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_copy,&__pyx_n_s_reference,&__pyx_n_s_regions,&__pyx_n_s_lines,&__pyx_n_s_leftalign,0}; jpayne@69: values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":331 jpayne@69: * jpayne@69: * def __init__(self, _copy=None, reference=None, regions=None, jpayne@69: * lines=None, leftalign=False): # <<<<<<<<<<<<<< jpayne@69: * # make error identifiers accessible by name jpayne@69: * for id in self._errors.keys(): jpayne@69: */ jpayne@69: values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False))); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_copy); jpayne@69: if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reference); jpayne@69: if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_regions); jpayne@69: if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lines); jpayne@69: if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 5: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_leftalign); jpayne@69: if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 330, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v__copy = values[1]; jpayne@69: __pyx_v_reference = values[2]; jpayne@69: __pyx_v_regions = values[3]; jpayne@69: __pyx_v_lines = values[4]; jpayne@69: __pyx_v_leftalign = values[5]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 330, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF___init__(__pyx_self, __pyx_v_self, __pyx_v__copy, __pyx_v_reference, __pyx_v_regions, __pyx_v_lines, __pyx_v_leftalign); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":330 jpayne@69: * _lines = None jpayne@69: * jpayne@69: * def __init__(self, _copy=None, reference=None, regions=None, # <<<<<<<<<<<<<< jpayne@69: * lines=None, leftalign=False): jpayne@69: * # make error identifiers accessible by name jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v__copy, PyObject *__pyx_v_reference, PyObject *__pyx_v_regions, PyObject *__pyx_v_lines, PyObject *__pyx_v_leftalign) { jpayne@69: PyObject *__pyx_v_id = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: Py_ssize_t __pyx_t_2; jpayne@69: Py_ssize_t __pyx_t_3; jpayne@69: int __pyx_t_4; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: int __pyx_t_7; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: PyObject *__pyx_t_9 = NULL; jpayne@69: unsigned int __pyx_t_10; jpayne@69: int __pyx_t_11; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__init__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":333 jpayne@69: * lines=None, leftalign=False): jpayne@69: * # make error identifiers accessible by name jpayne@69: * for id in self._errors.keys(): # <<<<<<<<<<<<<< jpayne@69: * self.__dict__[self._errors[id].split(':')[0]] = id jpayne@69: * if _copy != None: jpayne@69: */ jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errors); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 333, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (unlikely(__pyx_t_5 == Py_None)) { jpayne@69: PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); jpayne@69: __PYX_ERR(0, 333, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_keys, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __pyx_t_1 = __pyx_t_6; jpayne@69: __pyx_t_6 = 0; jpayne@69: while (1) { jpayne@69: __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_6, NULL, NULL, __pyx_t_4); jpayne@69: if (unlikely(__pyx_t_7 == 0)) break; jpayne@69: if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 333, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_id, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":334 jpayne@69: * # make error identifiers accessible by name jpayne@69: * for id in self._errors.keys(): jpayne@69: * self.__dict__[self._errors[id].split(':')[0]] = id # <<<<<<<<<<<<<< jpayne@69: * if _copy != None: jpayne@69: * self._leftalign = _copy._leftalign jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 334, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 334, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 334, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_10 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_8))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_8, function); jpayne@69: __pyx_t_10 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_kp_u__3}; jpayne@69: __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: } jpayne@69: __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 334, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: if (unlikely((PyObject_SetItem(__pyx_t_6, __pyx_t_8, __pyx_v_id) < 0))) __PYX_ERR(0, 334, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":335 jpayne@69: * for id in self._errors.keys(): jpayne@69: * self.__dict__[self._errors[id].split(':')[0]] = id jpayne@69: * if _copy != None: # <<<<<<<<<<<<<< jpayne@69: * self._leftalign = _copy._leftalign jpayne@69: * self._header = _copy._header[:] jpayne@69: */ jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_v__copy, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) jpayne@69: __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 335, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_11) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":336 jpayne@69: * self.__dict__[self._errors[id].split(':')[0]] = id jpayne@69: * if _copy != None: jpayne@69: * self._leftalign = _copy._leftalign # <<<<<<<<<<<<<< jpayne@69: * self._header = _copy._header[:] jpayne@69: * self._version = _copy._version jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_leftalign_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_leftalign_2, __pyx_t_1) < 0) __PYX_ERR(0, 336, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":337 jpayne@69: * if _copy != None: jpayne@69: * self._leftalign = _copy._leftalign jpayne@69: * self._header = _copy._header[:] # <<<<<<<<<<<<<< jpayne@69: * self._version = _copy._version jpayne@69: * self._info = copy.deepcopy(_copy._info) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__9, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 337, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_t_8) < 0) __PYX_ERR(0, 337, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":338 jpayne@69: * self._leftalign = _copy._leftalign jpayne@69: * self._header = _copy._header[:] jpayne@69: * self._version = _copy._version # <<<<<<<<<<<<<< jpayne@69: * self._info = copy.deepcopy(_copy._info) jpayne@69: * self._filter = copy.deepcopy(_copy._filter) jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_version); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 338, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_t_8) < 0) __PYX_ERR(0, 338, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":339 jpayne@69: * self._header = _copy._header[:] jpayne@69: * self._version = _copy._version jpayne@69: * self._info = copy.deepcopy(_copy._info) # <<<<<<<<<<<<<< jpayne@69: * self._filter = copy.deepcopy(_copy._filter) jpayne@69: * self._format = copy.deepcopy(_copy._format) jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_copy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_10 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_10 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1}; jpayne@69: __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 339, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_info, __pyx_t_8) < 0) __PYX_ERR(0, 339, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":340 jpayne@69: * self._version = _copy._version jpayne@69: * self._info = copy.deepcopy(_copy._info) jpayne@69: * self._filter = copy.deepcopy(_copy._filter) # <<<<<<<<<<<<<< jpayne@69: * self._format = copy.deepcopy(_copy._format) jpayne@69: * self._samples = _copy._samples[:] jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_copy_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_10 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_10 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; jpayne@69: __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 340, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filter, __pyx_t_8) < 0) __PYX_ERR(0, 340, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":341 jpayne@69: * self._info = copy.deepcopy(_copy._info) jpayne@69: * self._filter = copy.deepcopy(_copy._filter) jpayne@69: * self._format = copy.deepcopy(_copy._format) # <<<<<<<<<<<<<< jpayne@69: * self._samples = _copy._samples[:] jpayne@69: * self._sample2column = copy.deepcopy(_copy._sample2column) jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_copy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 341, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_format_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_10 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_10 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1}; jpayne@69: __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 341, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_format_2, __pyx_t_8) < 0) __PYX_ERR(0, 341, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":342 jpayne@69: * self._filter = copy.deepcopy(_copy._filter) jpayne@69: * self._format = copy.deepcopy(_copy._format) jpayne@69: * self._samples = _copy._samples[:] # <<<<<<<<<<<<<< jpayne@69: * self._sample2column = copy.deepcopy(_copy._sample2column) jpayne@69: * self._ignored_errors = copy.deepcopy(_copy._ignored_errors) jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_samples); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 342, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_8, 0, 0, NULL, NULL, &__pyx_slice__9, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_samples, __pyx_t_6) < 0) __PYX_ERR(0, 342, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":343 jpayne@69: * self._format = copy.deepcopy(_copy._format) jpayne@69: * self._samples = _copy._samples[:] jpayne@69: * self._sample2column = copy.deepcopy(_copy._sample2column) # <<<<<<<<<<<<<< jpayne@69: * self._ignored_errors = copy.deepcopy(_copy._ignored_errors) jpayne@69: * self._warn_errors = copy.deepcopy(_copy._warn_errors) jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_copy_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 343, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_sample2column); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 343, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_10 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_10 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8}; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 343, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sample2column, __pyx_t_6) < 0) __PYX_ERR(0, 343, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":344 jpayne@69: * self._samples = _copy._samples[:] jpayne@69: * self._sample2column = copy.deepcopy(_copy._sample2column) jpayne@69: * self._ignored_errors = copy.deepcopy(_copy._ignored_errors) # <<<<<<<<<<<<<< jpayne@69: * self._warn_errors = copy.deepcopy(_copy._warn_errors) jpayne@69: * self._reference = _copy._reference jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_copy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_ignored_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_10 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_8))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_8, function); jpayne@69: __pyx_t_10 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1}; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 344, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: } jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ignored_errors, __pyx_t_6) < 0) __PYX_ERR(0, 344, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":345 jpayne@69: * self._sample2column = copy.deepcopy(_copy._sample2column) jpayne@69: * self._ignored_errors = copy.deepcopy(_copy._ignored_errors) jpayne@69: * self._warn_errors = copy.deepcopy(_copy._warn_errors) # <<<<<<<<<<<<<< jpayne@69: * self._reference = _copy._reference jpayne@69: * self._regions = _copy._regions jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_copy_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 345, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_warn_errors); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 345, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_10 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_10 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8}; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_warn_errors, __pyx_t_6) < 0) __PYX_ERR(0, 345, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":346 jpayne@69: * self._ignored_errors = copy.deepcopy(_copy._ignored_errors) jpayne@69: * self._warn_errors = copy.deepcopy(_copy._warn_errors) jpayne@69: * self._reference = _copy._reference # <<<<<<<<<<<<<< jpayne@69: * self._regions = _copy._regions jpayne@69: * if reference: self._reference = reference jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reference_2, __pyx_t_6) < 0) __PYX_ERR(0, 346, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":347 jpayne@69: * self._warn_errors = copy.deepcopy(_copy._warn_errors) jpayne@69: * self._reference = _copy._reference jpayne@69: * self._regions = _copy._regions # <<<<<<<<<<<<<< jpayne@69: * if reference: self._reference = reference jpayne@69: * if regions: self._regions = regions jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__copy, __pyx_n_s_regions_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_regions_2, __pyx_t_6) < 0) __PYX_ERR(0, 347, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":335 jpayne@69: * for id in self._errors.keys(): jpayne@69: * self.__dict__[self._errors[id].split(':')[0]] = id jpayne@69: * if _copy != None: # <<<<<<<<<<<<<< jpayne@69: * self._leftalign = _copy._leftalign jpayne@69: * self._header = _copy._header[:] jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":348 jpayne@69: * self._reference = _copy._reference jpayne@69: * self._regions = _copy._regions jpayne@69: * if reference: self._reference = reference # <<<<<<<<<<<<<< jpayne@69: * if regions: self._regions = regions jpayne@69: * if leftalign: self._leftalign = leftalign jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 348, __pyx_L1_error) jpayne@69: if (__pyx_t_11) { jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reference_2, __pyx_v_reference) < 0) __PYX_ERR(0, 348, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":349 jpayne@69: * self._regions = _copy._regions jpayne@69: * if reference: self._reference = reference jpayne@69: * if regions: self._regions = regions # <<<<<<<<<<<<<< jpayne@69: * if leftalign: self._leftalign = leftalign jpayne@69: * self._lines = lines jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_regions); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 349, __pyx_L1_error) jpayne@69: if (__pyx_t_11) { jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_regions_2, __pyx_v_regions) < 0) __PYX_ERR(0, 349, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":350 jpayne@69: * if reference: self._reference = reference jpayne@69: * if regions: self._regions = regions jpayne@69: * if leftalign: self._leftalign = leftalign # <<<<<<<<<<<<<< jpayne@69: * self._lines = lines jpayne@69: * self.encoding = "ascii" jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_leftalign); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 350, __pyx_L1_error) jpayne@69: if (__pyx_t_11) { jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_leftalign_2, __pyx_v_leftalign) < 0) __PYX_ERR(0, 350, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":351 jpayne@69: * if regions: self._regions = regions jpayne@69: * if leftalign: self._leftalign = leftalign jpayne@69: * self._lines = lines # <<<<<<<<<<<<<< jpayne@69: * self.encoding = "ascii" jpayne@69: * self.tabixfile = None jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lines_2, __pyx_v_lines) < 0) __PYX_ERR(0, 351, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":352 jpayne@69: * if leftalign: self._leftalign = leftalign jpayne@69: * self._lines = lines jpayne@69: * self.encoding = "ascii" # <<<<<<<<<<<<<< jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_encoding, __pyx_n_u_ascii) < 0) __PYX_ERR(0, 352, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":353 jpayne@69: * self._lines = lines jpayne@69: * self.encoding = "ascii" jpayne@69: * self.tabixfile = None # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def error(self,line,error,opt=None): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile, Py_None) < 0) __PYX_ERR(0, 353, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":330 jpayne@69: * _lines = None jpayne@69: * jpayne@69: * def __init__(self, _copy=None, reference=None, regions=None, # <<<<<<<<<<<<<< jpayne@69: * lines=None, leftalign=False): jpayne@69: * # make error identifiers accessible by name jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_9); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_id); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":355 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def error(self,line,error,opt=None): # <<<<<<<<<<<<<< jpayne@69: * if error in self._ignored_errors: return jpayne@69: * errorlabel, errorstring = self._errors[error].split(':') jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_3error(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_2error, "VCF.error(self, line, error, opt=None)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_3error = {"error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_3error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_2error}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_3error(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: PyObject *__pyx_v_error = 0; jpayne@69: PyObject *__pyx_v_opt = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[4] = {0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("error (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,&__pyx_n_s_error,&__pyx_n_s_opt,0}; jpayne@69: values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, 1); __PYX_ERR(0, 355, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_error)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, 2); __PYX_ERR(0, 355, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_opt); jpayne@69: if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "error") < 0)) __PYX_ERR(0, 355, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_line = values[1]; jpayne@69: __pyx_v_error = values[2]; jpayne@69: __pyx_v_opt = values[3]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 355, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.error", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_2error(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_error, __pyx_v_opt); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt) { jpayne@69: PyObject *__pyx_v_errorlabel = NULL; jpayne@69: PyObject *__pyx_v_errorstring = NULL; jpayne@69: PyObject *__pyx_v_errwarn = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: unsigned int __pyx_t_5; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *(*__pyx_t_7)(PyObject *); jpayne@69: Py_ssize_t __pyx_t_8; jpayne@69: Py_UCS4 __pyx_t_9; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("error", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":356 jpayne@69: * jpayne@69: * def error(self,line,error,opt=None): jpayne@69: * if error in self._ignored_errors: return # <<<<<<<<<<<<<< jpayne@69: * errorlabel, errorstring = self._errors[error].split(':') jpayne@69: * if opt: errorstring = errorstring % opt jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ignored_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_error, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 356, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":357 jpayne@69: * def error(self,line,error,opt=None): jpayne@69: * if error in self._ignored_errors: return jpayne@69: * errorlabel, errorstring = self._errors[error].split(':') # <<<<<<<<<<<<<< jpayne@69: * if opt: errorstring = errorstring % opt jpayne@69: * errwarn = ["Error","Warning"][error in self._warn_errors] jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__3}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { jpayne@69: PyObject* sequence = __pyx_t_1; jpayne@69: Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); jpayne@69: if (unlikely(size != 2)) { jpayne@69: if (size > 2) __Pyx_RaiseTooManyValuesError(2); jpayne@69: else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); jpayne@69: __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: if (likely(PyTuple_CheckExact(sequence))) { jpayne@69: __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); jpayne@69: } else { jpayne@69: __pyx_t_3 = PyList_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_4 = PyList_GET_ITEM(sequence, 1); jpayne@69: } jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: #else jpayne@69: __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: #endif jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } else { jpayne@69: Py_ssize_t index = -1; jpayne@69: __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); jpayne@69: index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __pyx_t_7 = NULL; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: goto __pyx_L5_unpacking_done; jpayne@69: __pyx_L4_unpacking_failed:; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_7 = NULL; jpayne@69: if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); jpayne@69: __PYX_ERR(0, 357, __pyx_L1_error) jpayne@69: __pyx_L5_unpacking_done:; jpayne@69: } jpayne@69: __pyx_v_errorlabel = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: __pyx_v_errorstring = __pyx_t_4; jpayne@69: __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":358 jpayne@69: * if error in self._ignored_errors: return jpayne@69: * errorlabel, errorstring = self._errors[error].split(':') jpayne@69: * if opt: errorstring = errorstring % opt # <<<<<<<<<<<<<< jpayne@69: * errwarn = ["Error","Warning"][error in self._warn_errors] jpayne@69: * errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opt); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 358, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_1 = PyNumber_Remainder(__pyx_v_errorstring, __pyx_v_opt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_errorstring, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":359 jpayne@69: * errorlabel, errorstring = self._errors[error].split(':') jpayne@69: * if opt: errorstring = errorstring % opt jpayne@69: * errwarn = ["Error","Warning"][error in self._warn_errors] # <<<<<<<<<<<<<< jpayne@69: * errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring) jpayne@69: * if error in self._warn_errors: return jpayne@69: */ jpayne@69: __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_n_u_Error); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_Error); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_Error)) __PYX_ERR(0, 359, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_Warning); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_Warning); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_Warning)) __PYX_ERR(0, 359, __pyx_L1_error); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_warn_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_error, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 359, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_t_1, __pyx_t_2, int, 1, __Pyx_PyBool_FromLong, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_v_errwarn = __pyx_t_4; jpayne@69: __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":360 jpayne@69: * if opt: errorstring = errorstring % opt jpayne@69: * errwarn = ["Error","Warning"][error in self._warn_errors] jpayne@69: * errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring) # <<<<<<<<<<<<<< jpayne@69: * if error in self._warn_errors: return jpayne@69: * raise ValueError(errorstring) jpayne@69: */ jpayne@69: __pyx_t_4 = PyTuple_New(11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_8 = 0; jpayne@69: __pyx_t_9 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_in_line); jpayne@69: __pyx_t_8 += 9; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_in_line); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_in_line); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9; jpayne@69: __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__10); jpayne@69: __pyx_t_8 += 3; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__10); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__10); jpayne@69: __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_line), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9; jpayne@69: __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__11); jpayne@69: __pyx_t_8 += 2; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__11); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__11); jpayne@69: __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_errwarn), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9; jpayne@69: __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__12); jpayne@69: __pyx_t_8 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__12); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_kp_u__12); jpayne@69: __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_errorlabel), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9; jpayne@69: __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__13); jpayne@69: __pyx_t_8 += 2; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__13); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_kp_u__13); jpayne@69: __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_errorstring), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_9; jpayne@69: __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 9, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__14); jpayne@69: __pyx_t_8 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__14); jpayne@69: PyTuple_SET_ITEM(__pyx_t_4, 10, __pyx_kp_u__14); jpayne@69: __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 11, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_errorstring, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_errorstring, __pyx_t_4); jpayne@69: __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":361 jpayne@69: * errwarn = ["Error","Warning"][error in self._warn_errors] jpayne@69: * errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring) jpayne@69: * if error in self._warn_errors: return # <<<<<<<<<<<<<< jpayne@69: * raise ValueError(errorstring) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_warn_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_error, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 361, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":362 jpayne@69: * errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring) jpayne@69: * if error in self._warn_errors: return jpayne@69: * raise ValueError(errorstring) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def parse_format(self,line,format,filter=False): jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_v_errorstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_Raise(__pyx_t_4, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __PYX_ERR(0, 362, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":355 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def error(self,line,error,opt=None): # <<<<<<<<<<<<<< jpayne@69: * if error in self._ignored_errors: return jpayne@69: * errorlabel, errorstring = self._errors[error].split(':') jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.error", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_errorlabel); jpayne@69: __Pyx_XDECREF(__pyx_v_errorstring); jpayne@69: __Pyx_XDECREF(__pyx_v_errwarn); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":364 jpayne@69: * raise ValueError(errorstring) jpayne@69: * jpayne@69: * def parse_format(self,line,format,filter=False): # <<<<<<<<<<<<<< jpayne@69: * if self._version == 40: jpayne@69: * if not format.startswith('<'): jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_5parse_format(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_4parse_format, "VCF.parse_format(self, line, format, filter=False)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_5parse_format = {"parse_format", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_5parse_format, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_4parse_format}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_5parse_format(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: PyObject *__pyx_v_format = 0; jpayne@69: PyObject *__pyx_v_filter = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[4] = {0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("parse_format (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,&__pyx_n_s_format,&__pyx_n_s_filter_2,0}; jpayne@69: values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False))); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, 1); __PYX_ERR(0, 364, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, 2); __PYX_ERR(0, 364, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filter_2); jpayne@69: if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_format") < 0)) __PYX_ERR(0, 364, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_line = values[1]; jpayne@69: __pyx_v_format = values[2]; jpayne@69: __pyx_v_filter = values[3]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 364, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_4parse_format(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_format, __pyx_v_filter); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_format, PyObject *__pyx_v_filter) { jpayne@69: PyObject *__pyx_v_data = NULL; jpayne@69: PyObject *__pyx_v_idx = NULL; jpayne@69: PyObject *__pyx_v_elts = NULL; jpayne@69: PyObject *__pyx_v_first = NULL; jpayne@69: PyObject *__pyx_v_rest = NULL; jpayne@69: PyObject *__pyx_v_n = NULL; jpayne@69: PyObject *__pyx_v_t = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: unsigned int __pyx_t_5; jpayne@69: int __pyx_t_6; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: Py_ssize_t __pyx_t_8; jpayne@69: int __pyx_t_9; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: PyObject *__pyx_t_13 = NULL; jpayne@69: PyObject *__pyx_t_14 = NULL; jpayne@69: int __pyx_t_15; jpayne@69: PyObject *__pyx_t_16 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("parse_format", 0); jpayne@69: __Pyx_INCREF(__pyx_v_format); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":365 jpayne@69: * jpayne@69: * def parse_format(self,line,format,filter=False): jpayne@69: * if self._version == 40: # <<<<<<<<<<<<<< jpayne@69: * if not format.startswith('<'): jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_40, 40, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 365, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":366 jpayne@69: * def parse_format(self,line,format,filter=False): jpayne@69: * if self._version == 40: jpayne@69: * if not format.startswith('<'): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format = "<"+format jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__15}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 366, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_6 = (!__pyx_t_2); jpayne@69: if (__pyx_t_6) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":367 jpayne@69: * if self._version == 40: jpayne@69: * if not format.startswith('<'): jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) # <<<<<<<<<<<<<< jpayne@69: * format = "<"+format jpayne@69: * if not format.endswith('>'): jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V40_MISSING_ANGLE_BRACKETS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 367, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_4}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":368 jpayne@69: * if not format.startswith('<'): jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format = "<"+format # <<<<<<<<<<<<<< jpayne@69: * if not format.endswith('>'): jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: */ jpayne@69: __pyx_t_1 = PyNumber_Add(__pyx_kp_u__15, __pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":366 jpayne@69: * def parse_format(self,line,format,filter=False): jpayne@69: * if self._version == 40: jpayne@69: * if not format.startswith('<'): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format = "<"+format jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":369 jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format = "<"+format jpayne@69: * if not format.endswith('>'): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format += ">" jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__16}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 369, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_2 = (!__pyx_t_6); jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":370 jpayne@69: * format = "<"+format jpayne@69: * if not format.endswith('>'): jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) # <<<<<<<<<<<<<< jpayne@69: * format += ">" jpayne@69: * format = format[1:-1] jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V40_MISSING_ANGLE_BRACKETS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_4}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":371 jpayne@69: * if not format.endswith('>'): jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format += ">" # <<<<<<<<<<<<<< jpayne@69: * format = format[1:-1] jpayne@69: * data = {'id':None,'number':None,'type':None,'descr':None} jpayne@69: */ jpayne@69: __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_format, __pyx_kp_u__16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":369 jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format = "<"+format jpayne@69: * if not format.endswith('>'): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format += ">" jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":372 jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format += ">" jpayne@69: * format = format[1:-1] # <<<<<<<<<<<<<< jpayne@69: * data = {'id':None,'number':None,'type':None,'descr':None} jpayne@69: * idx = 0 jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_format, 1, -1L, NULL, NULL, &__pyx_slice__17, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":365 jpayne@69: * jpayne@69: * def parse_format(self,line,format,filter=False): jpayne@69: * if self._version == 40: # <<<<<<<<<<<<<< jpayne@69: * if not format.startswith('<'): jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":373 jpayne@69: * format += ">" jpayne@69: * format = format[1:-1] jpayne@69: * data = {'id':None,'number':None,'type':None,'descr':None} # <<<<<<<<<<<<<< jpayne@69: * idx = 0 jpayne@69: * while len(format.strip())>0: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_id_2, Py_None) < 0) __PYX_ERR(0, 373, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_number, Py_None) < 0) __PYX_ERR(0, 373, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_type, Py_None) < 0) __PYX_ERR(0, 373, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_descr, Py_None) < 0) __PYX_ERR(0, 373, __pyx_L1_error) jpayne@69: __pyx_v_data = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":374 jpayne@69: * format = format[1:-1] jpayne@69: * data = {'id':None,'number':None,'type':None,'descr':None} jpayne@69: * idx = 0 # <<<<<<<<<<<<<< jpayne@69: * while len(format.strip())>0: jpayne@69: * elts = format.strip().split(',') jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_v_idx = __pyx_int_0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":375 jpayne@69: * data = {'id':None,'number':None,'type':None,'descr':None} jpayne@69: * idx = 0 jpayne@69: * while len(format.strip())>0: # <<<<<<<<<<<<<< jpayne@69: * elts = format.strip().split(',') jpayne@69: * first, rest = elts[0], ','.join(elts[1:]) jpayne@69: */ jpayne@69: while (1) { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 375, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_2 = (__pyx_t_8 > 0); jpayne@69: if (!__pyx_t_2) break; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":376 jpayne@69: * idx = 0 jpayne@69: * while len(format.strip())>0: jpayne@69: * elts = format.strip().split(',') # <<<<<<<<<<<<<< jpayne@69: * first, rest = elts[0], ','.join(elts[1:]) jpayne@69: * if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')): jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__2}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_elts, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":377 jpayne@69: * while len(format.strip())>0: jpayne@69: * elts = format.strip().split(',') jpayne@69: * first, rest = elts[0], ','.join(elts[1:]) # <<<<<<<<<<<<<< jpayne@69: * if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')): jpayne@69: * if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_elts, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_first, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_rest, ((PyObject*)__pyx_t_3)); jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":378 jpayne@69: * elts = format.strip().split(',') jpayne@69: * first, rest = elts[0], ','.join(elts[1:]) jpayne@69: * if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')): # <<<<<<<<<<<<<< jpayne@69: * if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS) jpayne@69: * if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__7}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_3, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (!__pyx_t_6) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: goto __pyx_L9_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__19}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_6) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: goto __pyx_L9_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_find); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u__7}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_find); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u__19}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 378, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: __pyx_L9_bool_binop_done:; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":379 jpayne@69: * first, rest = elts[0], ','.join(elts[1:]) jpayne@69: * if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')): jpayne@69: * if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS) # <<<<<<<<<<<<<< jpayne@69: * if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * first = ["ID=","Number=","Type=","Description="][idx] + first jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_2 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_4, __pyx_int_40, 40, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 379, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_1}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":380 jpayne@69: * if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')): jpayne@69: * if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS) jpayne@69: * if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) # <<<<<<<<<<<<<< jpayne@69: * first = ["ID=","Number=","Type=","Description="][idx] + first jpayne@69: * if first.startswith('ID='): data['id'] = first.split('=')[1] jpayne@69: */ jpayne@69: __pyx_t_2 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_idx, __pyx_int_4, 4, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 380, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_1}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":381 jpayne@69: * if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS) jpayne@69: * if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * first = ["ID=","Number=","Type=","Description="][idx] + first # <<<<<<<<<<<<<< jpayne@69: * if first.startswith('ID='): data['id'] = first.split('=')[1] jpayne@69: * elif first.startswith('Number='): data['number'] = first.split('=')[1] jpayne@69: */ jpayne@69: __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_kp_u_ID); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_ID); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_ID)) __PYX_ERR(0, 381, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_kp_u_Number); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_Number); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u_Number)) __PYX_ERR(0, 381, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_kp_u_Type); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_Type); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_Type)) __PYX_ERR(0, 381, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_kp_u_Description); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_Description); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_kp_u_Description)) __PYX_ERR(0, 381, __pyx_L1_error); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_first); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_4); jpayne@69: __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":378 jpayne@69: * elts = format.strip().split(',') jpayne@69: * first, rest = elts[0], ','.join(elts[1:]) jpayne@69: * if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')): # <<<<<<<<<<<<<< jpayne@69: * if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS) jpayne@69: * if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":382 jpayne@69: * if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * first = ["ID=","Number=","Type=","Description="][idx] + first jpayne@69: * if first.startswith('ID='): data['id'] = first.split('=')[1] # <<<<<<<<<<<<<< jpayne@69: * elif first.startswith('Number='): data['number'] = first.split('=')[1] jpayne@69: * elif first.startswith('Type='): data['type'] = first.split('=')[1] jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u_ID}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 382, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__7}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_n_u_id_2, __pyx_t_3) < 0))) __PYX_ERR(0, 382, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: goto __pyx_L14; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":383 jpayne@69: * first = ["ID=","Number=","Type=","Description="][idx] + first jpayne@69: * if first.startswith('ID='): data['id'] = first.split('=')[1] jpayne@69: * elif first.startswith('Number='): data['number'] = first.split('=')[1] # <<<<<<<<<<<<<< jpayne@69: * elif first.startswith('Type='): data['type'] = first.split('=')[1] jpayne@69: * elif first.startswith('Description='): jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u_Number}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 383, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__7}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_n_u_number, __pyx_t_4) < 0))) __PYX_ERR(0, 383, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: goto __pyx_L14; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":384 jpayne@69: * if first.startswith('ID='): data['id'] = first.split('=')[1] jpayne@69: * elif first.startswith('Number='): data['number'] = first.split('=')[1] jpayne@69: * elif first.startswith('Type='): data['type'] = first.split('=')[1] # <<<<<<<<<<<<<< jpayne@69: * elif first.startswith('Description='): jpayne@69: * elts = format.split('"') jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u_Type}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 384, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__7}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_n_u_type, __pyx_t_3) < 0))) __PYX_ERR(0, 384, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: goto __pyx_L14; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":385 jpayne@69: * elif first.startswith('Number='): data['number'] = first.split('=')[1] jpayne@69: * elif first.startswith('Type='): data['type'] = first.split('=')[1] jpayne@69: * elif first.startswith('Description='): # <<<<<<<<<<<<<< jpayne@69: * elts = format.split('"') jpayne@69: * if len(elts)<3: jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u_Description}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 385, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":386 jpayne@69: * elif first.startswith('Type='): data['type'] = first.split('=')[1] jpayne@69: * elif first.startswith('Description='): jpayne@69: * elts = format.split('"') # <<<<<<<<<<<<<< jpayne@69: * if len(elts)<3: jpayne@69: * self.error(line,self.FORMAT_MISSING_QUOTES) jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__19}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF_SET(__pyx_v_elts, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":387 jpayne@69: * elif first.startswith('Description='): jpayne@69: * elts = format.split('"') jpayne@69: * if len(elts)<3: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.FORMAT_MISSING_QUOTES) jpayne@69: * elts = first.split('=') + [rest] jpayne@69: */ jpayne@69: __pyx_t_8 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 387, __pyx_L1_error) jpayne@69: __pyx_t_2 = (__pyx_t_8 < 3); jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":388 jpayne@69: * elts = format.split('"') jpayne@69: * if len(elts)<3: jpayne@69: * self.error(line,self.FORMAT_MISSING_QUOTES) # <<<<<<<<<<<<<< jpayne@69: * elts = first.split('=') + [rest] jpayne@69: * data['descr'] = elts[1] jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FORMAT_MISSING_QUOTES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_1}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":389 jpayne@69: * if len(elts)<3: jpayne@69: * self.error(line,self.FORMAT_MISSING_QUOTES) jpayne@69: * elts = first.split('=') + [rest] # <<<<<<<<<<<<<< jpayne@69: * data['descr'] = elts[1] jpayne@69: * rest = '"'.join(elts[2:]) jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__7}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_v_rest); jpayne@69: __Pyx_GIVEREF(__pyx_v_rest); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_rest)) __PYX_ERR(0, 389, __pyx_L1_error); jpayne@69: __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_elts, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":387 jpayne@69: * elif first.startswith('Description='): jpayne@69: * elts = format.split('"') jpayne@69: * if len(elts)<3: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.FORMAT_MISSING_QUOTES) jpayne@69: * elts = first.split('=') + [rest] jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":390 jpayne@69: * self.error(line,self.FORMAT_MISSING_QUOTES) jpayne@69: * elts = first.split('=') + [rest] jpayne@69: * data['descr'] = elts[1] # <<<<<<<<<<<<<< jpayne@69: * rest = '"'.join(elts[2:]) jpayne@69: * if rest.startswith(','): rest = rest[1:] jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_n_u_descr, __pyx_t_1) < 0))) __PYX_ERR(0, 390, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":391 jpayne@69: * elts = first.split('=') + [rest] jpayne@69: * data['descr'] = elts[1] jpayne@69: * rest = '"'.join(elts[2:]) # <<<<<<<<<<<<<< jpayne@69: * if rest.startswith(','): rest = rest[1:] jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_elts, 2, 0, NULL, NULL, &__pyx_slice__20, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_rest, ((PyObject*)__pyx_t_4)); jpayne@69: __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":392 jpayne@69: * data['descr'] = elts[1] jpayne@69: * rest = '"'.join(elts[2:]) jpayne@69: * if rest.startswith(','): rest = rest[1:] # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: if (unlikely(__pyx_v_rest == Py_None)) { jpayne@69: PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith"); jpayne@69: __PYX_ERR(0, 392, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyUnicode_Tailmatch(__pyx_v_rest, __pyx_kp_u__2, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 392, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: if (unlikely(__pyx_v_rest == Py_None)) { jpayne@69: PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); jpayne@69: __PYX_ERR(0, 392, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_t_4 = __Pyx_PyUnicode_Substring(__pyx_v_rest, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF_SET(__pyx_v_rest, ((PyObject*)__pyx_t_4)); jpayne@69: __pyx_t_4 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":385 jpayne@69: * elif first.startswith('Number='): data['number'] = first.split('=')[1] jpayne@69: * elif first.startswith('Type='): data['type'] = first.split('=')[1] jpayne@69: * elif first.startswith('Description='): # <<<<<<<<<<<<<< jpayne@69: * elts = format.split('"') jpayne@69: * if len(elts)<3: jpayne@69: */ jpayne@69: goto __pyx_L14; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":394 jpayne@69: * if rest.startswith(','): rest = rest[1:] jpayne@69: * else: jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) # <<<<<<<<<<<<<< jpayne@69: * format = rest jpayne@69: * idx += 1 jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_3}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_L14:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":395 jpayne@69: * else: jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * format = rest # <<<<<<<<<<<<<< jpayne@69: * idx += 1 jpayne@69: * if filter and idx==1: idx=3 # skip number and type fields for FILTER format strings jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_v_rest); jpayne@69: __Pyx_DECREF_SET(__pyx_v_format, __pyx_v_rest); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":396 jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * format = rest jpayne@69: * idx += 1 # <<<<<<<<<<<<<< jpayne@69: * if filter and idx==1: idx=3 # skip number and type fields for FILTER format strings jpayne@69: * if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_idx, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_4); jpayne@69: __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":397 jpayne@69: * format = rest jpayne@69: * idx += 1 jpayne@69: * if filter and idx==1: idx=3 # skip number and type fields for FILTER format strings # <<<<<<<<<<<<<< jpayne@69: * if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * if 'descr' not in data: jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 397, __pyx_L1_error) jpayne@69: if (__pyx_t_6) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: goto __pyx_L18_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_idx, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 397, __pyx_L1_error) jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: __pyx_L18_bool_binop_done:; jpayne@69: if (__pyx_t_2) { jpayne@69: __Pyx_INCREF(__pyx_int_3); jpayne@69: __Pyx_DECREF_SET(__pyx_v_idx, __pyx_int_3); jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":398 jpayne@69: * idx += 1 jpayne@69: * if filter and idx==1: idx=3 # skip number and type fields for FILTER format strings jpayne@69: * if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) # <<<<<<<<<<<<<< jpayne@69: * if 'descr' not in data: jpayne@69: * # missing description jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_id_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 398, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_6 = (!__pyx_t_2); jpayne@69: if (__pyx_t_6) { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_3}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":399 jpayne@69: * if filter and idx==1: idx=3 # skip number and type fields for FILTER format strings jpayne@69: * if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * if 'descr' not in data: # <<<<<<<<<<<<<< jpayne@69: * # missing description jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_descr, __pyx_v_data, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 399, __pyx_L1_error) jpayne@69: if (__pyx_t_6) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":401 jpayne@69: * if 'descr' not in data: jpayne@69: * # missing description jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) # <<<<<<<<<<<<<< jpayne@69: * data['descr'] = "" jpayne@69: * if not data['type'] and not data['number']: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_3}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":402 jpayne@69: * # missing description jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * data['descr'] = "" # <<<<<<<<<<<<<< jpayne@69: * if not data['type'] and not data['number']: jpayne@69: * # fine, ##filter format jpayne@69: */ jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_n_u_descr, __pyx_kp_u_) < 0))) __PYX_ERR(0, 402, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":399 jpayne@69: * if filter and idx==1: idx=3 # skip number and type fields for FILTER format strings jpayne@69: * if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * if 'descr' not in data: # <<<<<<<<<<<<<< jpayne@69: * # missing description jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":403 jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * data['descr'] = "" jpayne@69: * if not data['type'] and not data['number']: # <<<<<<<<<<<<<< jpayne@69: * # fine, ##filter format jpayne@69: * return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.') jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 403, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_9 = (!__pyx_t_2); jpayne@69: if (__pyx_t_9) { jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_9; jpayne@69: goto __pyx_L23_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 403, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_2 = (!__pyx_t_9); jpayne@69: __pyx_t_6 = __pyx_t_2; jpayne@69: __pyx_L23_bool_binop_done:; jpayne@69: if (__pyx_t_6) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":405 jpayne@69: * if not data['type'] and not data['number']: jpayne@69: * # fine, ##filter format jpayne@69: * return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.') # <<<<<<<<<<<<<< jpayne@69: * if not data['type'] in ["Integer","Float","Character","String","Flag"]: jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 405, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_descr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 405, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_11 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_11)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_11, __pyx_t_3, __pyx_t_7, __pyx_int_0, __pyx_n_u_Flag, __pyx_t_10, __pyx_kp_u__5}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_r = __pyx_t_4; jpayne@69: __pyx_t_4 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":403 jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * data['descr'] = "" jpayne@69: * if not data['type'] and not data['number']: # <<<<<<<<<<<<<< jpayne@69: * # fine, ##filter format jpayne@69: * return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.') jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":406 jpayne@69: * # fine, ##filter format jpayne@69: * return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.') jpayne@69: * if not data['type'] in ["Integer","Float","Character","String","Flag"]: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * # I would like a missing-value field, but it isn't there jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_Integer, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 406, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_2; jpayne@69: goto __pyx_L26_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_Float, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 406, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_2; jpayne@69: goto __pyx_L26_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_Character, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 406, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_2; jpayne@69: goto __pyx_L26_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_String, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 406, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_2; jpayne@69: goto __pyx_L26_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_Flag, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 406, __pyx_L1_error) jpayne@69: __pyx_t_6 = __pyx_t_2; jpayne@69: __pyx_L26_bool_binop_done:; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":407 jpayne@69: * return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.') jpayne@69: * if not data['type'] in ["Integer","Float","Character","String","Flag"]: jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) # <<<<<<<<<<<<<< jpayne@69: * # I would like a missing-value field, but it isn't there jpayne@69: * if data['type'] in ['Integer','Float']: data['missing'] = None # Do NOT use arbitrary int/float as missing value jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 407, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_10}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":406 jpayne@69: * # fine, ##filter format jpayne@69: * return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.') jpayne@69: * if not data['type'] in ["Integer","Float","Character","String","Flag"]: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * # I would like a missing-value field, but it isn't there jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":409 jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * # I would like a missing-value field, but it isn't there jpayne@69: * if data['type'] in ['Integer','Float']: data['missing'] = None # Do NOT use arbitrary int/float as missing value # <<<<<<<<<<<<<< jpayne@69: * else: data['missing'] = '.' jpayne@69: * if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_Integer, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 409, __pyx_L1_error) jpayne@69: if (!__pyx_t_6) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: goto __pyx_L32_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_Float, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 409, __pyx_L1_error) jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: __pyx_L32_bool_binop_done:; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_6 = __pyx_t_2; jpayne@69: if (__pyx_t_6) { jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_n_u_missing, Py_None) < 0))) __PYX_ERR(0, 409, __pyx_L1_error) jpayne@69: goto __pyx_L31; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":410 jpayne@69: * # I would like a missing-value field, but it isn't there jpayne@69: * if data['type'] in ['Integer','Float']: data['missing'] = None # Do NOT use arbitrary int/float as missing value jpayne@69: * else: data['missing'] = '.' # <<<<<<<<<<<<<< jpayne@69: * if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * try: jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_n_u_missing, __pyx_kp_u__5) < 0))) __PYX_ERR(0, 410, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_L31:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":411 jpayne@69: * if data['type'] in ['Integer','Float']: data['missing'] = None # Do NOT use arbitrary int/float as missing value jpayne@69: * else: data['missing'] = '.' jpayne@69: * if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) # <<<<<<<<<<<<<< jpayne@69: * try: jpayne@69: * n = int(data['number']) jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 411, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_2 = (!__pyx_t_6); jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 411, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_10}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":412 jpayne@69: * else: data['missing'] = '.' jpayne@69: * if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * n = int(data['number']) jpayne@69: * t = self.NT_NUMBER jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); jpayne@69: __Pyx_XGOTREF(__pyx_t_12); jpayne@69: __Pyx_XGOTREF(__pyx_t_13); jpayne@69: __Pyx_XGOTREF(__pyx_t_14); jpayne@69: /*try:*/ { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":413 jpayne@69: * if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * try: jpayne@69: * n = int(data['number']) # <<<<<<<<<<<<<< jpayne@69: * t = self.NT_NUMBER jpayne@69: * except ValueError: jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L35_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L35_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_v_n = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":414 jpayne@69: * try: jpayne@69: * n = int(data['number']) jpayne@69: * t = self.NT_NUMBER # <<<<<<<<<<<<<< jpayne@69: * except ValueError: jpayne@69: * n = -1 jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L35_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_t = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":412 jpayne@69: * else: data['missing'] = '.' jpayne@69: * if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * n = int(data['number']) jpayne@69: * t = self.NT_NUMBER jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: goto __pyx_L40_try_end; jpayne@69: __pyx_L35_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":415 jpayne@69: * n = int(data['number']) jpayne@69: * t = self.NT_NUMBER jpayne@69: * except ValueError: # <<<<<<<<<<<<<< jpayne@69: * n = -1 jpayne@69: * if data['number'] == '.': t = self.NT_UNKNOWN jpayne@69: */ jpayne@69: __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); jpayne@69: if (__pyx_t_15) { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(0, 415, __pyx_L37_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_4); jpayne@69: __Pyx_XGOTREF(__pyx_t_10); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":416 jpayne@69: * t = self.NT_NUMBER jpayne@69: * except ValueError: jpayne@69: * n = -1 # <<<<<<<<<<<<<< jpayne@69: * if data['number'] == '.': t = self.NT_UNKNOWN jpayne@69: * elif data['number'] == '#alleles': t = self.NT_ALLELES jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_int_neg_1); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_n, __pyx_int_neg_1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":417 jpayne@69: * except ValueError: jpayne@69: * n = -1 jpayne@69: * if data['number'] == '.': t = self.NT_UNKNOWN # <<<<<<<<<<<<<< jpayne@69: * elif data['number'] == '#alleles': t = self.NT_ALLELES jpayne@69: * elif data['number'] == '#nonref_alleles': t = self.NT_NR_ALLELES jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 417, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 417, __pyx_L37_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 417, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L43; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":418 jpayne@69: * n = -1 jpayne@69: * if data['number'] == '.': t = self.NT_UNKNOWN jpayne@69: * elif data['number'] == '#alleles': t = self.NT_ALLELES # <<<<<<<<<<<<<< jpayne@69: * elif data['number'] == '#nonref_alleles': t = self.NT_NR_ALLELES jpayne@69: * elif data['number'] == '#genotypes': t = self.NT_GENOTYPES jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 418, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u_alleles, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 418, __pyx_L37_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 418, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L43; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":419 jpayne@69: * if data['number'] == '.': t = self.NT_UNKNOWN jpayne@69: * elif data['number'] == '#alleles': t = self.NT_ALLELES jpayne@69: * elif data['number'] == '#nonref_alleles': t = self.NT_NR_ALLELES # <<<<<<<<<<<<<< jpayne@69: * elif data['number'] == '#genotypes': t = self.NT_GENOTYPES jpayne@69: * elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 419, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u_nonref_alleles, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 419, __pyx_L37_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NR_ALLELES); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 419, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L43; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":420 jpayne@69: * elif data['number'] == '#alleles': t = self.NT_ALLELES jpayne@69: * elif data['number'] == '#nonref_alleles': t = self.NT_NR_ALLELES jpayne@69: * elif data['number'] == '#genotypes': t = self.NT_GENOTYPES # <<<<<<<<<<<<<< jpayne@69: * elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES jpayne@69: * elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 420, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u_genotypes, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 420, __pyx_L37_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 420, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L43; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":421 jpayne@69: * elif data['number'] == '#nonref_alleles': t = self.NT_NR_ALLELES jpayne@69: * elif data['number'] == '#genotypes': t = self.NT_GENOTYPES jpayne@69: * elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES # <<<<<<<<<<<<<< jpayne@69: * elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES jpayne@69: * # abbreviations added in VCF version v4.1 jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 421, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u_phased_genotypes, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 421, __pyx_L37_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 421, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L43; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":422 jpayne@69: * elif data['number'] == '#genotypes': t = self.NT_GENOTYPES jpayne@69: * elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES jpayne@69: * elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES # <<<<<<<<<<<<<< jpayne@69: * # abbreviations added in VCF version v4.1 jpayne@69: * elif data['number'] == 'A': t = self.NT_ALLELES jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 422, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u_phased_genotypes, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 422, __pyx_L37_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 422, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L43; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":424 jpayne@69: * elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES jpayne@69: * # abbreviations added in VCF version v4.1 jpayne@69: * elif data['number'] == 'A': t = self.NT_ALLELES # <<<<<<<<<<<<<< jpayne@69: * elif data['number'] == 'G': t = self.NT_GENOTYPES jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_A, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 424, __pyx_L37_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L43; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":425 jpayne@69: * # abbreviations added in VCF version v4.1 jpayne@69: * elif data['number'] == 'A': t = self.NT_ALLELES jpayne@69: * elif data['number'] == 'G': t = self.NT_GENOTYPES # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 425, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_G, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 425, __pyx_L37_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 425, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L43; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":427 jpayne@69: * elif data['number'] == 'G': t = self.NT_GENOTYPES jpayne@69: * else: jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) # <<<<<<<<<<<<<< jpayne@69: * # if number is 0 - type must be Flag jpayne@69: * if n == 0 and data['type'] != 'Flag': jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_FORMAT_STRING); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 427, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_16 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_16)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_16); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_v_line, __pyx_t_11}; jpayne@69: __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L37_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: } jpayne@69: __pyx_L43:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: goto __pyx_L36_exception_handled; jpayne@69: } jpayne@69: goto __pyx_L37_except_error; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":412 jpayne@69: * else: data['missing'] = '.' jpayne@69: * if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * n = int(data['number']) jpayne@69: * t = self.NT_NUMBER jpayne@69: */ jpayne@69: __pyx_L37_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_12); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L36_exception_handled:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_12); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); jpayne@69: __pyx_L40_try_end:; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":429 jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * # if number is 0 - type must be Flag jpayne@69: * if n == 0 and data['type'] != 'Flag': # <<<<<<<<<<<<<< jpayne@69: * self.error( line, self.ZERO_FOR_NON_FLAG_FIELD) jpayne@69: * # force type 'Flag' if no number jpayne@69: */ jpayne@69: __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_n, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 429, __pyx_L1_error) jpayne@69: if (__pyx_t_6) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: goto __pyx_L45_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 429, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_Flag, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 429, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: __pyx_L45_bool_binop_done:; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":430 jpayne@69: * # if number is 0 - type must be Flag jpayne@69: * if n == 0 and data['type'] != 'Flag': jpayne@69: * self.error( line, self.ZERO_FOR_NON_FLAG_FIELD) # <<<<<<<<<<<<<< jpayne@69: * # force type 'Flag' if no number jpayne@69: * data['type'] = 'Flag' jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ZERO_FOR_NON_FLAG_FIELD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_line, __pyx_t_1}; jpayne@69: __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 430, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":432 jpayne@69: * self.error( line, self.ZERO_FOR_NON_FLAG_FIELD) jpayne@69: * # force type 'Flag' if no number jpayne@69: * data['type'] = 'Flag' # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing']) jpayne@69: */ jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_n_u_type, __pyx_n_u_Flag) < 0))) __PYX_ERR(0, 432, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":429 jpayne@69: * self.error(line,self.BADLY_FORMATTED_FORMAT_STRING) jpayne@69: * # if number is 0 - type must be Flag jpayne@69: * if n == 0 and data['type'] != 'Flag': # <<<<<<<<<<<<<< jpayne@69: * self.error( line, self.ZERO_FOR_NON_FLAG_FIELD) jpayne@69: * # force type 'Flag' if no number jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":434 jpayne@69: * data['type'] = 'Flag' jpayne@69: * jpayne@69: * return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing']) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def format_format( self, fmt, filter=False ): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_v_t)) { __Pyx_RaiseUnboundLocalError("t"); __PYX_ERR(0, 434, __pyx_L1_error) } jpayne@69: __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_descr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_data, __pyx_n_u_missing); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 434, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_16 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_16)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_16); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_16, __pyx_t_1, __pyx_v_t, __pyx_v_n, __pyx_t_7, __pyx_t_3, __pyx_t_11}; jpayne@69: __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 434, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __pyx_r = __pyx_t_10; jpayne@69: __pyx_t_10 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":364 jpayne@69: * raise ValueError(errorstring) jpayne@69: * jpayne@69: * def parse_format(self,line,format,filter=False): # <<<<<<<<<<<<<< jpayne@69: * if self._version == 40: jpayne@69: * if not format.startswith('<'): jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_XDECREF(__pyx_t_16); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_data); jpayne@69: __Pyx_XDECREF(__pyx_v_idx); jpayne@69: __Pyx_XDECREF(__pyx_v_elts); jpayne@69: __Pyx_XDECREF(__pyx_v_first); jpayne@69: __Pyx_XDECREF(__pyx_v_rest); jpayne@69: __Pyx_XDECREF(__pyx_v_n); jpayne@69: __Pyx_XDECREF(__pyx_v_t); jpayne@69: __Pyx_XDECREF(__pyx_v_format); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":436 jpayne@69: * return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing']) jpayne@69: * jpayne@69: * def format_format( self, fmt, filter=False ): # <<<<<<<<<<<<<< jpayne@69: * values = [('ID',fmt.id)] jpayne@69: * if fmt.number != None and not filter: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_7format_format(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_6format_format, "VCF.format_format(self, fmt, filter=False)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_7format_format = {"format_format", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_7format_format, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_6format_format}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_7format_format(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_fmt = 0; jpayne@69: PyObject *__pyx_v_filter = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("format_format (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fmt,&__pyx_n_s_filter_2,0}; jpayne@69: values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False))); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fmt)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("format_format", 0, 2, 3, 1); __PYX_ERR(0, 436, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filter_2); jpayne@69: if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "format_format") < 0)) __PYX_ERR(0, 436, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_fmt = values[1]; jpayne@69: __pyx_v_filter = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("format_format", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 436, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.format_format", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_6format_format(__pyx_self, __pyx_v_self, __pyx_v_fmt, __pyx_v_filter); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_6format_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt, PyObject *__pyx_v_filter) { jpayne@69: PyObject *__pyx_v_values = NULL; jpayne@69: PyObject *__pyx_v_nmb = NULL; jpayne@69: PyObject *__pyx_v_format = NULL; jpayne@69: CYTHON_UNUSED PyObject *__pyx_7genexpr__pyx_v_k = NULL; jpayne@69: PyObject *__pyx_7genexpr__pyx_v_v = NULL; jpayne@69: PyObject *__pyx_8genexpr1__pyx_v_k = NULL; jpayne@69: PyObject *__pyx_8genexpr1__pyx_v_v = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: int __pyx_t_3; jpayne@69: int __pyx_t_4; jpayne@69: int __pyx_t_5; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: int __pyx_t_7; jpayne@69: Py_ssize_t __pyx_t_8; jpayne@69: PyObject *__pyx_t_9 = NULL; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: PyObject *(*__pyx_t_12)(PyObject *); jpayne@69: Py_ssize_t __pyx_t_13; jpayne@69: Py_UCS4 __pyx_t_14; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("format_format", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":437 jpayne@69: * jpayne@69: * def format_format( self, fmt, filter=False ): jpayne@69: * values = [('ID',fmt.id)] # <<<<<<<<<<<<<< jpayne@69: * if fmt.number != None and not filter: jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: nmb = "." jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_n_u_ID_2); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_ID_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_ID_2)) __PYX_ERR(0, 437, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_v_values = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":438 jpayne@69: * def format_format( self, fmt, filter=False ): jpayne@69: * values = [('ID',fmt.id)] jpayne@69: * if fmt.number != None and not filter: # <<<<<<<<<<<<<< jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: nmb = "." jpayne@69: * elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 438, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_4) { jpayne@69: } else { jpayne@69: __pyx_t_3 = __pyx_t_4; jpayne@69: goto __pyx_L4_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 438, __pyx_L1_error) jpayne@69: __pyx_t_5 = (!__pyx_t_4); jpayne@69: __pyx_t_3 = __pyx_t_5; jpayne@69: __pyx_L4_bool_binop_done:; jpayne@69: if (__pyx_t_3) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":439 jpayne@69: * values = [('ID',fmt.id)] jpayne@69: * if fmt.number != None and not filter: jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: nmb = "." # <<<<<<<<<<<<<< jpayne@69: * elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number) jpayne@69: * elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles" jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 439, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 439, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __pyx_v_nmb = __pyx_kp_u__5; jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":440 jpayne@69: * if fmt.number != None and not filter: jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: nmb = "." jpayne@69: * elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number) # <<<<<<<<<<<<<< jpayne@69: * elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles" jpayne@69: * elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles" jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 440, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_v_nmb = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":441 jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: nmb = "." jpayne@69: * elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number) jpayne@69: * elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles" # <<<<<<<<<<<<<< jpayne@69: * elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles" jpayne@69: * elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes" jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 441, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_INCREF(__pyx_kp_u_alleles); jpayne@69: __pyx_v_nmb = __pyx_kp_u_alleles; jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":442 jpayne@69: * elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number) jpayne@69: * elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles" jpayne@69: * elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles" # <<<<<<<<<<<<<< jpayne@69: * elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes" jpayne@69: * elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes" jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NR_ALLELES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 442, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_INCREF(__pyx_kp_u_nonref_alleles); jpayne@69: __pyx_v_nmb = __pyx_kp_u_nonref_alleles; jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":443 jpayne@69: * elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles" jpayne@69: * elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles" jpayne@69: * elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes" # <<<<<<<<<<<<<< jpayne@69: * elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes" jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 443, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 443, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_INCREF(__pyx_kp_u_genotypes); jpayne@69: __pyx_v_nmb = __pyx_kp_u_genotypes; jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":444 jpayne@69: * elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles" jpayne@69: * elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes" jpayne@69: * elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes" # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * raise ValueError("Unknown number type encountered: %s" % fmt.numbertype) jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 444, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 444, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: __Pyx_INCREF(__pyx_kp_u_phased_genotypes); jpayne@69: __pyx_v_nmb = __pyx_kp_u_phased_genotypes; jpayne@69: goto __pyx_L6; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":446 jpayne@69: * elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes" jpayne@69: * else: jpayne@69: * raise ValueError("Unknown number type encountered: %s" % fmt.numbertype) # <<<<<<<<<<<<<< jpayne@69: * values.append( ('Number',nmb) ) jpayne@69: * values.append( ('Type', fmt.type) ) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Unknown_number_type_encountered, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_Raise(__pyx_t_1, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __PYX_ERR(0, 446, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_L6:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":447 jpayne@69: * else: jpayne@69: * raise ValueError("Unknown number type encountered: %s" % fmt.numbertype) jpayne@69: * values.append( ('Number',nmb) ) # <<<<<<<<<<<<<< jpayne@69: * values.append( ('Type', fmt.type) ) jpayne@69: * values.append( ('Description', '"' + fmt.description + '"') ) jpayne@69: */ jpayne@69: __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_n_u_Number_2); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_Number_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_Number_2)) __PYX_ERR(0, 447, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_nmb); jpayne@69: __Pyx_GIVEREF(__pyx_v_nmb); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_nmb)) __PYX_ERR(0, 447, __pyx_L1_error); jpayne@69: __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 447, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":448 jpayne@69: * raise ValueError("Unknown number type encountered: %s" % fmt.numbertype) jpayne@69: * values.append( ('Number',nmb) ) jpayne@69: * values.append( ('Type', fmt.type) ) # <<<<<<<<<<<<<< jpayne@69: * values.append( ('Description', '"' + fmt.description + '"') ) jpayne@69: * if self._version == 33: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_n_u_Type_2); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_Type_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_Type_2)) __PYX_ERR(0, 448, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 448, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":438 jpayne@69: * def format_format( self, fmt, filter=False ): jpayne@69: * values = [('ID',fmt.id)] jpayne@69: * if fmt.number != None and not filter: # <<<<<<<<<<<<<< jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: nmb = "." jpayne@69: * elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":449 jpayne@69: * values.append( ('Number',nmb) ) jpayne@69: * values.append( ('Type', fmt.type) ) jpayne@69: * values.append( ('Description', '"' + fmt.description + '"') ) # <<<<<<<<<<<<<< jpayne@69: * if self._version == 33: jpayne@69: * format = ",".join([v for k,v in values]) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_description); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyNumber_Add(__pyx_kp_u__19, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_u__19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_n_u_Description_2); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_Description_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_Description_2)) __PYX_ERR(0, 449, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 449, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":450 jpayne@69: * values.append( ('Type', fmt.type) ) jpayne@69: * values.append( ('Description', '"' + fmt.description + '"') ) jpayne@69: * if self._version == 33: # <<<<<<<<<<<<<< jpayne@69: * format = ",".join([v for k,v in values]) jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_33, 33, 0)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 450, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":451 jpayne@69: * values.append( ('Description', '"' + fmt.description + '"') ) jpayne@69: * if self._version == 33: jpayne@69: * format = ",".join([v for k,v in values]) # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">" jpayne@69: */ jpayne@69: { /* enter inner scope */ jpayne@69: __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __pyx_v_values; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_8 = 0; jpayne@69: for (;;) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: #endif jpayne@69: if (__pyx_t_8 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: #else jpayne@69: __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: #endif jpayne@69: if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { jpayne@69: PyObject* sequence = __pyx_t_6; jpayne@69: Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); jpayne@69: if (unlikely(size != 2)) { jpayne@69: if (size > 2) __Pyx_RaiseTooManyValuesError(2); jpayne@69: else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); jpayne@69: __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: if (likely(PyTuple_CheckExact(sequence))) { jpayne@69: __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); jpayne@69: } else { jpayne@69: __pyx_t_9 = PyList_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_10 = PyList_GET_ITEM(sequence, 1); jpayne@69: } jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_10); jpayne@69: #else jpayne@69: __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: #endif jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } else { jpayne@69: Py_ssize_t index = -1; jpayne@69: __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); jpayne@69: index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L13_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L13_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: __pyx_t_12 = NULL; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: goto __pyx_L14_unpacking_done; jpayne@69: __pyx_L13_unpacking_failed:; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_12 = NULL; jpayne@69: if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); jpayne@69: __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: __pyx_L14_unpacking_done:; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_v, __pyx_t_10); jpayne@69: __pyx_t_10 = 0; jpayne@69: if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_v))) __PYX_ERR(0, 451, __pyx_L10_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; jpayne@69: __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0; jpayne@69: goto __pyx_L16_exit_scope; jpayne@69: __pyx_L10_error:; jpayne@69: __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; jpayne@69: __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0; jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L16_exit_scope:; jpayne@69: } /* exit inner scope */ jpayne@69: __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_v_format = ((PyObject*)__pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":450 jpayne@69: * values.append( ('Type', fmt.type) ) jpayne@69: * values.append( ('Description', '"' + fmt.description + '"') ) jpayne@69: * if self._version == 33: # <<<<<<<<<<<<<< jpayne@69: * format = ",".join([v for k,v in values]) jpayne@69: * else: jpayne@69: */ jpayne@69: goto __pyx_L7; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":453 jpayne@69: * format = ",".join([v for k,v in values]) jpayne@69: * else: jpayne@69: * format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">" # <<<<<<<<<<<<<< jpayne@69: * return format jpayne@69: * jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: { /* enter inner scope */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_8 = 0; jpayne@69: for (;;) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: #endif jpayne@69: if (__pyx_t_8 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: #else jpayne@69: __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: #endif jpayne@69: if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { jpayne@69: PyObject* sequence = __pyx_t_6; jpayne@69: Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); jpayne@69: if (unlikely(size != 2)) { jpayne@69: if (size > 2) __Pyx_RaiseTooManyValuesError(2); jpayne@69: else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); jpayne@69: __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: if (likely(PyTuple_CheckExact(sequence))) { jpayne@69: __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); jpayne@69: } else { jpayne@69: __pyx_t_10 = PyList_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_9 = PyList_GET_ITEM(sequence, 1); jpayne@69: } jpayne@69: __Pyx_INCREF(__pyx_t_10); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: #else jpayne@69: __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: #endif jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } else { jpayne@69: Py_ssize_t index = -1; jpayne@69: __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); jpayne@69: index = 0; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L22_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L22_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __pyx_t_12 = NULL; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: goto __pyx_L23_unpacking_done; jpayne@69: __pyx_L22_unpacking_failed:; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_12 = NULL; jpayne@69: if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); jpayne@69: __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __pyx_L23_unpacking_done:; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_k, __pyx_t_10); jpayne@69: __pyx_t_10 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_v, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_13 = 0; jpayne@69: __pyx_t_14 = 127; jpayne@69: __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_8genexpr1__pyx_v_k), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_14; jpayne@69: __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__7); jpayne@69: __pyx_t_13 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__7); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u__7); jpayne@69: __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_8genexpr1__pyx_v_v), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_14; jpayne@69: __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 453, __pyx_L19_error) jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0; jpayne@69: goto __pyx_L25_exit_scope; jpayne@69: __pyx_L19_error:; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0; jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L25_exit_scope:; jpayne@69: } /* exit inner scope */ jpayne@69: __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u__15, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_kp_u__16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_v_format = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_L7:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":454 jpayne@69: * else: jpayne@69: * format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">" jpayne@69: * return format # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def get_expected(self, format, formatdict, alt): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_format); jpayne@69: __pyx_r = __pyx_v_format; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":436 jpayne@69: * return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing']) jpayne@69: * jpayne@69: * def format_format( self, fmt, filter=False ): # <<<<<<<<<<<<<< jpayne@69: * values = [('ID',fmt.id)] jpayne@69: * if fmt.number != None and not filter: jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_9); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.format_format", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_values); jpayne@69: __Pyx_XDECREF(__pyx_v_nmb); jpayne@69: __Pyx_XDECREF(__pyx_v_format); jpayne@69: __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); jpayne@69: __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":456 jpayne@69: * return format jpayne@69: * jpayne@69: * def get_expected(self, format, formatdict, alt): # <<<<<<<<<<<<<< jpayne@69: * fmt = formatdict[format] jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: return -1 jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_9get_expected(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_8get_expected, "VCF.get_expected(self, format, formatdict, alt)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_9get_expected = {"get_expected", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_9get_expected, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_8get_expected}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_9get_expected(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_format = 0; jpayne@69: PyObject *__pyx_v_formatdict = 0; jpayne@69: PyObject *__pyx_v_alt = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[4] = {0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("get_expected (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_format,&__pyx_n_s_formatdict,&__pyx_n_s_alt,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 1); __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_formatdict)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 2); __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alt)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 3); __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_expected") < 0)) __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 4)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_format = values[1]; jpayne@69: __pyx_v_formatdict = values[2]; jpayne@69: __pyx_v_alt = values[3]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 456, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.get_expected", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_8get_expected(__pyx_self, __pyx_v_self, __pyx_v_format, __pyx_v_formatdict, __pyx_v_alt); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_alt) { jpayne@69: PyObject *__pyx_v_fmt = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: int __pyx_t_4; jpayne@69: Py_ssize_t __pyx_t_5; jpayne@69: Py_ssize_t __pyx_t_6; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("get_expected", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":457 jpayne@69: * jpayne@69: * def get_expected(self, format, formatdict, alt): jpayne@69: * fmt = formatdict[format] # <<<<<<<<<<<<<< jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: return -1 jpayne@69: * if fmt.numbertype == self.NT_NUMBER: return fmt.number jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_formatdict, __pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_fmt = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":458 jpayne@69: * def get_expected(self, format, formatdict, alt): jpayne@69: * fmt = formatdict[format] jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: return -1 # <<<<<<<<<<<<<< jpayne@69: * if fmt.numbertype == self.NT_NUMBER: return fmt.number jpayne@69: * if fmt.numbertype == self.NT_ALLELES: return len(alt)+1 jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 458, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_4) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_int_neg_1); jpayne@69: __pyx_r = __pyx_int_neg_1; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":459 jpayne@69: * fmt = formatdict[format] jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: return -1 jpayne@69: * if fmt.numbertype == self.NT_NUMBER: return fmt.number # <<<<<<<<<<<<<< jpayne@69: * if fmt.numbertype == self.NT_ALLELES: return len(alt)+1 jpayne@69: * if fmt.numbertype == self.NT_NR_ALLELES: return len(alt) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 459, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_4) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":460 jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: return -1 jpayne@69: * if fmt.numbertype == self.NT_NUMBER: return fmt.number jpayne@69: * if fmt.numbertype == self.NT_ALLELES: return len(alt)+1 # <<<<<<<<<<<<<< jpayne@69: * if fmt.numbertype == self.NT_NR_ALLELES: return len(alt) jpayne@69: * if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2 jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 460, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_4) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 460, __pyx_L1_error) jpayne@69: __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_5 + 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_r = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":461 jpayne@69: * if fmt.numbertype == self.NT_NUMBER: return fmt.number jpayne@69: * if fmt.numbertype == self.NT_ALLELES: return len(alt)+1 jpayne@69: * if fmt.numbertype == self.NT_NR_ALLELES: return len(alt) # <<<<<<<<<<<<<< jpayne@69: * if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2 jpayne@69: * if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NR_ALLELES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 461, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_4) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 461, __pyx_L1_error) jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":462 jpayne@69: * if fmt.numbertype == self.NT_ALLELES: return len(alt)+1 jpayne@69: * if fmt.numbertype == self.NT_NR_ALLELES: return len(alt) jpayne@69: * if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2 # <<<<<<<<<<<<<< jpayne@69: * if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1) jpayne@69: * return 0 jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 462, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_4) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 462, __pyx_L1_error) jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 462, __pyx_L1_error) jpayne@69: __pyx_t_3 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(((__pyx_t_5 + 1) * (__pyx_t_6 + 2)), 2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_r = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":463 jpayne@69: * if fmt.numbertype == self.NT_NR_ALLELES: return len(alt) jpayne@69: * if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2 jpayne@69: * if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1) # <<<<<<<<<<<<<< jpayne@69: * return 0 jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_numbertype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 463, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_4) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 463, __pyx_L1_error) jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 463, __pyx_L1_error) jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(((__pyx_t_6 + 1) * (__pyx_t_5 + 1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":464 jpayne@69: * if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2 jpayne@69: * if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1) jpayne@69: * return 0 # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_r = __pyx_int_0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":456 jpayne@69: * return format jpayne@69: * jpayne@69: * def get_expected(self, format, formatdict, alt): # <<<<<<<<<<<<<< jpayne@69: * fmt = formatdict[format] jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: return -1 jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.get_expected", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_fmt); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":467 jpayne@69: * jpayne@69: * jpayne@69: * def _add_definition(self, formatdict, key, data, line ): # <<<<<<<<<<<<<< jpayne@69: * if key in formatdict: return jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_11_add_definition(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_10_add_definition, "VCF._add_definition(self, formatdict, key, data, line)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_11_add_definition = {"_add_definition", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_11_add_definition, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_10_add_definition}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_11_add_definition(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_formatdict = 0; jpayne@69: PyObject *__pyx_v_key = 0; jpayne@69: PyObject *__pyx_v_data = 0; jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[5] = {0,0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("_add_definition (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_formatdict,&__pyx_n_s_key,&__pyx_n_s_data,&__pyx_n_s_line,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_formatdict)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 1); __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 2); __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 3); __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 4); __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_add_definition") < 0)) __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 5)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_formatdict = values[1]; jpayne@69: __pyx_v_key = values[2]; jpayne@69: __pyx_v_data = values[3]; jpayne@69: __pyx_v_line = values[4]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 467, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF._add_definition", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_10_add_definition(__pyx_self, __pyx_v_self, __pyx_v_formatdict, __pyx_v_key, __pyx_v_data, __pyx_v_line); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_10_add_definition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_key, PyObject *__pyx_v_data, PyObject *__pyx_v_line) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_t_1; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: unsigned int __pyx_t_6; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("_add_definition", 0); jpayne@69: __Pyx_INCREF(__pyx_v_data); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":468 jpayne@69: * jpayne@69: * def _add_definition(self, formatdict, key, data, line ): jpayne@69: * if key in formatdict: return # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) jpayne@69: * if data == None: jpayne@69: */ jpayne@69: __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_formatdict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 468, __pyx_L1_error) jpayne@69: if (__pyx_t_1) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":469 jpayne@69: * def _add_definition(self, formatdict, key, data, line ): jpayne@69: * if key in formatdict: return jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) # <<<<<<<<<<<<<< jpayne@69: * if data == None: jpayne@69: * formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".") jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_UNKNOWN_KEY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_line, __pyx_t_4, __pyx_v_key}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":470 jpayne@69: * if key in formatdict: return jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) jpayne@69: * if data == None: # <<<<<<<<<<<<<< jpayne@69: * formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".") jpayne@69: * return jpayne@69: */ jpayne@69: __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error) jpayne@69: __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 470, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_1) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":471 jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) jpayne@69: * if data == None: jpayne@69: * formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".") # <<<<<<<<<<<<<< jpayne@69: * return jpayne@69: * if data == []: data = [""] # unsure what type -- say string jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_5, __pyx_v_key, __pyx_t_4, __pyx_int_0, __pyx_n_u_Flag, __pyx_kp_u_Undefined_tag, __pyx_kp_u__5}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_2) < 0))) __PYX_ERR(0, 471, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":472 jpayne@69: * if data == None: jpayne@69: * formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".") jpayne@69: * return # <<<<<<<<<<<<<< jpayne@69: * if data == []: data = [""] # unsure what type -- say string jpayne@69: * if type(data[0]) == type(0.0): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":470 jpayne@69: * if key in formatdict: return jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) jpayne@69: * if data == None: # <<<<<<<<<<<<<< jpayne@69: * formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".") jpayne@69: * return jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":473 jpayne@69: * formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".") jpayne@69: * return jpayne@69: * if data == []: data = [""] # unsure what type -- say string # <<<<<<<<<<<<<< jpayne@69: * if type(data[0]) == type(0.0): jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None) jpayne@69: */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyObject_RichCompare(__pyx_v_data, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 473, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_1) { jpayne@69: __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_kp_u_); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_)) __PYX_ERR(0, 473, __pyx_L1_error); jpayne@69: __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":474 jpayne@69: * return jpayne@69: * if data == []: data = [""] # unsure what type -- say string jpayne@69: * if type(data[0]) == type(0.0): # <<<<<<<<<<<<<< jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None) jpayne@69: * return jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_3)), ((PyObject *)Py_TYPE(__pyx_float_0_0)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 474, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_1) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":475 jpayne@69: * if data == []: data = [""] # unsure what type -- say string jpayne@69: * if type(data[0]) == type(0.0): jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None) # <<<<<<<<<<<<<< jpayne@69: * return jpayne@69: * if type(data[0]) == type(0): jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_5, __pyx_v_key, __pyx_t_4, __pyx_int_neg_1, __pyx_n_u_Float, __pyx_kp_u_Undefined_tag, Py_None}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_2) < 0))) __PYX_ERR(0, 475, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":476 jpayne@69: * if type(data[0]) == type(0.0): jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None) jpayne@69: * return # <<<<<<<<<<<<<< jpayne@69: * if type(data[0]) == type(0): jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None) jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":474 jpayne@69: * return jpayne@69: * if data == []: data = [""] # unsure what type -- say string jpayne@69: * if type(data[0]) == type(0.0): # <<<<<<<<<<<<<< jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None) jpayne@69: * return jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":477 jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None) jpayne@69: * return jpayne@69: * if type(data[0]) == type(0): # <<<<<<<<<<<<<< jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None) jpayne@69: * return jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_2)), ((PyObject *)Py_TYPE(__pyx_int_0)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 477, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_1) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":478 jpayne@69: * return jpayne@69: * if type(data[0]) == type(0): jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None) # <<<<<<<<<<<<<< jpayne@69: * return jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".") jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_5, __pyx_v_key, __pyx_t_4, __pyx_int_neg_1, __pyx_n_u_Integer, __pyx_kp_u_Undefined_tag, Py_None}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_3) < 0))) __PYX_ERR(0, 478, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":479 jpayne@69: * if type(data[0]) == type(0): jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None) jpayne@69: * return # <<<<<<<<<<<<<< jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".") jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":477 jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None) jpayne@69: * return jpayne@69: * if type(data[0]) == type(0): # <<<<<<<<<<<<<< jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None) jpayne@69: * return jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":480 jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None) jpayne@69: * return jpayne@69: * formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".") # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_5, __pyx_v_key, __pyx_t_4, __pyx_int_neg_1, __pyx_n_u_String, __pyx_kp_u_Undefined_tag, __pyx_kp_u__5}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 480, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_3) < 0))) __PYX_ERR(0, 480, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":467 jpayne@69: * jpayne@69: * jpayne@69: * def _add_definition(self, formatdict, key, data, line ): # <<<<<<<<<<<<<< jpayne@69: * if key in formatdict: return jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF._add_definition", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_data); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":484 jpayne@69: * jpayne@69: * # todo: trim trailing missing values jpayne@69: * def format_formatdata( self, data, format, key=True, value=True, separator=":" ): # <<<<<<<<<<<<<< jpayne@69: * output, sdata = [], [] jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_13format_formatdata(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_12format_formatdata, "VCF.format_formatdata(self, data, format, key=True, value=True, separator=u':')"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_13format_formatdata = {"format_formatdata", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_13format_formatdata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_12format_formatdata}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_13format_formatdata(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_data = 0; jpayne@69: PyObject *__pyx_v_format = 0; jpayne@69: PyObject *__pyx_v_key = 0; jpayne@69: PyObject *__pyx_v_value = 0; jpayne@69: PyObject *__pyx_v_separator = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[6] = {0,0,0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("format_formatdata (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,&__pyx_n_s_format,&__pyx_n_s_key,&__pyx_n_s_value,&__pyx_n_s_separator,0}; jpayne@69: values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True))); jpayne@69: values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True))); jpayne@69: values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_u__3))); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, 1); __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, 2); __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key); jpayne@69: if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value); jpayne@69: if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 5: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_separator); jpayne@69: if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "format_formatdata") < 0)) __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_data = values[1]; jpayne@69: __pyx_v_format = values[2]; jpayne@69: __pyx_v_key = values[3]; jpayne@69: __pyx_v_value = values[4]; jpayne@69: __pyx_v_separator = values[5]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, __pyx_nargs); __PYX_ERR(0, 484, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.format_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_12format_formatdata(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_format, __pyx_v_key, __pyx_v_value, __pyx_v_separator); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_12format_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_format, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_separator) { jpayne@69: PyObject *__pyx_v_output = NULL; jpayne@69: PyObject *__pyx_v_sdata = NULL; jpayne@69: PyObject *__pyx_v_d = NULL; jpayne@69: PyObject *__pyx_v_k = NULL; jpayne@69: PyObject *__pyx_v_idx = NULL; jpayne@69: PyObject *__pyx_v_v = NULL; jpayne@69: PyObject *__pyx_v_last = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: int __pyx_t_3; jpayne@69: Py_ssize_t __pyx_t_4; jpayne@69: PyObject *(*__pyx_t_5)(PyObject *); jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: unsigned int __pyx_t_9; jpayne@69: Py_ssize_t __pyx_t_10; jpayne@69: PyObject *(*__pyx_t_11)(PyObject *); jpayne@69: int __pyx_t_12; jpayne@69: PyObject *(*__pyx_t_13)(PyObject *); jpayne@69: int __pyx_t_14; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("format_formatdata", 0); jpayne@69: __Pyx_INCREF(__pyx_v_data); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":485 jpayne@69: * # todo: trim trailing missing values jpayne@69: * def format_formatdata( self, data, format, key=True, value=True, separator=":" ): jpayne@69: * output, sdata = [], [] # <<<<<<<<<<<<<< jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values jpayne@69: * d = {} jpayne@69: */ jpayne@69: __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_v_output = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_v_sdata = ((PyObject*)__pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":486 jpayne@69: * def format_formatdata( self, data, format, key=True, value=True, separator=":" ): jpayne@69: * output, sdata = [], [] jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values # <<<<<<<<<<<<<< jpayne@69: * d = {} jpayne@69: * for k in data: d[k] = [] jpayne@69: */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_data)), ((PyObject *)Py_TYPE(__pyx_t_2)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 486, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":487 jpayne@69: * output, sdata = [], [] jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values jpayne@69: * d = {} # <<<<<<<<<<<<<< jpayne@69: * for k in data: d[k] = [] jpayne@69: * data = d jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_d = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":488 jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values jpayne@69: * d = {} jpayne@69: * for k in data: d[k] = [] # <<<<<<<<<<<<<< jpayne@69: * data = d jpayne@69: * # convert missing values; and silently add definitions if required jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) { jpayne@69: __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_4 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_5)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_5(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_2)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_d, __pyx_v_k, __pyx_t_2) < 0))) __PYX_ERR(0, 488, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":489 jpayne@69: * d = {} jpayne@69: * for k in data: d[k] = [] jpayne@69: * data = d # <<<<<<<<<<<<<< jpayne@69: * # convert missing values; and silently add definitions if required jpayne@69: * for k in data: jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_v_d); jpayne@69: __Pyx_DECREF_SET(__pyx_v_data, __pyx_v_d); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":486 jpayne@69: * def format_formatdata( self, data, format, key=True, value=True, separator=":" ): jpayne@69: * output, sdata = [], [] jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values # <<<<<<<<<<<<<< jpayne@69: * d = {} jpayne@69: * for k in data: d[k] = [] jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":491 jpayne@69: * data = d jpayne@69: * # convert missing values; and silently add definitions if required jpayne@69: * for k in data: # <<<<<<<<<<<<<< jpayne@69: * self._add_definition( format, k, data[k], "(output)" ) jpayne@69: * for idx,v in enumerate(data[k]): jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) { jpayne@69: __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_4 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_5)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_5(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_2)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 491, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":492 jpayne@69: * # convert missing values; and silently add definitions if required jpayne@69: * for k in data: jpayne@69: * self._add_definition( format, k, data[k], "(output)" ) # <<<<<<<<<<<<<< jpayne@69: * for idx,v in enumerate(data[k]): jpayne@69: * if v == format[k].missingvalue: data[k][idx] = "." jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_definition); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 492, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_8 = NULL; jpayne@69: __pyx_t_9 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_8)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_9 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_format, __pyx_v_k, __pyx_t_7, __pyx_kp_u_output}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 4+__pyx_t_9); jpayne@69: __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":493 jpayne@69: * for k in data: jpayne@69: * self._add_definition( format, k, data[k], "(output)" ) jpayne@69: * for idx,v in enumerate(data[k]): # <<<<<<<<<<<<<< jpayne@69: * if v == format[k].missingvalue: data[k][idx] = "." jpayne@69: * # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_t_2 = __pyx_int_0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { jpayne@69: __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); jpayne@69: __pyx_t_10 = 0; jpayne@69: __pyx_t_11 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_11)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_7))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_10 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_10 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_11(__pyx_t_7); jpayne@69: if (unlikely(!__pyx_t_6)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_2); jpayne@69: __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_2); jpayne@69: __pyx_t_2 = __pyx_t_6; jpayne@69: __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":494 jpayne@69: * self._add_definition( format, k, data[k], "(output)" ) jpayne@69: * for idx,v in enumerate(data[k]): jpayne@69: * if v == format[k].missingvalue: data[k][idx] = "." # <<<<<<<<<<<<<< jpayne@69: * # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string jpayne@69: * for k in data: jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_format, __pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_missingvalue); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 494, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = PyObject_RichCompare(__pyx_v_v, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 494, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_t_6, __pyx_v_idx, __pyx_kp_u__5) < 0))) __PYX_ERR(0, 494, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":493 jpayne@69: * for k in data: jpayne@69: * self._add_definition( format, k, data[k], "(output)" ) jpayne@69: * for idx,v in enumerate(data[k]): # <<<<<<<<<<<<<< jpayne@69: * if v == format[k].missingvalue: data[k][idx] = "." jpayne@69: * # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":491 jpayne@69: * data = d jpayne@69: * # convert missing values; and silently add definitions if required jpayne@69: * for k in data: # <<<<<<<<<<<<<< jpayne@69: * self._add_definition( format, k, data[k], "(output)" ) jpayne@69: * for idx,v in enumerate(data[k]): jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":496 jpayne@69: * if v == format[k].missingvalue: data[k][idx] = "." jpayne@69: * # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string jpayne@69: * for k in data: # <<<<<<<<<<<<<< jpayne@69: * if k != 'GT': sdata.append( (k,data[k]) ) jpayne@69: * sdata.sort() jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) { jpayne@69: __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_4 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_5)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_5(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_2)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 496, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":497 jpayne@69: * # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string jpayne@69: * for k in data: jpayne@69: * if k != 'GT': sdata.append( (k,data[k]) ) # <<<<<<<<<<<<<< jpayne@69: * sdata.sort() jpayne@69: * if 'GT' in data: jpayne@69: */ jpayne@69: __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_k, __pyx_n_u_GT, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 497, __pyx_L1_error) jpayne@69: if (__pyx_t_3) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 497, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(__pyx_v_k); jpayne@69: __Pyx_GIVEREF(__pyx_v_k); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_k)) __PYX_ERR(0, 497, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_sdata, __pyx_t_7); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 497, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":496 jpayne@69: * if v == format[k].missingvalue: data[k][idx] = "." jpayne@69: * # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string jpayne@69: * for k in data: # <<<<<<<<<<<<<< jpayne@69: * if k != 'GT': sdata.append( (k,data[k]) ) jpayne@69: * sdata.sort() jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":498 jpayne@69: * for k in data: jpayne@69: * if k != 'GT': sdata.append( (k,data[k]) ) jpayne@69: * sdata.sort() # <<<<<<<<<<<<<< jpayne@69: * if 'GT' in data: jpayne@69: * sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata jpayne@69: */ jpayne@69: __pyx_t_12 = PyList_Sort(__pyx_v_sdata); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 498, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":499 jpayne@69: * if k != 'GT': sdata.append( (k,data[k]) ) jpayne@69: * sdata.sort() jpayne@69: * if 'GT' in data: # <<<<<<<<<<<<<< jpayne@69: * sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata jpayne@69: * for k,v in sdata: jpayne@69: */ jpayne@69: __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_GT, __pyx_v_data, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 499, __pyx_L1_error) jpayne@69: if (__pyx_t_3) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":500 jpayne@69: * sdata.sort() jpayne@69: * if 'GT' in data: jpayne@69: * sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata # <<<<<<<<<<<<<< jpayne@69: * for k,v in sdata: jpayne@69: * if v == []: v = None jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_convertGTback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_GT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_n_u_GT); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_GT); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_GT)) __PYX_ERR(0, 500, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error); jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_v_sdata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_sdata, ((PyObject*)__pyx_t_2)); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":499 jpayne@69: * if k != 'GT': sdata.append( (k,data[k]) ) jpayne@69: * sdata.sort() jpayne@69: * if 'GT' in data: # <<<<<<<<<<<<<< jpayne@69: * sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata jpayne@69: * for k,v in sdata: jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":501 jpayne@69: * if 'GT' in data: jpayne@69: * sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata jpayne@69: * for k,v in sdata: # <<<<<<<<<<<<<< jpayne@69: * if v == []: v = None jpayne@69: * if key and value: jpayne@69: */ jpayne@69: __pyx_t_2 = __pyx_v_sdata; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_4 = 0; jpayne@69: for (;;) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: #endif jpayne@69: if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { jpayne@69: PyObject* sequence = __pyx_t_7; jpayne@69: Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); jpayne@69: if (unlikely(size != 2)) { jpayne@69: if (size > 2) __Pyx_RaiseTooManyValuesError(2); jpayne@69: else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); jpayne@69: __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: if (likely(PyTuple_CheckExact(sequence))) { jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); jpayne@69: } else { jpayne@69: __pyx_t_1 = PyList_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_6 = PyList_GET_ITEM(sequence, 1); jpayne@69: } jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: #else jpayne@69: __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: #endif jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: } else { jpayne@69: Py_ssize_t index = -1; jpayne@69: __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); jpayne@69: index = 0; __pyx_t_1 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L21_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: index = 1; __pyx_t_6 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L21_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_8), 2) < 0) __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: __pyx_t_13 = NULL; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: goto __pyx_L22_unpacking_done; jpayne@69: __pyx_L21_unpacking_failed:; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_13 = NULL; jpayne@69: if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); jpayne@69: __PYX_ERR(0, 501, __pyx_L1_error) jpayne@69: __pyx_L22_unpacking_done:; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":502 jpayne@69: * sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata jpayne@69: * for k,v in sdata: jpayne@69: * if v == []: v = None # <<<<<<<<<<<<<< jpayne@69: * if key and value: jpayne@69: * if v != None: output.append( k+"="+','.join(map(str,v)) ) jpayne@69: */ jpayne@69: __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 502, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_6 = PyObject_RichCompare(__pyx_v_v, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 502, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 502, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_INCREF(Py_None); jpayne@69: __Pyx_DECREF_SET(__pyx_v_v, Py_None); jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":503 jpayne@69: * for k,v in sdata: jpayne@69: * if v == []: v = None jpayne@69: * if key and value: # <<<<<<<<<<<<<< jpayne@69: * if v != None: output.append( k+"="+','.join(map(str,v)) ) jpayne@69: * else: output.append( k ) jpayne@69: */ jpayne@69: __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 503, __pyx_L1_error) jpayne@69: if (__pyx_t_14) { jpayne@69: } else { jpayne@69: __pyx_t_3 = __pyx_t_14; jpayne@69: goto __pyx_L25_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 503, __pyx_L1_error) jpayne@69: __pyx_t_3 = __pyx_t_14; jpayne@69: __pyx_L25_bool_binop_done:; jpayne@69: if (__pyx_t_3) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":504 jpayne@69: * if v == []: v = None jpayne@69: * if key and value: jpayne@69: * if v != None: output.append( k+"="+','.join(map(str,v)) ) # <<<<<<<<<<<<<< jpayne@69: * else: output.append( k ) jpayne@69: * elif key: output.append(k) jpayne@69: */ jpayne@69: __pyx_t_6 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error) jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 504, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __pyx_t_6 = PyNumber_Add(__pyx_v_k, __pyx_kp_u__7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 504, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); jpayne@69: __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 504, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_v); jpayne@69: __Pyx_GIVEREF(__pyx_v_v); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_v)) __PYX_ERR(0, 504, __pyx_L1_error); jpayne@69: __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 504, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_output, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 504, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: goto __pyx_L27; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":505 jpayne@69: * if key and value: jpayne@69: * if v != None: output.append( k+"="+','.join(map(str,v)) ) jpayne@69: * else: output.append( k ) # <<<<<<<<<<<<<< jpayne@69: * elif key: output.append(k) jpayne@69: * elif value: jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 505, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_L27:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":503 jpayne@69: * for k,v in sdata: jpayne@69: * if v == []: v = None jpayne@69: * if key and value: # <<<<<<<<<<<<<< jpayne@69: * if v != None: output.append( k+"="+','.join(map(str,v)) ) jpayne@69: * else: output.append( k ) jpayne@69: */ jpayne@69: goto __pyx_L24; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":506 jpayne@69: * if v != None: output.append( k+"="+','.join(map(str,v)) ) jpayne@69: * else: output.append( k ) jpayne@69: * elif key: output.append(k) # <<<<<<<<<<<<<< jpayne@69: * elif value: jpayne@69: * if v != None: output.append( ','.join(map(str,v)) ) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 506, __pyx_L1_error) jpayne@69: if (__pyx_t_3) { jpayne@69: __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 506, __pyx_L1_error) jpayne@69: goto __pyx_L24; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":507 jpayne@69: * else: output.append( k ) jpayne@69: * elif key: output.append(k) jpayne@69: * elif value: # <<<<<<<<<<<<<< jpayne@69: * if v != None: output.append( ','.join(map(str,v)) ) jpayne@69: * else: output.append( "." ) # should not happen jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 507, __pyx_L1_error) jpayne@69: if (__pyx_t_3) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":508 jpayne@69: * elif key: output.append(k) jpayne@69: * elif value: jpayne@69: * if v != None: output.append( ','.join(map(str,v)) ) # <<<<<<<<<<<<<< jpayne@69: * else: output.append( "." ) # should not happen jpayne@69: * # snip off trailing missing data jpayne@69: */ jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) jpayne@69: __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 508, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_3) { jpayne@69: __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); jpayne@69: __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 508, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_v); jpayne@69: __Pyx_GIVEREF(__pyx_v_v); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_v)) __PYX_ERR(0, 508, __pyx_L1_error); jpayne@69: __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 508, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_output, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 508, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: goto __pyx_L28; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":509 jpayne@69: * elif value: jpayne@69: * if v != None: output.append( ','.join(map(str,v)) ) jpayne@69: * else: output.append( "." ) # should not happen # <<<<<<<<<<<<<< jpayne@69: * # snip off trailing missing data jpayne@69: * while len(output) > 1: jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_output, __pyx_kp_u__5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 509, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_L28:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":507 jpayne@69: * else: output.append( k ) jpayne@69: * elif key: output.append(k) jpayne@69: * elif value: # <<<<<<<<<<<<<< jpayne@69: * if v != None: output.append( ','.join(map(str,v)) ) jpayne@69: * else: output.append( "." ) # should not happen jpayne@69: */ jpayne@69: } jpayne@69: __pyx_L24:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":501 jpayne@69: * if 'GT' in data: jpayne@69: * sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata jpayne@69: * for k,v in sdata: # <<<<<<<<<<<<<< jpayne@69: * if v == []: v = None jpayne@69: * if key and value: jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":511 jpayne@69: * else: output.append( "." ) # should not happen jpayne@69: * # snip off trailing missing data jpayne@69: * while len(output) > 1: # <<<<<<<<<<<<<< jpayne@69: * last = output[-1].replace(',','').replace('.','') jpayne@69: * if len(last)>0: break jpayne@69: */ jpayne@69: while (1) { jpayne@69: __pyx_t_4 = __Pyx_PyList_GET_SIZE(__pyx_v_output); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 511, __pyx_L1_error) jpayne@69: __pyx_t_3 = (__pyx_t_4 > 1); jpayne@69: if (!__pyx_t_3) break; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":512 jpayne@69: * # snip off trailing missing data jpayne@69: * while len(output) > 1: jpayne@69: * last = output[-1].replace(',','').replace('.','') # <<<<<<<<<<<<<< jpayne@69: * if len(last)>0: break jpayne@69: * output = output[:-1] jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_output, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_last, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":513 jpayne@69: * while len(output) > 1: jpayne@69: * last = output[-1].replace(',','').replace('.','') jpayne@69: * if len(last)>0: break # <<<<<<<<<<<<<< jpayne@69: * output = output[:-1] jpayne@69: * return separator.join(output) jpayne@69: */ jpayne@69: __pyx_t_4 = PyObject_Length(__pyx_v_last); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 513, __pyx_L1_error) jpayne@69: __pyx_t_3 = (__pyx_t_4 > 0); jpayne@69: if (__pyx_t_3) { jpayne@69: goto __pyx_L31_break; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":514 jpayne@69: * last = output[-1].replace(',','').replace('.','') jpayne@69: * if len(last)>0: break jpayne@69: * output = output[:-1] # <<<<<<<<<<<<<< jpayne@69: * return separator.join(output) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_output, 0, -1L); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF_SET(__pyx_v_output, ((PyObject*)__pyx_t_2)); jpayne@69: __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_L31_break:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":515 jpayne@69: * if len(last)>0: break jpayne@69: * output = output[:-1] jpayne@69: * return separator.join(output) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_separator, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_9 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_9 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_output}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_r = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":484 jpayne@69: * jpayne@69: * # todo: trim trailing missing values jpayne@69: * def format_formatdata( self, data, format, key=True, value=True, separator=":" ): # <<<<<<<<<<<<<< jpayne@69: * output, sdata = [], [] jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.format_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_output); jpayne@69: __Pyx_XDECREF(__pyx_v_sdata); jpayne@69: __Pyx_XDECREF(__pyx_v_d); jpayne@69: __Pyx_XDECREF(__pyx_v_k); jpayne@69: __Pyx_XDECREF(__pyx_v_idx); jpayne@69: __Pyx_XDECREF(__pyx_v_v); jpayne@69: __Pyx_XDECREF(__pyx_v_last); jpayne@69: __Pyx_XDECREF(__pyx_v_data); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":518 jpayne@69: * jpayne@69: * jpayne@69: * def enter_default_format(self): # <<<<<<<<<<<<<< jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_15enter_default_format(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_14enter_default_format, "VCF.enter_default_format(self)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_15enter_default_format = {"enter_default_format", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_15enter_default_format, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_14enter_default_format}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_15enter_default_format(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("enter_default_format (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "enter_default_format") < 0)) __PYX_ERR(0, 518, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("enter_default_format", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 518, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.enter_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_14enter_default_format(__pyx_self, __pyx_v_self); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_14enter_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { jpayne@69: PyObject *__pyx_v_f = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: unsigned int __pyx_t_5; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: PyObject *__pyx_t_9 = NULL; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: PyObject *__pyx_t_13 = NULL; jpayne@69: PyObject *__pyx_t_14 = NULL; jpayne@69: PyObject *__pyx_t_15 = NULL; jpayne@69: PyObject *__pyx_t_16 = NULL; jpayne@69: PyObject *__pyx_t_17 = NULL; jpayne@69: PyObject *__pyx_t_18 = NULL; jpayne@69: Py_ssize_t __pyx_t_19; jpayne@69: int __pyx_t_20; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("enter_default_format", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":519 jpayne@69: * jpayne@69: * def enter_default_format(self): jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: * FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_n_u_GT, __pyx_t_3, __pyx_int_1, __pyx_n_u_String, __pyx_n_u_Genotype, __pyx_kp_u__5}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":520 jpayne@69: * def enter_default_format(self): jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'), jpayne@69: * FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_6 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_6)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_6, __pyx_n_u_DP, __pyx_t_4, __pyx_int_1, __pyx_n_u_Integer, __pyx_kp_u_Read_depth_at_this_position_for, __pyx_int_neg_1}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":521 jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: * FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), jpayne@69: * FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 521, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_7, __pyx_n_u_FT, __pyx_t_6, __pyx_int_1, __pyx_n_u_String, __pyx_kp_u_Sample_Genotype_Filter, __pyx_kp_u__5}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":522 jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: * FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'), jpayne@69: * FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), jpayne@69: * FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 522, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 522, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_8 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_8)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_8, __pyx_n_u_GL, __pyx_t_7, __pyx_int_neg_1, __pyx_n_u_Float, __pyx_kp_u_Genotype_likelihoods, __pyx_kp_u__5}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":523 jpayne@69: * FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'), jpayne@69: * FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), jpayne@69: * FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1), jpayne@69: * FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 523, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 523, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_7))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_7, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_9, __pyx_n_u_GLE, __pyx_t_8, __pyx_int_neg_1, __pyx_n_u_Float, __pyx_kp_u_Genotype_likelihoods, __pyx_kp_u__5}; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":524 jpayne@69: * FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), jpayne@69: * FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), jpayne@69: * FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'), jpayne@69: * FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 524, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 524, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_10 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_8))) { jpayne@69: __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); jpayne@69: if (likely(__pyx_t_10)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); jpayne@69: __Pyx_INCREF(__pyx_t_10); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_8, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_10, __pyx_n_u_GQ, __pyx_t_9, __pyx_int_1, __pyx_n_u_Integer, __pyx_kp_u_Genotype_Quality, __pyx_int_neg_1}; jpayne@69: __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 524, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":525 jpayne@69: * FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'), jpayne@69: * FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1), jpayne@69: * FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'), jpayne@69: * FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 525, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 525, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_11 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_9))) { jpayne@69: __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); jpayne@69: if (likely(__pyx_t_11)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_9, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_11, __pyx_n_u_PL, __pyx_t_10, __pyx_int_neg_1, __pyx_n_u_Integer, __pyx_kp_u_Phred_scaled_genotype_likelihood, __pyx_kp_u__5}; jpayne@69: __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 525, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":526 jpayne@69: * FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1), jpayne@69: * FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'), jpayne@69: * FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'), jpayne@69: * FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1), # unknown number, since may be haploid jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 526, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 526, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_10))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_10, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_12, __pyx_n_u_GP, __pyx_t_11, __pyx_int_neg_1, __pyx_n_u_Float, __pyx_kp_u_Genotype_posterior_probabilities, __pyx_kp_u__5}; jpayne@69: __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 526, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":527 jpayne@69: * FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'), jpayne@69: * FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'), jpayne@69: * FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1), # unknown number, since may be haploid jpayne@69: * FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 527, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_GENOTYPES); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 527, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_13 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_13)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_13); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_13, __pyx_n_u_GQ, __pyx_t_12, __pyx_int_neg_1, __pyx_n_u_Integer, __pyx_kp_u_Conditional_genotype_quality, __pyx_kp_u__5}; jpayne@69: __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 527, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":528 jpayne@69: * FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'), jpayne@69: * FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'), jpayne@69: * FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1), # unknown number, since may be haploid # <<<<<<<<<<<<<< jpayne@69: * FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'), jpayne@69: * FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 528, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 528, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_13); jpayne@69: __pyx_t_14 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_12))) { jpayne@69: __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12); jpayne@69: if (likely(__pyx_t_14)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); jpayne@69: __Pyx_INCREF(__pyx_t_14); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_12, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_14, __pyx_n_u_HQ, __pyx_t_13, __pyx_int_neg_1, __pyx_n_u_Integer, __pyx_kp_u_Haplotype_Quality, __pyx_int_neg_1}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 528, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":529 jpayne@69: * FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'), jpayne@69: * FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1), # unknown number, since may be haploid jpayne@69: * FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1), jpayne@69: * FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 529, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_13); jpayne@69: __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_UNKNOWN); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 529, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_14); jpayne@69: __pyx_t_15 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_13))) { jpayne@69: __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_13); jpayne@69: if (likely(__pyx_t_15)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); jpayne@69: __Pyx_INCREF(__pyx_t_15); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_13, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_15, __pyx_n_u_PS, __pyx_t_14, __pyx_int_neg_1, __pyx_n_u_Integer, __pyx_kp_u_Phase_set, __pyx_kp_u__5}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 529, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":530 jpayne@69: * FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1), # unknown number, since may be haploid jpayne@69: * FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'), jpayne@69: * FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1), jpayne@69: * FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1), jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 530, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_14); jpayne@69: __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 530, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __pyx_t_16 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_14))) { jpayne@69: __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_14); jpayne@69: if (likely(__pyx_t_16)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); jpayne@69: __Pyx_INCREF(__pyx_t_16); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_14, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_16, __pyx_n_u_PQ, __pyx_t_15, __pyx_int_1, __pyx_n_u_Integer, __pyx_kp_u_Phasing_quality, __pyx_int_neg_1}; jpayne@69: __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 530, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_13); jpayne@69: __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":531 jpayne@69: * FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'), jpayne@69: * FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1), jpayne@69: * FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1), jpayne@69: * ]: jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 531, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_ALLELES); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 531, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_17 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_15))) { jpayne@69: __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15); jpayne@69: if (likely(__pyx_t_17)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); jpayne@69: __Pyx_INCREF(__pyx_t_17); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_15, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_17, __pyx_n_u_EC, __pyx_t_16, __pyx_int_1, __pyx_n_u_Integer, __pyx_kp_u_Expected_alternate_allel_counts, __pyx_int_neg_1}; jpayne@69: __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 531, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_14); jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":532 jpayne@69: * FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1), jpayne@69: * FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1), jpayne@69: * FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1), # <<<<<<<<<<<<<< jpayne@69: * ]: jpayne@69: * if f.id not in self._format: jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_FORMAT); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 532, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_NT_NUMBER); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 532, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_17); jpayne@69: __pyx_t_18 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_16))) { jpayne@69: __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_16); jpayne@69: if (likely(__pyx_t_18)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16); jpayne@69: __Pyx_INCREF(__pyx_t_18); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_16, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[7] = {__pyx_t_18, __pyx_n_u_MQ, __pyx_t_17, __pyx_int_1, __pyx_n_u_Integer, __pyx_kp_u_RMS_mapping_quality, __pyx_int_neg_1}; jpayne@69: __pyx_t_15 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; jpayne@69: if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 532, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":519 jpayne@69: * jpayne@69: * def enter_default_format(self): jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: * FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'), jpayne@69: */ jpayne@69: __pyx_t_16 = PyTuple_New(14); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 519, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_4); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_6); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_6)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_7)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_8); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_8)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_9)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_10); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_t_10)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_11); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 9, __pyx_t_11)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_12); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 10, __pyx_t_12)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_13); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 11, __pyx_t_13)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_14); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 12, __pyx_t_14)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_15); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 13, __pyx_t_15)) __PYX_ERR(0, 519, __pyx_L1_error); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_3 = 0; jpayne@69: __pyx_t_4 = 0; jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_t_8 = 0; jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_10 = 0; jpayne@69: __pyx_t_11 = 0; jpayne@69: __pyx_t_12 = 0; jpayne@69: __pyx_t_13 = 0; jpayne@69: __pyx_t_14 = 0; jpayne@69: __pyx_t_15 = 0; jpayne@69: __pyx_t_15 = __pyx_t_16; __Pyx_INCREF(__pyx_t_15); jpayne@69: __pyx_t_19 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: for (;;) { jpayne@69: if (__pyx_t_19 >= 14) break; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_19); __Pyx_INCREF(__pyx_t_16); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 519, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_15, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 519, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: #endif jpayne@69: __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_16); jpayne@69: __pyx_t_16 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":534 jpayne@69: * FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1), jpayne@69: * ]: jpayne@69: * if f.id not in self._format: # <<<<<<<<<<<<<< jpayne@69: * self._format[f.id] = f jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 534, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 534, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_14); jpayne@69: __pyx_t_20 = (__Pyx_PySequence_ContainsTF(__pyx_t_16, __pyx_t_14, Py_NE)); if (unlikely((__pyx_t_20 < 0))) __PYX_ERR(0, 534, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: if (__pyx_t_20) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":535 jpayne@69: * ]: jpayne@69: * if f.id not in self._format: jpayne@69: * self._format[f.id] = f # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def parse_header(self, line): jpayne@69: */ jpayne@69: __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 535, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_14); jpayne@69: __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 535, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_t_14, __pyx_t_16, __pyx_v_f) < 0))) __PYX_ERR(0, 535, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":534 jpayne@69: * FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1), jpayne@69: * ]: jpayne@69: * if f.id not in self._format: # <<<<<<<<<<<<<< jpayne@69: * self._format[f.id] = f jpayne@69: * jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":519 jpayne@69: * jpayne@69: * def enter_default_format(self): jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), # <<<<<<<<<<<<<< jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: * FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'), jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":518 jpayne@69: * jpayne@69: * jpayne@69: * def enter_default_format(self): # <<<<<<<<<<<<<< jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_9); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_XDECREF(__pyx_t_12); jpayne@69: __Pyx_XDECREF(__pyx_t_13); jpayne@69: __Pyx_XDECREF(__pyx_t_14); jpayne@69: __Pyx_XDECREF(__pyx_t_15); jpayne@69: __Pyx_XDECREF(__pyx_t_16); jpayne@69: __Pyx_XDECREF(__pyx_t_17); jpayne@69: __Pyx_XDECREF(__pyx_t_18); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.enter_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_f); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":537 jpayne@69: * self._format[f.id] = f jpayne@69: * jpayne@69: * def parse_header(self, line): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * assert line.startswith('##') jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_17parse_header(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_16parse_header, "VCF.parse_header(self, line)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_17parse_header = {"parse_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_17parse_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_16parse_header}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_17parse_header(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("parse_header (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_header", 1, 2, 2, 1); __PYX_ERR(0, 537, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_header") < 0)) __PYX_ERR(0, 537, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_line = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_header", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 537, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_16parse_header(__pyx_self, __pyx_v_self, __pyx_v_line); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_16parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line) { jpayne@69: PyObject *__pyx_v_elts = NULL; jpayne@69: PyObject *__pyx_v_key = NULL; jpayne@69: PyObject *__pyx_v_value = NULL; jpayne@69: PyObject *__pyx_v_f = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_t_5; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: int __pyx_t_7; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("parse_header", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":539 jpayne@69: * def parse_header(self, line): jpayne@69: * jpayne@69: * assert line.startswith('##') # <<<<<<<<<<<<<< jpayne@69: * elts = line[2:].split('=') jpayne@69: * key = elts[0].strip() jpayne@69: */ jpayne@69: #ifndef CYTHON_WITHOUT_ASSERTIONS jpayne@69: if (unlikely(__pyx_assertions_enabled())) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__23}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 539, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_5)) { jpayne@69: __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); jpayne@69: __PYX_ERR(0, 539, __pyx_L1_error) jpayne@69: } jpayne@69: } jpayne@69: #else jpayne@69: if ((1)); else __PYX_ERR(0, 539, __pyx_L1_error) jpayne@69: #endif jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":540 jpayne@69: * jpayne@69: * assert line.startswith('##') jpayne@69: * elts = line[2:].split('=') # <<<<<<<<<<<<<< jpayne@69: * key = elts[0].strip() jpayne@69: * value = '='.join(elts[1:]).strip() jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_line, 2, 0, NULL, NULL, &__pyx_slice__20, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_2)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u__7}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_v_elts = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":541 jpayne@69: * assert line.startswith('##') jpayne@69: * elts = line[2:].split('=') jpayne@69: * key = elts[0].strip() # <<<<<<<<<<<<<< jpayne@69: * value = '='.join(elts[1:]).strip() jpayne@69: * if key == "fileformat": jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_key = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":542 jpayne@69: * elts = line[2:].split('=') jpayne@69: * key = elts[0].strip() jpayne@69: * value = '='.join(elts[1:]).strip() # <<<<<<<<<<<<<< jpayne@69: * if key == "fileformat": jpayne@69: * if value == "VCFv3.3": jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_elts, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_value = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":543 jpayne@69: * key = elts[0].strip() jpayne@69: * value = '='.join(elts[1:]).strip() jpayne@69: * if key == "fileformat": # <<<<<<<<<<<<<< jpayne@69: * if value == "VCFv3.3": jpayne@69: * self._version = 33 jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_fileformat, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 543, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":544 jpayne@69: * value = '='.join(elts[1:]).strip() jpayne@69: * if key == "fileformat": jpayne@69: * if value == "VCFv3.3": # <<<<<<<<<<<<<< jpayne@69: * self._version = 33 jpayne@69: * elif value == "VCFv4.0": jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_kp_u_VCFv3_3, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 544, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":545 jpayne@69: * if key == "fileformat": jpayne@69: * if value == "VCFv3.3": jpayne@69: * self._version = 33 # <<<<<<<<<<<<<< jpayne@69: * elif value == "VCFv4.0": jpayne@69: * self._version = 40 jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_int_33) < 0) __PYX_ERR(0, 545, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":544 jpayne@69: * value = '='.join(elts[1:]).strip() jpayne@69: * if key == "fileformat": jpayne@69: * if value == "VCFv3.3": # <<<<<<<<<<<<<< jpayne@69: * self._version = 33 jpayne@69: * elif value == "VCFv4.0": jpayne@69: */ jpayne@69: goto __pyx_L4; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":546 jpayne@69: * if value == "VCFv3.3": jpayne@69: * self._version = 33 jpayne@69: * elif value == "VCFv4.0": # <<<<<<<<<<<<<< jpayne@69: * self._version = 40 jpayne@69: * elif value == "VCFv4.1": jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_kp_u_VCFv4_0, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 546, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":547 jpayne@69: * self._version = 33 jpayne@69: * elif value == "VCFv4.0": jpayne@69: * self._version = 40 # <<<<<<<<<<<<<< jpayne@69: * elif value == "VCFv4.1": jpayne@69: * # AH - for testing jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_int_40) < 0) __PYX_ERR(0, 547, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":546 jpayne@69: * if value == "VCFv3.3": jpayne@69: * self._version = 33 jpayne@69: * elif value == "VCFv4.0": # <<<<<<<<<<<<<< jpayne@69: * self._version = 40 jpayne@69: * elif value == "VCFv4.1": jpayne@69: */ jpayne@69: goto __pyx_L4; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":548 jpayne@69: * elif value == "VCFv4.0": jpayne@69: * self._version = 40 jpayne@69: * elif value == "VCFv4.1": # <<<<<<<<<<<<<< jpayne@69: * # AH - for testing jpayne@69: * self._version = 40 jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_kp_u_VCFv4_1, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 548, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":550 jpayne@69: * elif value == "VCFv4.1": jpayne@69: * # AH - for testing jpayne@69: * self._version = 40 # <<<<<<<<<<<<<< jpayne@69: * elif value == "VCFv4.2": jpayne@69: * # AH - for testing jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_int_40) < 0) __PYX_ERR(0, 550, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":548 jpayne@69: * elif value == "VCFv4.0": jpayne@69: * self._version = 40 jpayne@69: * elif value == "VCFv4.1": # <<<<<<<<<<<<<< jpayne@69: * # AH - for testing jpayne@69: * self._version = 40 jpayne@69: */ jpayne@69: goto __pyx_L4; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":551 jpayne@69: * # AH - for testing jpayne@69: * self._version = 40 jpayne@69: * elif value == "VCFv4.2": # <<<<<<<<<<<<<< jpayne@69: * # AH - for testing jpayne@69: * self._version = 40 jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_kp_u_VCFv4_2, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 551, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":553 jpayne@69: * elif value == "VCFv4.2": jpayne@69: * # AH - for testing jpayne@69: * self._version = 40 # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * self.error(line,self.UNKNOWN_FORMAT_STRING) jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_int_40) < 0) __PYX_ERR(0, 553, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":551 jpayne@69: * # AH - for testing jpayne@69: * self._version = 40 jpayne@69: * elif value == "VCFv4.2": # <<<<<<<<<<<<<< jpayne@69: * # AH - for testing jpayne@69: * self._version = 40 jpayne@69: */ jpayne@69: goto __pyx_L4; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":555 jpayne@69: * self._version = 40 jpayne@69: * else: jpayne@69: * self.error(line,self.UNKNOWN_FORMAT_STRING) # <<<<<<<<<<<<<< jpayne@69: * elif key == "INFO": jpayne@69: * f = self.parse_format(line, value) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_UNKNOWN_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_6 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_6)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_line, __pyx_t_3}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_L4:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":543 jpayne@69: * key = elts[0].strip() jpayne@69: * value = '='.join(elts[1:]).strip() jpayne@69: * if key == "fileformat": # <<<<<<<<<<<<<< jpayne@69: * if value == "VCFv3.3": jpayne@69: * self._version = 33 jpayne@69: */ jpayne@69: goto __pyx_L3; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":556 jpayne@69: * else: jpayne@69: * self.error(line,self.UNKNOWN_FORMAT_STRING) jpayne@69: * elif key == "INFO": # <<<<<<<<<<<<<< jpayne@69: * f = self.parse_format(line, value) jpayne@69: * self._info[ f.id ] = f jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_INFO, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 556, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":557 jpayne@69: * self.error(line,self.UNKNOWN_FORMAT_STRING) jpayne@69: * elif key == "INFO": jpayne@69: * f = self.parse_format(line, value) # <<<<<<<<<<<<<< jpayne@69: * self._info[ f.id ] = f jpayne@69: * elif key == "FILTER": jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_line, __pyx_v_value}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_f = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":558 jpayne@69: * elif key == "INFO": jpayne@69: * f = self.parse_format(line, value) jpayne@69: * self._info[ f.id ] = f # <<<<<<<<<<<<<< jpayne@69: * elif key == "FILTER": jpayne@69: * f = self.parse_format(line, value, filter=True) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_f) < 0))) __PYX_ERR(0, 558, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":556 jpayne@69: * else: jpayne@69: * self.error(line,self.UNKNOWN_FORMAT_STRING) jpayne@69: * elif key == "INFO": # <<<<<<<<<<<<<< jpayne@69: * f = self.parse_format(line, value) jpayne@69: * self._info[ f.id ] = f jpayne@69: */ jpayne@69: goto __pyx_L3; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":559 jpayne@69: * f = self.parse_format(line, value) jpayne@69: * self._info[ f.id ] = f jpayne@69: * elif key == "FILTER": # <<<<<<<<<<<<<< jpayne@69: * f = self.parse_format(line, value, filter=True) jpayne@69: * self._filter[ f.id ] = f jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_FILTER, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 559, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":560 jpayne@69: * self._info[ f.id ] = f jpayne@69: * elif key == "FILTER": jpayne@69: * f = self.parse_format(line, value, filter=True) # <<<<<<<<<<<<<< jpayne@69: * self._filter[ f.id ] = f jpayne@69: * elif key == "FORMAT": jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_v_line); jpayne@69: __Pyx_GIVEREF(__pyx_v_line); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line)) __PYX_ERR(0, 560, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_value); jpayne@69: __Pyx_GIVEREF(__pyx_v_value); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value)) __PYX_ERR(0, 560, __pyx_L1_error); jpayne@69: __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_filter_2, Py_True) < 0) __PYX_ERR(0, 560, __pyx_L1_error) jpayne@69: __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_v_f = __pyx_t_6; jpayne@69: __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":561 jpayne@69: * elif key == "FILTER": jpayne@69: * f = self.parse_format(line, value, filter=True) jpayne@69: * self._filter[ f.id ] = f # <<<<<<<<<<<<<< jpayne@69: * elif key == "FORMAT": jpayne@69: * f = self.parse_format(line, value) jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_t_6, __pyx_t_3, __pyx_v_f) < 0))) __PYX_ERR(0, 561, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":559 jpayne@69: * f = self.parse_format(line, value) jpayne@69: * self._info[ f.id ] = f jpayne@69: * elif key == "FILTER": # <<<<<<<<<<<<<< jpayne@69: * f = self.parse_format(line, value, filter=True) jpayne@69: * self._filter[ f.id ] = f jpayne@69: */ jpayne@69: goto __pyx_L3; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":562 jpayne@69: * f = self.parse_format(line, value, filter=True) jpayne@69: * self._filter[ f.id ] = f jpayne@69: * elif key == "FORMAT": # <<<<<<<<<<<<<< jpayne@69: * f = self.parse_format(line, value) jpayne@69: * self._format[ f.id ] = f jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_FORMAT, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 562, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":563 jpayne@69: * self._filter[ f.id ] = f jpayne@69: * elif key == "FORMAT": jpayne@69: * f = self.parse_format(line, value) # <<<<<<<<<<<<<< jpayne@69: * self._format[ f.id ] = f jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_line, __pyx_v_value}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __pyx_v_f = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":564 jpayne@69: * elif key == "FORMAT": jpayne@69: * f = self.parse_format(line, value) jpayne@69: * self._format[ f.id ] = f # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * # keep other keys in the header field jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_t_6, __pyx_v_f) < 0))) __PYX_ERR(0, 564, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":562 jpayne@69: * f = self.parse_format(line, value, filter=True) jpayne@69: * self._filter[ f.id ] = f jpayne@69: * elif key == "FORMAT": # <<<<<<<<<<<<<< jpayne@69: * f = self.parse_format(line, value) jpayne@69: * self._format[ f.id ] = f jpayne@69: */ jpayne@69: goto __pyx_L3; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":567 jpayne@69: * else: jpayne@69: * # keep other keys in the header field jpayne@69: * self._header.append( (key,value) ) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 567, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_v_key); jpayne@69: __Pyx_GIVEREF(__pyx_v_key); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key)) __PYX_ERR(0, 567, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_value); jpayne@69: __Pyx_GIVEREF(__pyx_v_value); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value)) __PYX_ERR(0, 567, __pyx_L1_error); jpayne@69: __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 567, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_L3:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":537 jpayne@69: * self._format[f.id] = f jpayne@69: * jpayne@69: * def parse_header(self, line): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * assert line.startswith('##') jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_elts); jpayne@69: __Pyx_XDECREF(__pyx_v_key); jpayne@69: __Pyx_XDECREF(__pyx_v_value); jpayne@69: __Pyx_XDECREF(__pyx_v_f); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":570 jpayne@69: * jpayne@69: * jpayne@69: * def write_header( self, stream ): # <<<<<<<<<<<<<< jpayne@69: * stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10)) jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_19write_header(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_18write_header, "VCF.write_header(self, stream)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_19write_header = {"write_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_19write_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_18write_header}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_19write_header(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_stream = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("write_header (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 570, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 570, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("write_header", 1, 2, 2, 1); __PYX_ERR(0, 570, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write_header") < 0)) __PYX_ERR(0, 570, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_stream = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("write_header", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 570, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.write_header", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_18write_header(__pyx_self, __pyx_v_self, __pyx_v_stream); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_18write_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) { jpayne@69: PyObject *__pyx_v_key = NULL; jpayne@69: PyObject *__pyx_v_value = NULL; jpayne@69: PyObject *__pyx_v_var = NULL; jpayne@69: PyObject *__pyx_v_label = NULL; jpayne@69: PyObject *__pyx_v_f = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: Py_ssize_t __pyx_t_4; jpayne@69: Py_UCS4 __pyx_t_5; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: unsigned int __pyx_t_8; jpayne@69: PyObject *(*__pyx_t_9)(PyObject *); jpayne@69: PyObject *(*__pyx_t_10)(PyObject *); jpayne@69: Py_ssize_t __pyx_t_11; jpayne@69: Py_ssize_t __pyx_t_12; jpayne@69: int __pyx_t_13; jpayne@69: int __pyx_t_14; jpayne@69: Py_ssize_t __pyx_t_15; jpayne@69: PyObject *__pyx_t_16 = NULL; jpayne@69: PyObject *__pyx_t_17 = NULL; jpayne@69: PyObject *__pyx_t_18 = NULL; jpayne@69: PyObject *__pyx_t_19 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("write_header", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":571 jpayne@69: * jpayne@69: * def write_header( self, stream ): jpayne@69: * stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10)) # <<<<<<<<<<<<<< jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) jpayne@69: * for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]: jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = 0; jpayne@69: __pyx_t_5 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_fileformat_VCFv); jpayne@69: __pyx_t_4 += 17; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_fileformat_VCFv); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_fileformat_VCFv); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_7 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_6, __pyx_int_10, 10, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_7), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; jpayne@69: __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); jpayne@69: __Pyx_GIVEREF(__pyx_t_6); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __pyx_t_4 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__5); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__5); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_7 = __Pyx_PyInt_RemainderObjC(__pyx_t_6, __pyx_int_10, 10, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_7), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; jpayne@69: __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); jpayne@69: __Pyx_GIVEREF(__pyx_t_6); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__14); jpayne@69: __pyx_t_4 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__14); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__14); jpayne@69: __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":572 jpayne@69: * def write_header( self, stream ): jpayne@69: * stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10)) jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) # <<<<<<<<<<<<<< jpayne@69: * for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]: jpayne@69: * for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER")))) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { jpayne@69: __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_4 = 0; jpayne@69: __pyx_t_9 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_9)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_9(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { jpayne@69: PyObject* sequence = __pyx_t_1; jpayne@69: Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); jpayne@69: if (unlikely(size != 2)) { jpayne@69: if (size > 2) __Pyx_RaiseTooManyValuesError(2); jpayne@69: else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); jpayne@69: __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: if (likely(PyTuple_CheckExact(sequence))) { jpayne@69: __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); jpayne@69: } else { jpayne@69: __pyx_t_6 = PyList_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_3 = PyList_GET_ITEM(sequence, 1); jpayne@69: } jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: #else jpayne@69: __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: #endif jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } else { jpayne@69: Py_ssize_t index = -1; jpayne@69: __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); jpayne@69: index = 0; __pyx_t_6 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_7), 2) < 0) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __pyx_t_10 = NULL; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: goto __pyx_L6_unpacking_done; jpayne@69: __pyx_L5_unpacking_failed:; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_10 = NULL; jpayne@69: if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); jpayne@69: __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __pyx_L6_unpacking_done:; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_11 = 0; jpayne@69: __pyx_t_5 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u__23); jpayne@69: __pyx_t_11 += 2; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__23); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u__23); jpayne@69: __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_key), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5; jpayne@69: __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__7); jpayne@69: __pyx_t_11 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__7); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__7); jpayne@69: __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5; jpayne@69: __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__14); jpayne@69: __pyx_t_11 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__14); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__14); jpayne@69: __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_6)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":573 jpayne@69: * stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10)) jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) jpayne@69: * for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]: # <<<<<<<<<<<<<< jpayne@69: * for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER")))) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_INFO); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_INFO); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_INFO)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_FILTER); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_FILTER); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_FILTER)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_FORMAT); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_FORMAT); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_u_FORMAT)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_3 = 0; jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); jpayne@69: __pyx_t_4 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: for (;;) { jpayne@69: if (__pyx_t_4 >= 3) break; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: if (likely(__pyx_t_2 != Py_None)) { jpayne@69: PyObject* sequence = __pyx_t_2; jpayne@69: Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); jpayne@69: if (unlikely(size != 2)) { jpayne@69: if (size > 2) __Pyx_RaiseTooManyValuesError(2); jpayne@69: else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); jpayne@69: __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: #else jpayne@69: __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } else { jpayne@69: __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 573, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_label, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":574 jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) jpayne@69: * for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]: jpayne@69: * for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER")))) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_11 = 0; jpayne@69: if (unlikely(__pyx_v_var == Py_None)) { jpayne@69: PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "itervalues"); jpayne@69: __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_var, 0, __pyx_n_s_itervalues, (&__pyx_t_12), (&__pyx_t_13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __pyx_t_2 = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: while (1) { jpayne@69: __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_12, &__pyx_t_11, NULL, &__pyx_t_1, NULL, __pyx_t_13); jpayne@69: if (unlikely(__pyx_t_14 == 0)) break; jpayne@69: if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_15 = 0; jpayne@69: __pyx_t_5 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u__23); jpayne@69: __pyx_t_15 += 2; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__23); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u__23); jpayne@69: __pyx_t_16 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_label), __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_5; jpayne@69: __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16); jpayne@69: __Pyx_GIVEREF(__pyx_t_16); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_16); jpayne@69: __pyx_t_16 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__7); jpayne@69: __pyx_t_15 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__7); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__7); jpayne@69: __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_format); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_17); jpayne@69: __Pyx_INCREF(__pyx_v_f); jpayne@69: __Pyx_GIVEREF(__pyx_v_f); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_f)) __PYX_ERR(0, 574, __pyx_L1_error); jpayne@69: __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_18); jpayne@69: __pyx_t_19 = PyObject_RichCompare(__pyx_v_label, __pyx_n_u_FILTER, Py_EQ); __Pyx_XGOTREF(__pyx_t_19); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_filter_2, __pyx_t_19) < 0) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; jpayne@69: __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_17, __pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_19); jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; jpayne@69: __pyx_t_18 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_19), __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_18); jpayne@69: __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_5; jpayne@69: __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18); jpayne@69: __Pyx_GIVEREF(__pyx_t_18); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_18); jpayne@69: __pyx_t_18 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__14); jpayne@69: __pyx_t_15 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__14); jpayne@69: PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__14); jpayne@69: __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_15, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_18); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_6)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_18}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":573 jpayne@69: * stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10)) jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) jpayne@69: * for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]: # <<<<<<<<<<<<<< jpayne@69: * for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER")))) jpayne@69: * jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":570 jpayne@69: * jpayne@69: * jpayne@69: * def write_header( self, stream ): # <<<<<<<<<<<<<< jpayne@69: * stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10)) jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_16); jpayne@69: __Pyx_XDECREF(__pyx_t_17); jpayne@69: __Pyx_XDECREF(__pyx_t_18); jpayne@69: __Pyx_XDECREF(__pyx_t_19); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.write_header", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_key); jpayne@69: __Pyx_XDECREF(__pyx_v_value); jpayne@69: __Pyx_XDECREF(__pyx_v_var); jpayne@69: __Pyx_XDECREF(__pyx_v_label); jpayne@69: __Pyx_XDECREF(__pyx_v_f); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":577 jpayne@69: * jpayne@69: * jpayne@69: * def parse_heading( self, line ): # <<<<<<<<<<<<<< jpayne@69: * assert line.startswith('#') jpayne@69: * assert not line.startswith('##') jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_21parse_heading(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_20parse_heading, "VCF.parse_heading(self, line)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_21parse_heading = {"parse_heading", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_21parse_heading, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_20parse_heading}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_21parse_heading(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("parse_heading (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_heading", 1, 2, 2, 1); __PYX_ERR(0, 577, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_heading") < 0)) __PYX_ERR(0, 577, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_line = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_heading", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 577, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_heading", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_20parse_heading(__pyx_self, __pyx_v_self, __pyx_v_line); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line) { jpayne@69: PyObject *__pyx_v_headings = NULL; jpayne@69: PyObject *__pyx_v_i = NULL; jpayne@69: PyObject *__pyx_v_s = NULL; jpayne@69: PyObject *__pyx_v_err = NULL; jpayne@69: PyObject *__pyx_8genexpr2__pyx_v_x = NULL; jpayne@69: PyObject *__pyx_8genexpr2__pyx_v_y = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_t_5; jpayne@69: int __pyx_t_6; jpayne@69: Py_ssize_t __pyx_t_7; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: PyObject *(*__pyx_t_9)(PyObject *); jpayne@69: Py_ssize_t __pyx_t_10; jpayne@69: Py_UCS4 __pyx_t_11; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: int __pyx_t_13; jpayne@69: PyObject *__pyx_t_14 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("parse_heading", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":578 jpayne@69: * jpayne@69: * def parse_heading( self, line ): jpayne@69: * assert line.startswith('#') # <<<<<<<<<<<<<< jpayne@69: * assert not line.startswith('##') jpayne@69: * headings = line[1:].split('\t') jpayne@69: */ jpayne@69: #ifndef CYTHON_WITHOUT_ASSERTIONS jpayne@69: if (unlikely(__pyx_assertions_enabled())) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__24}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 578, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_5)) { jpayne@69: __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); jpayne@69: __PYX_ERR(0, 578, __pyx_L1_error) jpayne@69: } jpayne@69: } jpayne@69: #else jpayne@69: if ((1)); else __PYX_ERR(0, 578, __pyx_L1_error) jpayne@69: #endif jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":579 jpayne@69: * def parse_heading( self, line ): jpayne@69: * assert line.startswith('#') jpayne@69: * assert not line.startswith('##') # <<<<<<<<<<<<<< jpayne@69: * headings = line[1:].split('\t') jpayne@69: * # test for 8, as FORMAT field might be missing jpayne@69: */ jpayne@69: #ifndef CYTHON_WITHOUT_ASSERTIONS jpayne@69: if (unlikely(__pyx_assertions_enabled())) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__23}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 579, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_6 = (!__pyx_t_5); jpayne@69: if (unlikely(!__pyx_t_6)) { jpayne@69: __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); jpayne@69: __PYX_ERR(0, 579, __pyx_L1_error) jpayne@69: } jpayne@69: } jpayne@69: #else jpayne@69: if ((1)); else __PYX_ERR(0, 579, __pyx_L1_error) jpayne@69: #endif jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":580 jpayne@69: * assert line.startswith('#') jpayne@69: * assert not line.startswith('##') jpayne@69: * headings = line[1:].split('\t') # <<<<<<<<<<<<<< jpayne@69: * # test for 8, as FORMAT field might be missing jpayne@69: * if len(headings)==1 and len(line[1:].split()) >= 8: jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_line, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_2)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u__25}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_v_headings = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":582 jpayne@69: * headings = line[1:].split('\t') jpayne@69: * # test for 8, as FORMAT field might be missing jpayne@69: * if len(headings)==1 and len(line[1:].split()) >= 8: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS) jpayne@69: * headings = line[1:].split() jpayne@69: */ jpayne@69: __pyx_t_7 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 582, __pyx_L1_error) jpayne@69: __pyx_t_5 = (__pyx_t_7 == 1); jpayne@69: if (__pyx_t_5) { jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_5; jpayne@69: goto __pyx_L4_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_line, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 582, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_5 = (__pyx_t_7 >= 8); jpayne@69: __pyx_t_6 = __pyx_t_5; jpayne@69: __pyx_L4_bool_binop_done:; jpayne@69: if (__pyx_t_6) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":583 jpayne@69: * # test for 8, as FORMAT field might be missing jpayne@69: * if len(headings)==1 and len(line[1:].split()) >= 8: jpayne@69: * self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS) # <<<<<<<<<<<<<< jpayne@69: * headings = line[1:].split() jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_8 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_8)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_line, __pyx_t_3}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":584 jpayne@69: * if len(headings)==1 and len(line[1:].split()) >= 8: jpayne@69: * self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS) jpayne@69: * headings = line[1:].split() # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * for i,s in enumerate(self._required): jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_line, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_2)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF_SET(__pyx_v_headings, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":582 jpayne@69: * headings = line[1:].split('\t') jpayne@69: * # test for 8, as FORMAT field might be missing jpayne@69: * if len(headings)==1 and len(line[1:].split()) >= 8: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS) jpayne@69: * headings = line[1:].split() jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":586 jpayne@69: * headings = line[1:].split() jpayne@69: * jpayne@69: * for i,s in enumerate(self._required): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * if len(headings)<=i or headings[i] != s: jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_t_1 = __pyx_int_0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_required); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { jpayne@69: __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_t_9 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_9)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_7 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_7 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_3 = __pyx_t_9(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_3)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); jpayne@69: __pyx_t_1 = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":588 jpayne@69: * for i,s in enumerate(self._required): jpayne@69: * jpayne@69: * if len(headings)<=i or headings[i] != s: # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * if len(headings) <= i: jpayne@69: */ jpayne@69: __pyx_t_10 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 588, __pyx_L1_error) jpayne@69: __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 588, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 588, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (!__pyx_t_5) { jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_5; jpayne@69: goto __pyx_L9_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 588, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_s, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 588, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_6 = __pyx_t_5; jpayne@69: __pyx_L9_bool_binop_done:; jpayne@69: if (__pyx_t_6) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":590 jpayne@69: * if len(headings)<=i or headings[i] != s: jpayne@69: * jpayne@69: * if len(headings) <= i: # <<<<<<<<<<<<<< jpayne@69: * err = "(%sth entry not found)" % (i+1) jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_10 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 590, __pyx_L1_error) jpayne@69: __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 590, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 590, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (__pyx_t_6) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":591 jpayne@69: * jpayne@69: * if len(headings) <= i: jpayne@69: * err = "(%sth entry not found)" % (i+1) # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * err = "(found %s, expected %s)" % (headings[i],s) jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 591, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_sth_entry_not_found, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_err, ((PyObject*)__pyx_t_3)); jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":590 jpayne@69: * if len(headings)<=i or headings[i] != s: jpayne@69: * jpayne@69: * if len(headings) <= i: # <<<<<<<<<<<<<< jpayne@69: * err = "(%sth entry not found)" % (i+1) jpayne@69: * else: jpayne@69: */ jpayne@69: goto __pyx_L11; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":593 jpayne@69: * err = "(%sth entry not found)" % (i+1) jpayne@69: * else: jpayne@69: * err = "(found %s, expected %s)" % (headings[i],s) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * #self.error(line,self.BADLY_FORMATTED_HEADING,err) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_10 = 0; jpayne@69: __pyx_t_11 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_found); jpayne@69: __pyx_t_10 += 7; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_found); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_found); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 593, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_8), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 593, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11; jpayne@69: __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); jpayne@69: __Pyx_GIVEREF(__pyx_t_12); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_expected_2); jpayne@69: __pyx_t_10 += 11; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_expected_2); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_expected_2); jpayne@69: __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 593, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11; jpayne@69: __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); jpayne@69: __Pyx_GIVEREF(__pyx_t_12); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__8); jpayne@69: __pyx_t_10 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__8); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__8); jpayne@69: __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 593, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_err, ((PyObject*)__pyx_t_12)); jpayne@69: __pyx_t_12 = 0; jpayne@69: } jpayne@69: __pyx_L11:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":597 jpayne@69: * #self.error(line,self.BADLY_FORMATTED_HEADING,err) jpayne@69: * # allow FORMAT column to be absent jpayne@69: * if len(headings) == 8: # <<<<<<<<<<<<<< jpayne@69: * headings.append("FORMAT") jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_10 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 597, __pyx_L1_error) jpayne@69: __pyx_t_6 = (__pyx_t_10 == 8); jpayne@69: if (__pyx_t_6) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":598 jpayne@69: * # allow FORMAT column to be absent jpayne@69: * if len(headings) == 8: jpayne@69: * headings.append("FORMAT") # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * self.error(line,self.BADLY_FORMATTED_HEADING,err) jpayne@69: */ jpayne@69: __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_headings, __pyx_n_u_FORMAT); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 598, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":597 jpayne@69: * #self.error(line,self.BADLY_FORMATTED_HEADING,err) jpayne@69: * # allow FORMAT column to be absent jpayne@69: * if len(headings) == 8: # <<<<<<<<<<<<<< jpayne@69: * headings.append("FORMAT") jpayne@69: * else: jpayne@69: */ jpayne@69: goto __pyx_L12; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":600 jpayne@69: * headings.append("FORMAT") jpayne@69: * else: jpayne@69: * self.error(line,self.BADLY_FORMATTED_HEADING,err) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * self._samples = headings[9:] jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BADLY_FORMATTED_HEADING); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_14 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_14)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_14); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_14, __pyx_v_line, __pyx_t_8, __pyx_v_err}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 600, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __pyx_L12:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":588 jpayne@69: * for i,s in enumerate(self._required): jpayne@69: * jpayne@69: * if len(headings)<=i or headings[i] != s: # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * if len(headings) <= i: jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":586 jpayne@69: * headings = line[1:].split() jpayne@69: * jpayne@69: * for i,s in enumerate(self._required): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * if len(headings)<=i or headings[i] != s: jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":602 jpayne@69: * self.error(line,self.BADLY_FORMATTED_HEADING,err) jpayne@69: * jpayne@69: * self._samples = headings[9:] # <<<<<<<<<<<<<< jpayne@69: * self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] ) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_headings, 9, 0, NULL, NULL, &__pyx_slice__26, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_samples, __pyx_t_1) < 0) __PYX_ERR(0, 602, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":603 jpayne@69: * jpayne@69: * self._samples = headings[9:] jpayne@69: * self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] ) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def write_heading( self, stream ): jpayne@69: */ jpayne@69: { /* enter inner scope */ jpayne@69: __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_t_2 = __pyx_int_0; jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { jpayne@69: __pyx_t_3 = __pyx_t_12; __Pyx_INCREF(__pyx_t_3); jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_t_9 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_9)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_3))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: #endif jpayne@69: if (__pyx_t_7 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_12); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: #endif jpayne@69: if (__pyx_t_7 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_12); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_12 = __pyx_t_9(__pyx_t_3); jpayne@69: if (unlikely(!__pyx_t_12)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_y, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_x, __pyx_t_2); jpayne@69: __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_2); jpayne@69: __pyx_t_2 = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_8genexpr2__pyx_v_x, __pyx_int_9, 9, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(__pyx_8genexpr2__pyx_v_y); jpayne@69: __Pyx_GIVEREF(__pyx_8genexpr2__pyx_v_y); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_8genexpr2__pyx_v_y)) __PYX_ERR(0, 603, __pyx_L16_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_12); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_12)) __PYX_ERR(0, 603, __pyx_L16_error); jpayne@69: __pyx_t_12 = 0; jpayne@69: if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 603, __pyx_L16_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); __pyx_8genexpr2__pyx_v_x = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_y); __pyx_8genexpr2__pyx_v_y = 0; jpayne@69: goto __pyx_L20_exit_scope; jpayne@69: __pyx_L16_error:; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); __pyx_8genexpr2__pyx_v_x = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_y); __pyx_8genexpr2__pyx_v_y = 0; jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L20_exit_scope:; jpayne@69: } /* exit inner scope */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sample2column, __pyx_t_2) < 0) __PYX_ERR(0, 603, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":577 jpayne@69: * jpayne@69: * jpayne@69: * def parse_heading( self, line ): # <<<<<<<<<<<<<< jpayne@69: * assert line.startswith('#') jpayne@69: * assert not line.startswith('##') jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_12); jpayne@69: __Pyx_XDECREF(__pyx_t_14); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_heading", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_headings); jpayne@69: __Pyx_XDECREF(__pyx_v_i); jpayne@69: __Pyx_XDECREF(__pyx_v_s); jpayne@69: __Pyx_XDECREF(__pyx_v_err); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_y); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":605 jpayne@69: * self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] ) jpayne@69: * jpayne@69: * def write_heading( self, stream ): # <<<<<<<<<<<<<< jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_23write_heading(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_22write_heading, "VCF.write_heading(self, stream)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_23write_heading = {"write_heading", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_23write_heading, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_22write_heading}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_23write_heading(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_stream = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("write_heading (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("write_heading", 1, 2, 2, 1); __PYX_ERR(0, 605, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write_heading") < 0)) __PYX_ERR(0, 605, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_stream = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("write_heading", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 605, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.write_heading", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_22write_heading(__pyx_self, __pyx_v_self, __pyx_v_stream); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_22write_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: unsigned int __pyx_t_6; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("write_heading", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":606 jpayne@69: * jpayne@69: * def write_heading( self, stream ): jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def convertGT(self, GTstring): jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_required); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__25, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u__24, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_5, __pyx_kp_u__14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_6 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_6 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":605 jpayne@69: * self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] ) jpayne@69: * jpayne@69: * def write_heading( self, stream ): # <<<<<<<<<<<<<< jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.write_heading", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":608 jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") jpayne@69: * jpayne@69: * def convertGT(self, GTstring): # <<<<<<<<<<<<<< jpayne@69: * if GTstring == ".": return ["."] jpayne@69: * try: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_25convertGT(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_24convertGT, "VCF.convertGT(self, GTstring)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_25convertGT = {"convertGT", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_25convertGT, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_24convertGT}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_25convertGT(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_GTstring = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("convertGT (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_GTstring,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 608, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_GTstring)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 608, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("convertGT", 1, 2, 2, 1); __PYX_ERR(0, 608, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convertGT") < 0)) __PYX_ERR(0, 608, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_GTstring = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("convertGT", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 608, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.convertGT", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_24convertGT(__pyx_self, __pyx_v_self, __pyx_v_GTstring); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_GTstring) { jpayne@69: PyObject *__pyx_v_gts = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_t_1; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: unsigned int __pyx_t_8; jpayne@69: Py_ssize_t __pyx_t_9; jpayne@69: int __pyx_t_10; jpayne@69: Py_ssize_t __pyx_t_11; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: int __pyx_t_13; jpayne@69: PyObject *__pyx_t_14 = NULL; jpayne@69: PyObject *__pyx_t_15 = NULL; jpayne@69: PyObject *__pyx_t_16 = NULL; jpayne@69: PyObject *__pyx_t_17 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("convertGT", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":609 jpayne@69: * jpayne@69: * def convertGT(self, GTstring): jpayne@69: * if GTstring == ".": return ["."] # <<<<<<<<<<<<<< jpayne@69: * try: jpayne@69: * gts = gtsRegEx.split(GTstring) jpayne@69: */ jpayne@69: __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_GTstring, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 609, __pyx_L1_error) jpayne@69: if (__pyx_t_1) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__5); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__5)) __PYX_ERR(0, 609, __pyx_L1_error); jpayne@69: __pyx_r = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":610 jpayne@69: * def convertGT(self, GTstring): jpayne@69: * if GTstring == ".": return ["."] jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * gts = gtsRegEx.split(GTstring) jpayne@69: * if len(gts) == 1: return [int(gts[0])] jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); jpayne@69: __Pyx_XGOTREF(__pyx_t_3); jpayne@69: __Pyx_XGOTREF(__pyx_t_4); jpayne@69: __Pyx_XGOTREF(__pyx_t_5); jpayne@69: /*try:*/ { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":611 jpayne@69: * if GTstring == ".": return ["."] jpayne@69: * try: jpayne@69: * gts = gtsRegEx.split(GTstring) # <<<<<<<<<<<<<< jpayne@69: * if len(gts) == 1: return [int(gts[0])] jpayne@69: * if len(gts) != 2: raise ValueError() jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_gtsRegEx); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 611, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_7))) { jpayne@69: __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); jpayne@69: if (likely(__pyx_t_6)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_7, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_GTstring}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: } jpayne@69: __pyx_v_gts = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":612 jpayne@69: * try: jpayne@69: * gts = gtsRegEx.split(GTstring) jpayne@69: * if len(gts) == 1: return [int(gts[0])] # <<<<<<<<<<<<<< jpayne@69: * if len(gts) != 2: raise ValueError() jpayne@69: * if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]] jpayne@69: */ jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_v_gts); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 612, __pyx_L4_error) jpayne@69: __pyx_t_1 = (__pyx_t_9 == 1); jpayne@69: if (__pyx_t_1) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_7)) __PYX_ERR(0, 612, __pyx_L4_error); jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_r = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: goto __pyx_L8_try_return; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":613 jpayne@69: * gts = gtsRegEx.split(GTstring) jpayne@69: * if len(gts) == 1: return [int(gts[0])] jpayne@69: * if len(gts) != 2: raise ValueError() # <<<<<<<<<<<<<< jpayne@69: * if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]] jpayne@69: * return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])] jpayne@69: */ jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_v_gts); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 613, __pyx_L4_error) jpayne@69: __pyx_t_1 = (__pyx_t_9 != 2); jpayne@69: if (unlikely(__pyx_t_1)) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_ValueError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_Raise(__pyx_t_2, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __PYX_ERR(0, 613, __pyx_L4_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":614 jpayne@69: * if len(gts) == 1: return [int(gts[0])] jpayne@69: * if len(gts) != 2: raise ValueError() jpayne@69: * if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]] # <<<<<<<<<<<<<< jpayne@69: * return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])] jpayne@69: * except ValueError: jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_10) { jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_10; jpayne@69: goto __pyx_L13_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_1 = __pyx_t_10; jpayne@69: __pyx_L13_bool_binop_done:; jpayne@69: if (__pyx_t_1) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_11 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_GTstring, __pyx_t_9, (-__pyx_t_11), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 614, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_2)) __PYX_ERR(0, 614, __pyx_L4_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_7)) __PYX_ERR(0, 614, __pyx_L4_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_6); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_6)) __PYX_ERR(0, 614, __pyx_L4_error); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_r = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: goto __pyx_L8_try_return; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":615 jpayne@69: * if len(gts) != 2: raise ValueError() jpayne@69: * if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]] jpayne@69: * return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])] # <<<<<<<<<<<<<< jpayne@69: * except ValueError: jpayne@69: * self.error(self._line,self.BAD_GENOTYPE,GTstring) jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_gts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_11 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_GTstring, __pyx_t_11, (-__pyx_t_9), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L4_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_GIVEREF(__pyx_t_6); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)) __PYX_ERR(0, 615, __pyx_L4_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_12); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_12)) __PYX_ERR(0, 615, __pyx_L4_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_2)) __PYX_ERR(0, 615, __pyx_L4_error); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_12 = 0; jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_r = __pyx_t_7; jpayne@69: __pyx_t_7 = 0; jpayne@69: goto __pyx_L8_try_return; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":610 jpayne@69: * def convertGT(self, GTstring): jpayne@69: * if GTstring == ".": return ["."] jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * gts = gtsRegEx.split(GTstring) jpayne@69: * if len(gts) == 1: return [int(gts[0])] jpayne@69: */ jpayne@69: } jpayne@69: __pyx_L4_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":616 jpayne@69: * if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]] jpayne@69: * return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])] jpayne@69: * except ValueError: # <<<<<<<<<<<<<< jpayne@69: * self.error(self._line,self.BAD_GENOTYPE,GTstring) jpayne@69: * return [".","|","."] jpayne@69: */ jpayne@69: __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); jpayne@69: if (__pyx_t_13) { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.convertGT", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 616, __pyx_L6_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_7); jpayne@69: __Pyx_XGOTREF(__pyx_t_2); jpayne@69: __Pyx_XGOTREF(__pyx_t_12); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":617 jpayne@69: * return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])] jpayne@69: * except ValueError: jpayne@69: * self.error(self._line,self.BAD_GENOTYPE,GTstring) # <<<<<<<<<<<<<< jpayne@69: * return [".","|","."] jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 617, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_14); jpayne@69: __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_line_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BAD_GENOTYPE); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 617, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_17 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_14))) { jpayne@69: __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14); jpayne@69: if (likely(__pyx_t_17)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); jpayne@69: __Pyx_INCREF(__pyx_t_17); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_14, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_17, __pyx_t_15, __pyx_t_16, __pyx_v_GTstring}; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_8, 3+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 617, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":618 jpayne@69: * except ValueError: jpayne@69: * self.error(self._line,self.BAD_GENOTYPE,GTstring) jpayne@69: * return [".","|","."] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def convertGTback(self, GTdata): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L6_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__5); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u__5)) __PYX_ERR(0, 618, __pyx_L6_except_error); jpayne@69: __Pyx_INCREF(__pyx_kp_u__27); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__27); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u__27)) __PYX_ERR(0, 618, __pyx_L6_except_error); jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__5); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__5)) __PYX_ERR(0, 618, __pyx_L6_except_error); jpayne@69: __pyx_r = __pyx_t_6; jpayne@69: __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: goto __pyx_L7_except_return; jpayne@69: } jpayne@69: goto __pyx_L6_except_error; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":610 jpayne@69: * def convertGT(self, GTstring): jpayne@69: * if GTstring == ".": return ["."] jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * gts = gtsRegEx.split(GTstring) jpayne@69: * if len(gts) == 1: return [int(gts[0])] jpayne@69: */ jpayne@69: __pyx_L6_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_3); jpayne@69: __Pyx_XGIVEREF(__pyx_t_4); jpayne@69: __Pyx_XGIVEREF(__pyx_t_5); jpayne@69: __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L8_try_return:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_3); jpayne@69: __Pyx_XGIVEREF(__pyx_t_4); jpayne@69: __Pyx_XGIVEREF(__pyx_t_5); jpayne@69: __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L7_except_return:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_3); jpayne@69: __Pyx_XGIVEREF(__pyx_t_4); jpayne@69: __Pyx_XGIVEREF(__pyx_t_5); jpayne@69: __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":608 jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") jpayne@69: * jpayne@69: * def convertGT(self, GTstring): # <<<<<<<<<<<<<< jpayne@69: * if GTstring == ".": return ["."] jpayne@69: * try: jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_12); jpayne@69: __Pyx_XDECREF(__pyx_t_14); jpayne@69: __Pyx_XDECREF(__pyx_t_15); jpayne@69: __Pyx_XDECREF(__pyx_t_16); jpayne@69: __Pyx_XDECREF(__pyx_t_17); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.convertGT", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_gts); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":620 jpayne@69: * return [".","|","."] jpayne@69: * jpayne@69: * def convertGTback(self, GTdata): # <<<<<<<<<<<<<< jpayne@69: * return ''.join(map(str,GTdata)) jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_27convertGTback(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_26convertGTback, "VCF.convertGTback(self, GTdata)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_27convertGTback = {"convertGTback", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_27convertGTback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_26convertGTback}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_27convertGTback(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: CYTHON_UNUSED PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_GTdata = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("convertGTback (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_GTdata,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 620, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_GTdata)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 620, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("convertGTback", 1, 2, 2, 1); __PYX_ERR(0, 620, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convertGTback") < 0)) __PYX_ERR(0, 620, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_GTdata = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("convertGTback", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 620, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.convertGTback", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_26convertGTback(__pyx_self, __pyx_v_self, __pyx_v_GTdata); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_26convertGTback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_GTdata) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("convertGTback", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":621 jpayne@69: * jpayne@69: * def convertGTback(self, GTdata): jpayne@69: * return ''.join(map(str,GTdata)) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def parse_formatdata( self, key, value, formatdict, line ): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); jpayne@69: __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 621, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_GTdata); jpayne@69: __Pyx_GIVEREF(__pyx_v_GTdata); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_GTdata)) __PYX_ERR(0, 621, __pyx_L1_error); jpayne@69: __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyUnicode_Join(__pyx_kp_u_, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":620 jpayne@69: * return [".","|","."] jpayne@69: * jpayne@69: * def convertGTback(self, GTdata): # <<<<<<<<<<<<<< jpayne@69: * return ''.join(map(str,GTdata)) jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.convertGTback", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":623 jpayne@69: * return ''.join(map(str,GTdata)) jpayne@69: * jpayne@69: * def parse_formatdata( self, key, value, formatdict, line ): # <<<<<<<<<<<<<< jpayne@69: * # To do: check that the right number of values is present jpayne@69: * f = formatdict.get(key,None) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_29parse_formatdata(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_28parse_formatdata, "VCF.parse_formatdata(self, key, value, formatdict, line)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_29parse_formatdata = {"parse_formatdata", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_29parse_formatdata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_28parse_formatdata}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_29parse_formatdata(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_key = 0; jpayne@69: PyObject *__pyx_v_value = 0; jpayne@69: PyObject *__pyx_v_formatdict = 0; jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[5] = {0,0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("parse_formatdata (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,&__pyx_n_s_value,&__pyx_n_s_formatdict,&__pyx_n_s_line,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 1); __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 2); __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_formatdict)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 3); __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 4); __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_formatdata") < 0)) __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 5)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_key = values[1]; jpayne@69: __pyx_v_value = values[2]; jpayne@69: __pyx_v_formatdict = values[3]; jpayne@69: __pyx_v_line = values[4]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 623, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_28parse_formatdata(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_value, __pyx_v_formatdict, __pyx_v_line); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_line) { jpayne@69: PyObject *__pyx_v_f = NULL; jpayne@69: PyObject *__pyx_v_values = NULL; jpayne@69: PyObject *__pyx_v_idx = NULL; jpayne@69: PyObject *__pyx_v_v = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_t_5; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: int __pyx_t_7; jpayne@69: int __pyx_t_8; jpayne@69: Py_ssize_t __pyx_t_9; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *(*__pyx_t_11)(PyObject *); jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: PyObject *__pyx_t_13 = NULL; jpayne@69: PyObject *__pyx_t_14 = NULL; jpayne@69: PyObject *__pyx_t_15 = NULL; jpayne@69: PyObject *__pyx_t_16 = NULL; jpayne@69: PyObject *__pyx_t_17 = NULL; jpayne@69: PyObject *__pyx_t_18 = NULL; jpayne@69: Py_ssize_t __pyx_t_19; jpayne@69: Py_UCS4 __pyx_t_20; jpayne@69: PyObject *__pyx_t_21 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("parse_formatdata", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":625 jpayne@69: * def parse_formatdata( self, key, value, formatdict, line ): jpayne@69: * # To do: check that the right number of values is present jpayne@69: * f = formatdict.get(key,None) # <<<<<<<<<<<<<< jpayne@69: * if f == None: jpayne@69: * self._add_definition(formatdict, key, value, line ) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_formatdict, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_key, Py_None}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_f = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":626 jpayne@69: * # To do: check that the right number of values is present jpayne@69: * f = formatdict.get(key,None) jpayne@69: * if f == None: # <<<<<<<<<<<<<< jpayne@69: * self._add_definition(formatdict, key, value, line ) jpayne@69: * f = formatdict[key] jpayne@69: */ jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_v_f, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 626, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":627 jpayne@69: * f = formatdict.get(key,None) jpayne@69: * if f == None: jpayne@69: * self._add_definition(formatdict, key, value, line ) # <<<<<<<<<<<<<< jpayne@69: * f = formatdict[key] jpayne@69: * if f.type == "Flag": jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_definition); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_formatdict, __pyx_v_key, __pyx_v_value, __pyx_v_line}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":628 jpayne@69: * if f == None: jpayne@69: * self._add_definition(formatdict, key, value, line ) jpayne@69: * f = formatdict[key] # <<<<<<<<<<<<<< jpayne@69: * if f.type == "Flag": jpayne@69: * if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_formatdict, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":626 jpayne@69: * # To do: check that the right number of values is present jpayne@69: * f = formatdict.get(key,None) jpayne@69: * if f == None: # <<<<<<<<<<<<<< jpayne@69: * self._add_definition(formatdict, key, value, line ) jpayne@69: * f = formatdict[key] jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":629 jpayne@69: * self._add_definition(formatdict, key, value, line ) jpayne@69: * f = formatdict[key] jpayne@69: * if f.type == "Flag": # <<<<<<<<<<<<<< jpayne@69: * if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE) jpayne@69: * return [] jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_Flag, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 629, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":630 jpayne@69: * f = formatdict[key] jpayne@69: * if f.type == "Flag": jpayne@69: * if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE) # <<<<<<<<<<<<<< jpayne@69: * return [] jpayne@69: * values = value.split(',') jpayne@69: */ jpayne@69: __pyx_t_5 = (__pyx_v_value != Py_None); jpayne@69: if (__pyx_t_5) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_FLAG_HAS_VALUE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_6 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_6)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_line, __pyx_t_3}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":631 jpayne@69: * if f.type == "Flag": jpayne@69: * if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE) jpayne@69: * return [] # <<<<<<<<<<<<<< jpayne@69: * values = value.split(',') jpayne@69: * # deal with trailing data in some early VCF files jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":629 jpayne@69: * self._add_definition(formatdict, key, value, line ) jpayne@69: * f = formatdict[key] jpayne@69: * if f.type == "Flag": # <<<<<<<<<<<<<< jpayne@69: * if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE) jpayne@69: * return [] jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":632 jpayne@69: * if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE) jpayne@69: * return [] jpayne@69: * values = value.split(',') # <<<<<<<<<<<<<< jpayne@69: * # deal with trailing data in some early VCF files jpayne@69: * if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1: jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__2}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_values = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":634 jpayne@69: * values = value.split(',') jpayne@69: * # deal with trailing data in some early VCF files jpayne@69: * if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.ERROR_TRAILING_DATA,values[-1]) jpayne@69: * values[-1] = values[-1].split(';')[0] jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_Float, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: if (!__pyx_t_8) { jpayne@69: } else { jpayne@69: __pyx_t_7 = __pyx_t_8; jpayne@69: goto __pyx_L9_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_Integer, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: __pyx_t_7 = __pyx_t_8; jpayne@69: __pyx_L9_bool_binop_done:; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_8 = __pyx_t_7; jpayne@69: if (__pyx_t_8) { jpayne@69: } else { jpayne@69: __pyx_t_5 = __pyx_t_8; jpayne@69: goto __pyx_L7_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: __pyx_t_8 = (__pyx_t_9 > 0); jpayne@69: if (__pyx_t_8) { jpayne@69: } else { jpayne@69: __pyx_t_5 = __pyx_t_8; jpayne@69: goto __pyx_L7_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_find); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_2)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u__6}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 634, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_5 = __pyx_t_8; jpayne@69: __pyx_L7_bool_binop_done:; jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":635 jpayne@69: * # deal with trailing data in some early VCF files jpayne@69: * if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1: jpayne@69: * self.error(line,self.ERROR_TRAILING_DATA,values[-1]) # <<<<<<<<<<<<<< jpayne@69: * values[-1] = values[-1].split(';')[0] jpayne@69: * if f.type == "Integer": jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_TRAILING_DATA); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_values, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_10 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_10)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_10); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_v_line, __pyx_t_2, __pyx_t_6}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 635, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":636 jpayne@69: * if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1: jpayne@69: * self.error(line,self.ERROR_TRAILING_DATA,values[-1]) jpayne@69: * values[-1] = values[-1].split(';')[0] # <<<<<<<<<<<<<< jpayne@69: * if f.type == "Integer": jpayne@69: * for idx,v in enumerate(values): jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__6}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 636, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely((__Pyx_SetItemInt(__pyx_v_values, -1L, __pyx_t_6, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0))) __PYX_ERR(0, 636, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":634 jpayne@69: * values = value.split(',') jpayne@69: * # deal with trailing data in some early VCF files jpayne@69: * if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.ERROR_TRAILING_DATA,values[-1]) jpayne@69: * values[-1] = values[-1].split(';')[0] jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":637 jpayne@69: * self.error(line,self.ERROR_TRAILING_DATA,values[-1]) jpayne@69: * values[-1] = values[-1].split(';')[0] jpayne@69: * if f.type == "Integer": # <<<<<<<<<<<<<< jpayne@69: * for idx,v in enumerate(values): jpayne@69: * try: jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 637, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_Integer, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 637, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":638 jpayne@69: * values[-1] = values[-1].split(';')[0] jpayne@69: * if f.type == "Integer": jpayne@69: * for idx,v in enumerate(values): # <<<<<<<<<<<<<< jpayne@69: * try: jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_t_6 = __pyx_int_0; jpayne@69: if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) { jpayne@69: __pyx_t_3 = __pyx_v_values; __Pyx_INCREF(__pyx_t_3); jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_11 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_11)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_3))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_9 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_9 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_11(__pyx_t_3); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: __Pyx_INCREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_6); jpayne@69: __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_6); jpayne@69: __pyx_t_6 = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":639 jpayne@69: * if f.type == "Integer": jpayne@69: * for idx,v in enumerate(values): jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * else: values[idx] = int(v) jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); jpayne@69: __Pyx_XGOTREF(__pyx_t_12); jpayne@69: __Pyx_XGOTREF(__pyx_t_13); jpayne@69: __Pyx_XGOTREF(__pyx_t_14); jpayne@69: /*try:*/ { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":640 jpayne@69: * for idx,v in enumerate(values): jpayne@69: * try: jpayne@69: * if v == ".": values[idx] = f.missingvalue # <<<<<<<<<<<<<< jpayne@69: * else: values[idx] = int(v) jpayne@69: * except: jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_v, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 640, __pyx_L15_error) jpayne@69: if (__pyx_t_5) { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_missingvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L15_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_1) < 0))) __PYX_ERR(0, 640, __pyx_L15_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: goto __pyx_L23; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":641 jpayne@69: * try: jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * else: values[idx] = int(v) # <<<<<<<<<<<<<< jpayne@69: * except: jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values))) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L15_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_1) < 0))) __PYX_ERR(0, 641, __pyx_L15_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_L23:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":639 jpayne@69: * if f.type == "Integer": jpayne@69: * for idx,v in enumerate(values): jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * else: values[idx] = int(v) jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: goto __pyx_L22_try_end; jpayne@69: __pyx_L15_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":642 jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * else: values[idx] = int(v) jpayne@69: * except: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values))) jpayne@69: * return [0] * len(values) jpayne@69: */ jpayne@69: /*except:*/ { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_10) < 0) __PYX_ERR(0, 642, __pyx_L17_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_2); jpayne@69: __Pyx_XGOTREF(__pyx_t_10); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":643 jpayne@69: * else: values[idx] = int(v) jpayne@69: * except: jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values))) # <<<<<<<<<<<<<< jpayne@69: * return [0] * len(values) jpayne@69: * return values jpayne@69: */ jpayne@69: __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 643, __pyx_L17_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_FORMAT_NOT_INTEGER); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 643, __pyx_L17_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_17); jpayne@69: __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 643, __pyx_L17_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_18); jpayne@69: __pyx_t_19 = 0; jpayne@69: __pyx_t_20 = 127; jpayne@69: __pyx_t_21 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_key), __pyx_empty_unicode); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 643, __pyx_L17_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_21); jpayne@69: __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21) : __pyx_t_20; jpayne@69: __pyx_t_19 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21); jpayne@69: __Pyx_GIVEREF(__pyx_t_21); jpayne@69: PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_21); jpayne@69: __pyx_t_21 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__7); jpayne@69: __pyx_t_19 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__7); jpayne@69: PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_kp_u__7); jpayne@69: __pyx_t_21 = __Pyx_PyObject_Unicode(__pyx_v_values); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 643, __pyx_L17_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_21); jpayne@69: __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21) : __pyx_t_20; jpayne@69: __pyx_t_19 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21); jpayne@69: __Pyx_GIVEREF(__pyx_t_21); jpayne@69: PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_21); jpayne@69: __pyx_t_21 = 0; jpayne@69: __pyx_t_21 = __Pyx_PyUnicode_Join(__pyx_t_18, 3, __pyx_t_19, __pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 643, __pyx_L17_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_21); jpayne@69: __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_16))) { jpayne@69: __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_16); jpayne@69: if (likely(__pyx_t_18)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16); jpayne@69: __Pyx_INCREF(__pyx_t_18); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_16, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_18, __pyx_v_line, __pyx_t_17, __pyx_t_21}; jpayne@69: __pyx_t_15 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; jpayne@69: if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 643, __pyx_L17_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":644 jpayne@69: * except: jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values))) jpayne@69: * return [0] * len(values) # <<<<<<<<<<<<<< jpayne@69: * return values jpayne@69: * elif f.type == "String": jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_19 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 644, __pyx_L17_except_error) jpayne@69: __pyx_t_15 = PyList_New(1 * ((__pyx_t_19<0) ? 0:__pyx_t_19)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 644, __pyx_L17_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: { Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < __pyx_t_19; __pyx_temp++) { jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __Pyx_GIVEREF(__pyx_int_0); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_15, __pyx_temp, __pyx_int_0)) __PYX_ERR(0, 644, __pyx_L17_except_error); jpayne@69: } jpayne@69: } jpayne@69: __pyx_r = __pyx_t_15; jpayne@69: __pyx_t_15 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: goto __pyx_L18_except_return; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":639 jpayne@69: * if f.type == "Integer": jpayne@69: * for idx,v in enumerate(values): jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * else: values[idx] = int(v) jpayne@69: */ jpayne@69: __pyx_L17_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_12); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L18_except_return:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_12); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L22_try_end:; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":638 jpayne@69: * values[-1] = values[-1].split(';')[0] jpayne@69: * if f.type == "Integer": jpayne@69: * for idx,v in enumerate(values): # <<<<<<<<<<<<<< jpayne@69: * try: jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":645 jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values))) jpayne@69: * return [0] * len(values) jpayne@69: * return values # <<<<<<<<<<<<<< jpayne@69: * elif f.type == "String": jpayne@69: * self._line = line jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_values); jpayne@69: __pyx_r = __pyx_v_values; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":637 jpayne@69: * self.error(line,self.ERROR_TRAILING_DATA,values[-1]) jpayne@69: * values[-1] = values[-1].split(';')[0] jpayne@69: * if f.type == "Integer": # <<<<<<<<<<<<<< jpayne@69: * for idx,v in enumerate(values): jpayne@69: * try: jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":646 jpayne@69: * return [0] * len(values) jpayne@69: * return values jpayne@69: * elif f.type == "String": # <<<<<<<<<<<<<< jpayne@69: * self._line = line jpayne@69: * if f.id == "GT": values = list(map( self.convertGT, values )) jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 646, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_String, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 646, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":647 jpayne@69: * return values jpayne@69: * elif f.type == "String": jpayne@69: * self._line = line # <<<<<<<<<<<<<< jpayne@69: * if f.id == "GT": values = list(map( self.convertGT, values )) jpayne@69: * return values jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_line_2, __pyx_v_line) < 0) __PYX_ERR(0, 647, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":648 jpayne@69: * elif f.type == "String": jpayne@69: * self._line = line jpayne@69: * if f.id == "GT": values = list(map( self.convertGT, values )) # <<<<<<<<<<<<<< jpayne@69: * return values jpayne@69: * elif f.type == "Character": jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_id_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 648, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_GT, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 648, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: if (__pyx_t_5) { jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_convertGT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 648, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_GIVEREF(__pyx_t_6); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(0, 648, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_values); jpayne@69: __Pyx_GIVEREF(__pyx_v_values); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_values)) __PYX_ERR(0, 648, __pyx_L1_error); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 648, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":649 jpayne@69: * self._line = line jpayne@69: * if f.id == "GT": values = list(map( self.convertGT, values )) jpayne@69: * return values # <<<<<<<<<<<<<< jpayne@69: * elif f.type == "Character": jpayne@69: * for v in values: jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_values); jpayne@69: __pyx_r = __pyx_v_values; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":646 jpayne@69: * return [0] * len(values) jpayne@69: * return values jpayne@69: * elif f.type == "String": # <<<<<<<<<<<<<< jpayne@69: * self._line = line jpayne@69: * if f.id == "GT": values = list(map( self.convertGT, values )) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":650 jpayne@69: * if f.id == "GT": values = list(map( self.convertGT, values )) jpayne@69: * return values jpayne@69: * elif f.type == "Character": # <<<<<<<<<<<<<< jpayne@69: * for v in values: jpayne@69: * if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_Character, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 650, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":651 jpayne@69: * return values jpayne@69: * elif f.type == "Character": jpayne@69: * for v in values: # <<<<<<<<<<<<<< jpayne@69: * if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR) jpayne@69: * return values jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) { jpayne@69: __pyx_t_3 = __pyx_v_values; __Pyx_INCREF(__pyx_t_3); jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_11 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_11)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_3))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_9 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_9 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_6 = __pyx_t_11(__pyx_t_3); jpayne@69: if (unlikely(!__pyx_t_6)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 651, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":652 jpayne@69: * elif f.type == "Character": jpayne@69: * for v in values: jpayne@69: * if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR) # <<<<<<<<<<<<<< jpayne@69: * return values jpayne@69: * elif f.type == "Float": jpayne@69: */ jpayne@69: __pyx_t_19 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 652, __pyx_L1_error) jpayne@69: __pyx_t_5 = (__pyx_t_19 != 1); jpayne@69: if (__pyx_t_5) { jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 652, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_FORMAT_NOT_CHAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_10))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_10, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_line, __pyx_t_2}; jpayne@69: __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 652, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":651 jpayne@69: * return values jpayne@69: * elif f.type == "Character": jpayne@69: * for v in values: # <<<<<<<<<<<<<< jpayne@69: * if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR) jpayne@69: * return values jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":653 jpayne@69: * for v in values: jpayne@69: * if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR) jpayne@69: * return values # <<<<<<<<<<<<<< jpayne@69: * elif f.type == "Float": jpayne@69: * for idx,v in enumerate(values): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_values); jpayne@69: __pyx_r = __pyx_v_values; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":650 jpayne@69: * if f.id == "GT": values = list(map( self.convertGT, values )) jpayne@69: * return values jpayne@69: * elif f.type == "Character": # <<<<<<<<<<<<<< jpayne@69: * for v in values: jpayne@69: * if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":654 jpayne@69: * if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR) jpayne@69: * return values jpayne@69: * elif f.type == "Float": # <<<<<<<<<<<<<< jpayne@69: * for idx,v in enumerate(values): jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_Float, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 654, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":655 jpayne@69: * return values jpayne@69: * elif f.type == "Float": jpayne@69: * for idx,v in enumerate(values): # <<<<<<<<<<<<<< jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * try: return list(map(float,values)) jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_t_3 = __pyx_int_0; jpayne@69: if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) { jpayne@69: __pyx_t_6 = __pyx_v_values; __Pyx_INCREF(__pyx_t_6); jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_11 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_11)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_6))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_9 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_10); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_9 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_10); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_10 = __pyx_t_11(__pyx_t_6); jpayne@69: if (unlikely(!__pyx_t_10)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_10); jpayne@69: __pyx_t_10 = 0; jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3); jpayne@69: __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 655, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __Pyx_DECREF(__pyx_t_3); jpayne@69: __pyx_t_3 = __pyx_t_10; jpayne@69: __pyx_t_10 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":656 jpayne@69: * elif f.type == "Float": jpayne@69: * for idx,v in enumerate(values): jpayne@69: * if v == ".": values[idx] = f.missingvalue # <<<<<<<<<<<<<< jpayne@69: * try: return list(map(float,values)) jpayne@69: * except: jpayne@69: */ jpayne@69: __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_v, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 656, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_missingvalue); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 656, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_10) < 0))) __PYX_ERR(0, 656, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":655 jpayne@69: * return values jpayne@69: * elif f.type == "Float": jpayne@69: * for idx,v in enumerate(values): # <<<<<<<<<<<<<< jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * try: return list(map(float,values)) jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":657 jpayne@69: * for idx,v in enumerate(values): jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * try: return list(map(float,values)) # <<<<<<<<<<<<<< jpayne@69: * except: jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values))) jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); jpayne@69: __Pyx_XGOTREF(__pyx_t_14); jpayne@69: __Pyx_XGOTREF(__pyx_t_13); jpayne@69: __Pyx_XGOTREF(__pyx_t_12); jpayne@69: /*try:*/ { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L36_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_INCREF((PyObject *)(&PyFloat_Type)); jpayne@69: __Pyx_GIVEREF((PyObject *)(&PyFloat_Type)); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyFloat_Type)))) __PYX_ERR(0, 657, __pyx_L36_error); jpayne@69: __Pyx_INCREF(__pyx_v_values); jpayne@69: __Pyx_GIVEREF(__pyx_v_values); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_values)) __PYX_ERR(0, 657, __pyx_L36_error); jpayne@69: __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L36_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L36_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_r = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: goto __pyx_L40_try_return; jpayne@69: } jpayne@69: __pyx_L36_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":658 jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * try: return list(map(float,values)) jpayne@69: * except: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values))) jpayne@69: * return [0.0] * len(values) jpayne@69: */ jpayne@69: /*except:*/ { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 658, __pyx_L38_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_3); jpayne@69: __Pyx_XGOTREF(__pyx_t_6); jpayne@69: __Pyx_XGOTREF(__pyx_t_10); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":659 jpayne@69: * try: return list(map(float,values)) jpayne@69: * except: jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values))) # <<<<<<<<<<<<<< jpayne@69: * return [0.0] * len(values) jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L38_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 659, __pyx_L38_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_15); jpayne@69: __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 659, __pyx_L38_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_20 = 127; jpayne@69: __pyx_t_21 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_key), __pyx_empty_unicode); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 659, __pyx_L38_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_21); jpayne@69: __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21) : __pyx_t_20; jpayne@69: __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21); jpayne@69: __Pyx_GIVEREF(__pyx_t_21); jpayne@69: PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_21); jpayne@69: __pyx_t_21 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__7); jpayne@69: __pyx_t_9 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__7); jpayne@69: PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_kp_u__7); jpayne@69: __pyx_t_21 = __Pyx_PyObject_Unicode(__pyx_v_values); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 659, __pyx_L38_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_21); jpayne@69: __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_21) : __pyx_t_20; jpayne@69: __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21); jpayne@69: __Pyx_GIVEREF(__pyx_t_21); jpayne@69: PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_21); jpayne@69: __pyx_t_21 = 0; jpayne@69: __pyx_t_21 = __Pyx_PyUnicode_Join(__pyx_t_16, 3, __pyx_t_9, __pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 659, __pyx_L38_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_21); jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __pyx_t_16 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_16)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_16); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_16, __pyx_v_line, __pyx_t_15, __pyx_t_21}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L38_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":660 jpayne@69: * except: jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values))) jpayne@69: * return [0.0] * len(values) # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * # can't happen jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_9 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 660, __pyx_L38_except_error) jpayne@69: __pyx_t_2 = PyList_New(1 * ((__pyx_t_9<0) ? 0:__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L38_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: { Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < __pyx_t_9; __pyx_temp++) { jpayne@69: __Pyx_INCREF(__pyx_float_0_0); jpayne@69: __Pyx_GIVEREF(__pyx_float_0_0); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_float_0_0)) __PYX_ERR(0, 660, __pyx_L38_except_error); jpayne@69: } jpayne@69: } jpayne@69: __pyx_r = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: goto __pyx_L39_except_return; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":657 jpayne@69: * for idx,v in enumerate(values): jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: * try: return list(map(float,values)) # <<<<<<<<<<<<<< jpayne@69: * except: jpayne@69: * self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values))) jpayne@69: */ jpayne@69: __pyx_L38_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_12); jpayne@69: __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L40_try_return:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_12); jpayne@69: __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L39_except_return:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_12); jpayne@69: __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":654 jpayne@69: * if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR) jpayne@69: * return values jpayne@69: * elif f.type == "Float": # <<<<<<<<<<<<<< jpayne@69: * for idx,v in enumerate(values): jpayne@69: * if v == ".": values[idx] = f.missingvalue jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":663 jpayne@69: * else: jpayne@69: * # can't happen jpayne@69: * self.error(line,self.ERROR_INFO_STRING) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def inregion(self, chrom, pos): jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_INFO_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_2)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_line, __pyx_t_3}; jpayne@69: __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 663, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":623 jpayne@69: * return ''.join(map(str,GTdata)) jpayne@69: * jpayne@69: * def parse_formatdata( self, key, value, formatdict, line ): # <<<<<<<<<<<<<< jpayne@69: * # To do: check that the right number of values is present jpayne@69: * f = formatdict.get(key,None) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_15); jpayne@69: __Pyx_XDECREF(__pyx_t_16); jpayne@69: __Pyx_XDECREF(__pyx_t_17); jpayne@69: __Pyx_XDECREF(__pyx_t_18); jpayne@69: __Pyx_XDECREF(__pyx_t_21); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_f); jpayne@69: __Pyx_XDECREF(__pyx_v_values); jpayne@69: __Pyx_XDECREF(__pyx_v_idx); jpayne@69: __Pyx_XDECREF(__pyx_v_v); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":665 jpayne@69: * self.error(line,self.ERROR_INFO_STRING) jpayne@69: * jpayne@69: * def inregion(self, chrom, pos): # <<<<<<<<<<<<<< jpayne@69: * if not self._regions: return True jpayne@69: * for r in self._regions: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_31inregion(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_30inregion, "VCF.inregion(self, chrom, pos)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_31inregion = {"inregion", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_31inregion, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_30inregion}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_31inregion(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_chrom = 0; jpayne@69: PyObject *__pyx_v_pos = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("inregion (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_chrom,&__pyx_n_s_pos,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 665, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_chrom)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 665, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, 1); __PYX_ERR(0, 665, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 665, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, 2); __PYX_ERR(0, 665, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "inregion") < 0)) __PYX_ERR(0, 665, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 3)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_chrom = values[1]; jpayne@69: __pyx_v_pos = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 665, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.inregion", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_30inregion(__pyx_self, __pyx_v_self, __pyx_v_chrom, __pyx_v_pos); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_pos) { jpayne@69: PyObject *__pyx_v_r = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: int __pyx_t_3; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: Py_ssize_t __pyx_t_5; jpayne@69: PyObject *(*__pyx_t_6)(PyObject *); jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("inregion", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":666 jpayne@69: * jpayne@69: * def inregion(self, chrom, pos): jpayne@69: * if not self._regions: return True # <<<<<<<<<<<<<< jpayne@69: * for r in self._regions: jpayne@69: * if r[0] == chrom and r[1] <= pos < r[2]: return True jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_regions_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 666, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_3 = (!__pyx_t_2); jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(Py_True); jpayne@69: __pyx_r = Py_True; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":667 jpayne@69: * def inregion(self, chrom, pos): jpayne@69: * if not self._regions: return True jpayne@69: * for r in self._regions: # <<<<<<<<<<<<<< jpayne@69: * if r[0] == chrom and r[1] <= pos < r[2]: return True jpayne@69: * return False jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_regions_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { jpayne@69: __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); jpayne@69: __pyx_t_5 = 0; jpayne@69: __pyx_t_6 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_6)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_4))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_5 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_5 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_6(__pyx_t_4); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 667, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":668 jpayne@69: * if not self._regions: return True jpayne@69: * for r in self._regions: jpayne@69: * if r[0] == chrom and r[1] <= pos < r[2]: return True # <<<<<<<<<<<<<< jpayne@69: * return False jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_r, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_v_chrom, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 668, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: } else { jpayne@69: __pyx_t_3 = __pyx_t_2; jpayne@69: goto __pyx_L7_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_r, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_v_pos, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) jpayne@69: if (__Pyx_PyObject_IsTrue(__pyx_t_1)) { jpayne@69: __Pyx_DECREF(__pyx_t_1); jpayne@69: __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_r, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 668, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 668, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_3 = __pyx_t_2; jpayne@69: __pyx_L7_bool_binop_done:; jpayne@69: if (__pyx_t_3) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(Py_True); jpayne@69: __pyx_r = Py_True; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":667 jpayne@69: * def inregion(self, chrom, pos): jpayne@69: * if not self._regions: return True jpayne@69: * for r in self._regions: # <<<<<<<<<<<<<< jpayne@69: * if r[0] == chrom and r[1] <= pos < r[2]: return True jpayne@69: * return False jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":669 jpayne@69: * for r in self._regions: jpayne@69: * if r[0] == chrom and r[1] <= pos < r[2]: return True jpayne@69: * return False # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def parse_data( self, line, lineparse=False ): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(Py_False); jpayne@69: __pyx_r = Py_False; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":665 jpayne@69: * self.error(line,self.ERROR_INFO_STRING) jpayne@69: * jpayne@69: * def inregion(self, chrom, pos): # <<<<<<<<<<<<<< jpayne@69: * if not self._regions: return True jpayne@69: * for r in self._regions: jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.inregion", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_r); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":671 jpayne@69: * return False jpayne@69: * jpayne@69: * def parse_data( self, line, lineparse=False ): # <<<<<<<<<<<<<< jpayne@69: * cols = line.split('\t') jpayne@69: * if len(cols) != len(self._samples)+9: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_33parse_data(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_32parse_data, "VCF.parse_data(self, line, lineparse=False)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_33parse_data = {"parse_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_33parse_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_32parse_data}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_33parse_data(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: PyObject *__pyx_v_lineparse = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("parse_data (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,&__pyx_n_s_lineparse,0}; jpayne@69: values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False))); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 671, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 671, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_data", 0, 2, 3, 1); __PYX_ERR(0, 671, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lineparse); jpayne@69: if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 671, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_data") < 0)) __PYX_ERR(0, 671, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_line = values[1]; jpayne@69: __pyx_v_lineparse = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("parse_data", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 671, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_32parse_data(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_lineparse); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_lineparse) { jpayne@69: PyObject *__pyx_v_cols = NULL; jpayne@69: PyObject *__pyx_v_chrom = NULL; jpayne@69: PyObject *__pyx_v_pos = NULL; jpayne@69: PyObject *__pyx_v_id = NULL; jpayne@69: PyObject *__pyx_v_ref = NULL; jpayne@69: PyObject *__pyx_v_c = NULL; jpayne@69: PyObject *__pyx_v_left = NULL; jpayne@69: PyObject *__pyx_v_faref_leftflank = NULL; jpayne@69: PyObject *__pyx_v_faref = NULL; jpayne@69: PyObject *__pyx_v_alt = NULL; jpayne@69: double __pyx_v_qual; jpayne@69: PyObject *__pyx_v_filter = NULL; jpayne@69: PyObject *__pyx_v_info = NULL; jpayne@69: PyObject *__pyx_v_blurp = NULL; jpayne@69: PyObject *__pyx_v_elts = NULL; jpayne@69: PyObject *__pyx_v_v = NULL; jpayne@69: PyObject *__pyx_v_format = NULL; jpayne@69: PyObject *__pyx_v_f = NULL; jpayne@69: PyObject *__pyx_v_newalts = NULL; jpayne@69: int __pyx_v_have_deletions; jpayne@69: PyObject *__pyx_v_a = NULL; jpayne@69: PyObject *__pyx_v_l = NULL; jpayne@69: PyObject *__pyx_v_addns = NULL; jpayne@69: PyObject *__pyx_v_i = NULL; jpayne@69: PyObject *__pyx_v_na = NULL; jpayne@69: PyObject *__pyx_v_s = NULL; jpayne@69: PyObject *__pyx_v_addn = NULL; jpayne@69: PyObject *__pyx_v_allele = NULL; jpayne@69: int __pyx_v_movable; jpayne@69: PyObject *__pyx_v_longest = NULL; jpayne@69: PyObject *__pyx_v_shortest = NULL; jpayne@69: PyObject *__pyx_v_samples = NULL; jpayne@69: PyObject *__pyx_v_sample = NULL; jpayne@69: PyObject *__pyx_v_dict = NULL; jpayne@69: PyObject *__pyx_v_values = NULL; jpayne@69: Py_ssize_t __pyx_v_idx; jpayne@69: PyObject *__pyx_v_expected = NULL; jpayne@69: PyObject *__pyx_v_value = NULL; jpayne@69: PyObject *__pyx_v_d = NULL; jpayne@69: PyObject *__pyx_v_key = NULL; jpayne@69: PyObject *__pyx_8genexpr3__pyx_v_allele = NULL; jpayne@69: PyObject *__pyx_8genexpr4__pyx_v_allele = NULL; jpayne@69: PyObject *__pyx_8genexpr5__pyx_v_allele = NULL; jpayne@69: PyObject *__pyx_8genexpr6__pyx_v_allele = NULL; jpayne@69: PyObject *__pyx_8genexpr7__pyx_v_allele = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: Py_ssize_t __pyx_t_5; jpayne@69: Py_ssize_t __pyx_t_6; jpayne@69: int __pyx_t_7; jpayne@69: int __pyx_t_8; jpayne@69: PyObject *__pyx_t_9 = NULL; jpayne@69: Py_UCS4 __pyx_t_10; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: PyObject *__pyx_t_13 = NULL; jpayne@69: PyObject *__pyx_t_14 = NULL; jpayne@69: PyObject *__pyx_t_15 = NULL; jpayne@69: PyObject *__pyx_t_16 = NULL; jpayne@69: int __pyx_t_17; jpayne@69: PyObject *(*__pyx_t_18)(PyObject *); jpayne@69: long __pyx_t_19; jpayne@69: double __pyx_t_20; jpayne@69: int __pyx_t_21; jpayne@69: Py_ssize_t __pyx_t_22; jpayne@69: PyObject *__pyx_t_23 = NULL; jpayne@69: PyObject *__pyx_t_24 = NULL; jpayne@69: PyObject *__pyx_t_25 = NULL; jpayne@69: int __pyx_t_26; jpayne@69: PyObject *__pyx_t_27 = NULL; jpayne@69: PyObject *__pyx_t_28 = NULL; jpayne@69: PyObject *__pyx_t_29 = NULL; jpayne@69: Py_ssize_t __pyx_t_30; jpayne@69: Py_ssize_t __pyx_t_31; jpayne@69: PyObject *(*__pyx_t_32)(PyObject *); jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("parse_data", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":672 jpayne@69: * jpayne@69: * def parse_data( self, line, lineparse=False ): jpayne@69: * cols = line.split('\t') # <<<<<<<<<<<<<< jpayne@69: * if len(cols) != len(self._samples)+9: jpayne@69: * # gracefully deal with absent FORMAT column jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__25}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_cols = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":673 jpayne@69: * def parse_data( self, line, lineparse=False ): jpayne@69: * cols = line.split('\t') jpayne@69: * if len(cols) != len(self._samples)+9: # <<<<<<<<<<<<<< jpayne@69: * # gracefully deal with absent FORMAT column jpayne@69: * # and those missing samples jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 673, __pyx_L1_error) jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 673, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_7 = (__pyx_t_5 != (__pyx_t_6 + 9)); jpayne@69: if (__pyx_t_7) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":676 jpayne@69: * # gracefully deal with absent FORMAT column jpayne@69: * # and those missing samples jpayne@69: * if len(cols) == 8: # <<<<<<<<<<<<<< jpayne@69: * cols.append("") jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 676, __pyx_L1_error) jpayne@69: __pyx_t_7 = (__pyx_t_6 == 8); jpayne@69: if (__pyx_t_7) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":677 jpayne@69: * # and those missing samples jpayne@69: * if len(cols) == 8: jpayne@69: * cols.append("") # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * self.error(line, jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_cols, __pyx_kp_u_); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 677, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":676 jpayne@69: * # gracefully deal with absent FORMAT column jpayne@69: * # and those missing samples jpayne@69: * if len(cols) == 8: # <<<<<<<<<<<<<< jpayne@69: * cols.append("") jpayne@69: * else: jpayne@69: */ jpayne@69: goto __pyx_L4; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":679 jpayne@69: * cols.append("") jpayne@69: * else: jpayne@69: * self.error(line, # <<<<<<<<<<<<<< jpayne@69: * self.BAD_NUMBER_OF_COLUMNS, jpayne@69: * "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols))) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":680 jpayne@69: * else: jpayne@69: * self.error(line, jpayne@69: * self.BAD_NUMBER_OF_COLUMNS, # <<<<<<<<<<<<<< jpayne@69: * "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols))) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BAD_NUMBER_OF_COLUMNS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 680, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":681 jpayne@69: * self.error(line, jpayne@69: * self.BAD_NUMBER_OF_COLUMNS, jpayne@69: * "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols))) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * chrom = cols[0] jpayne@69: */ jpayne@69: __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_10 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_expected_3); jpayne@69: __pyx_t_6 += 9; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_expected_3); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_expected_3); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_t_5 + 9), 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11); jpayne@69: __Pyx_GIVEREF(__pyx_t_11); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_for); jpayne@69: __pyx_t_6 += 5; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_for); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_for); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_5, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11); jpayne@69: __Pyx_GIVEREF(__pyx_t_11); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_samples_2); jpayne@69: __pyx_t_6 += 10; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_samples_2); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_kp_u_samples_2); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_11), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_10; jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); jpayne@69: __Pyx_GIVEREF(__pyx_t_12); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_got); jpayne@69: __pyx_t_6 += 7; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_got); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_kp_u_got); jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __pyx_t_12 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_5, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); jpayne@69: __Pyx_GIVEREF(__pyx_t_12); jpayne@69: PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_9, 8, __pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 681, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_line, __pyx_t_3, __pyx_t_12}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_L4:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":673 jpayne@69: * def parse_data( self, line, lineparse=False ): jpayne@69: * cols = line.split('\t') jpayne@69: * if len(cols) != len(self._samples)+9: # <<<<<<<<<<<<<< jpayne@69: * # gracefully deal with absent FORMAT column jpayne@69: * # and those missing samples jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":683 jpayne@69: * "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols))) jpayne@69: * jpayne@69: * chrom = cols[0] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # get 0-based position jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cols, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_chrom = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":686 jpayne@69: * jpayne@69: * # get 0-based position jpayne@69: * try: pos = int(cols[1])-1 # <<<<<<<<<<<<<< jpayne@69: * except: self.error(line,self.POS_NOT_NUMERICAL) jpayne@69: * if pos < 0: self.error(line,self.POS_NOT_POSITIVE) jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); jpayne@69: __Pyx_XGOTREF(__pyx_t_13); jpayne@69: __Pyx_XGOTREF(__pyx_t_14); jpayne@69: __Pyx_XGOTREF(__pyx_t_15); jpayne@69: /*try:*/ { jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cols, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L5_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L5_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L5_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_v_pos = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: goto __pyx_L10_try_end; jpayne@69: __pyx_L5_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":687 jpayne@69: * # get 0-based position jpayne@69: * try: pos = int(cols[1])-1 jpayne@69: * except: self.error(line,self.POS_NOT_NUMERICAL) # <<<<<<<<<<<<<< jpayne@69: * if pos < 0: self.error(line,self.POS_NOT_POSITIVE) jpayne@69: * jpayne@69: */ jpayne@69: /*except:*/ { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 687, __pyx_L7_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_2); jpayne@69: __Pyx_XGOTREF(__pyx_t_12); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 687, __pyx_L7_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_POS_NOT_NUMERICAL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 687, __pyx_L7_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_16 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_9))) { jpayne@69: __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9); jpayne@69: if (likely(__pyx_t_16)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_16); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_9, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_v_line, __pyx_t_11}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L7_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: goto __pyx_L6_exception_handled; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":686 jpayne@69: * jpayne@69: * # get 0-based position jpayne@69: * try: pos = int(cols[1])-1 # <<<<<<<<<<<<<< jpayne@69: * except: self.error(line,self.POS_NOT_NUMERICAL) jpayne@69: * if pos < 0: self.error(line,self.POS_NOT_POSITIVE) jpayne@69: */ jpayne@69: __pyx_L7_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_15); jpayne@69: __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L6_exception_handled:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_15); jpayne@69: __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); jpayne@69: __pyx_L10_try_end:; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":688 jpayne@69: * try: pos = int(cols[1])-1 jpayne@69: * except: self.error(line,self.POS_NOT_NUMERICAL) jpayne@69: * if pos < 0: self.error(line,self.POS_NOT_POSITIVE) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # implement filtering jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 688, __pyx_L1_error) } jpayne@69: __pyx_t_12 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 688, __pyx_L1_error) jpayne@69: __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 688, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (__pyx_t_7) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_POS_NOT_POSITIVE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_line, __pyx_t_1}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 688, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":691 jpayne@69: * jpayne@69: * # implement filtering jpayne@69: * if not self.inregion(chrom,pos): return None # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # end of first-pass parse for sortedVCF jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inregion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 691, __pyx_L1_error) } jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_chrom, __pyx_v_pos}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 691, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 691, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_17 = (!__pyx_t_7); jpayne@69: if (__pyx_t_17) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":694 jpayne@69: * jpayne@69: * # end of first-pass parse for sortedVCF jpayne@69: * if lineparse: return chrom, pos, line # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * id = cols[2] jpayne@69: */ jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_lineparse); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 694, __pyx_L1_error) jpayne@69: if (__pyx_t_17) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 694, __pyx_L1_error) } jpayne@69: __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 694, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(__pyx_v_chrom); jpayne@69: __Pyx_GIVEREF(__pyx_v_chrom); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_chrom)) __PYX_ERR(0, 694, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_pos); jpayne@69: __Pyx_GIVEREF(__pyx_v_pos); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_pos)) __PYX_ERR(0, 694, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_line); jpayne@69: __Pyx_GIVEREF(__pyx_v_line); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_line)) __PYX_ERR(0, 694, __pyx_L1_error); jpayne@69: __pyx_r = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":696 jpayne@69: * if lineparse: return chrom, pos, line jpayne@69: * jpayne@69: * id = cols[2] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * ref = cols[3].upper() jpayne@69: */ jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 696, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_v_id = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":698 jpayne@69: * id = cols[2] jpayne@69: * jpayne@69: * ref = cols[3].upper() # <<<<<<<<<<<<<< jpayne@69: * if ref == ".": jpayne@69: * self.error(line,self.MISSING_REF) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_2)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 698, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_v_ref = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":699 jpayne@69: * jpayne@69: * ref = cols[3].upper() jpayne@69: * if ref == ".": # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.MISSING_REF) jpayne@69: * if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference) jpayne@69: */ jpayne@69: __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_v_ref, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 699, __pyx_L1_error) jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":700 jpayne@69: * ref = cols[3].upper() jpayne@69: * if ref == ".": jpayne@69: * self.error(line,self.MISSING_REF) # <<<<<<<<<<<<<< jpayne@69: * if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference) jpayne@69: * else: ref = "" jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MISSING_REF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_line, __pyx_t_2}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 700, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":701 jpayne@69: * if ref == ".": jpayne@69: * self.error(line,self.MISSING_REF) jpayne@69: * if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference) # <<<<<<<<<<<<<< jpayne@69: * else: ref = "" jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 701, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_17 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_12, __pyx_int_33, 33, 0)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 701, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 701, __pyx_L1_error) } jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 701, __pyx_L1_error) } jpayne@69: __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_pos, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_v_chrom, __pyx_v_pos, __pyx_t_2, __pyx_t_3}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 701, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: goto __pyx_L17; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":702 jpayne@69: * self.error(line,self.MISSING_REF) jpayne@69: * if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference) jpayne@69: * else: ref = "" # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * for c in ref: jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __Pyx_INCREF(__pyx_kp_u_); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_kp_u_); jpayne@69: } jpayne@69: __pyx_L17:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":699 jpayne@69: * jpayne@69: * ref = cols[3].upper() jpayne@69: * if ref == ".": # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.MISSING_REF) jpayne@69: * if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference) jpayne@69: */ jpayne@69: goto __pyx_L16; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":704 jpayne@69: * else: ref = "" jpayne@69: * else: jpayne@69: * for c in ref: # <<<<<<<<<<<<<< jpayne@69: * if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF) jpayne@69: * if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: if (likely(PyList_CheckExact(__pyx_v_ref)) || PyTuple_CheckExact(__pyx_v_ref)) { jpayne@69: __pyx_t_12 = __pyx_v_ref; __Pyx_INCREF(__pyx_t_12); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_ref); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_12))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_18(__pyx_t_12); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 704, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":705 jpayne@69: * else: jpayne@69: * for c in ref: jpayne@69: * if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF) # <<<<<<<<<<<<<< jpayne@69: * if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_17 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_c, __pyx_n_u_ACGTN, Py_NE)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 705, __pyx_L1_error) jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_UNKNOWN_CHAR_IN_REF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_line, __pyx_t_2}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":704 jpayne@69: * else: ref = "" jpayne@69: * else: jpayne@69: * for c in ref: # <<<<<<<<<<<<<< jpayne@69: * if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF) jpayne@69: * if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference) jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":706 jpayne@69: * for c in ref: jpayne@69: * if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF) jpayne@69: * if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # make sure reference is sane jpayne@69: */ jpayne@69: __pyx_t_17 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_N, __pyx_v_ref, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 706, __pyx_L1_error) jpayne@69: if (__pyx_t_17) { jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 706, __pyx_L1_error) } jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 706, __pyx_L1_error) } jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 706, __pyx_L1_error) jpayne@69: __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = PyNumber_Add(__pyx_v_pos, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_v_chrom, __pyx_v_pos, __pyx_t_2, __pyx_t_3}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 706, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: } jpayne@69: } jpayne@69: __pyx_L16:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":709 jpayne@69: * jpayne@69: * # make sure reference is sane jpayne@69: * if self._reference: # <<<<<<<<<<<<<< jpayne@69: * left = max(0,pos-100) jpayne@69: * faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference) jpayne@69: */ jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 709, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 709, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":710 jpayne@69: * # make sure reference is sane jpayne@69: * if self._reference: jpayne@69: * left = max(0,pos-100) # <<<<<<<<<<<<<< jpayne@69: * faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference) jpayne@69: * faref = faref_leftflank[pos-left:] jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 710, __pyx_L1_error) } jpayne@69: __pyx_t_12 = __Pyx_PyInt_SubtractObjC(__pyx_v_pos, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 710, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_19 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = PyObject_RichCompare(__pyx_t_12, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 710, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __pyx_t_1 = __pyx_t_12; jpayne@69: } else { jpayne@69: __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = __pyx_t_1; jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_v_left = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":711 jpayne@69: * if self._reference: jpayne@69: * left = max(0,pos-100) jpayne@69: * faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference) # <<<<<<<<<<<<<< jpayne@69: * faref = faref_leftflank[pos-left:] jpayne@69: * if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref)) jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 711, __pyx_L1_error) } jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 711, __pyx_L1_error) jpayne@69: __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyNumber_Add(__pyx_v_pos, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_v_chrom, __pyx_v_left, __pyx_t_3, __pyx_t_2}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 711, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_v_faref_leftflank = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":712 jpayne@69: * left = max(0,pos-100) jpayne@69: * faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference) jpayne@69: * faref = faref_leftflank[pos-left:] # <<<<<<<<<<<<<< jpayne@69: * if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref)) jpayne@69: * ref = faref jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 712, __pyx_L1_error) } jpayne@69: __pyx_t_12 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 712, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_faref_leftflank, 0, 0, &__pyx_t_12, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_v_faref = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":713 jpayne@69: * faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference) jpayne@69: * faref = faref_leftflank[pos-left:] jpayne@69: * if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref)) # <<<<<<<<<<<<<< jpayne@69: * ref = faref jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_v_faref, __pyx_v_ref, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_WRONG_REF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_10 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_reference_is); jpayne@69: __pyx_t_6 += 14; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_reference_is); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_reference_is); jpayne@69: __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_faref), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_10; jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_VCF_says); jpayne@69: __pyx_t_6 += 11; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_VCF_says); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_VCF_says); jpayne@69: __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_ref), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_10; jpayne@69: __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__8); jpayne@69: __pyx_t_6 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__8); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__8); jpayne@69: __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_12))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_12, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_line, __pyx_t_2, __pyx_t_9}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":714 jpayne@69: * faref = faref_leftflank[pos-left:] jpayne@69: * if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref)) jpayne@69: * ref = faref # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # convert v3.3 to v4.0 alleles below jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_v_faref); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_v_faref); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":709 jpayne@69: * jpayne@69: * # make sure reference is sane jpayne@69: * if self._reference: # <<<<<<<<<<<<<< jpayne@69: * left = max(0,pos-100) jpayne@69: * faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":717 jpayne@69: * jpayne@69: * # convert v3.3 to v4.0 alleles below jpayne@69: * if cols[4] == ".": alt = [] # <<<<<<<<<<<<<< jpayne@69: * else: alt = cols[4].upper().split(',') jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cols, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 717, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_v_alt = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L25; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":718 jpayne@69: * # convert v3.3 to v4.0 alleles below jpayne@69: * if cols[4] == ".": alt = [] jpayne@69: * else: alt = cols[4].upper().split(',') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * if cols[5] == ".": qual = -1 jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 718, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 718, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_u__2}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_alt = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_L25:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":720 jpayne@69: * else: alt = cols[4].upper().split(',') jpayne@69: * jpayne@69: * if cols[5] == ".": qual = -1 # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * try: qual = float(cols[5]) jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cols, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 720, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_v_qual = -1.0; jpayne@69: goto __pyx_L26; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":722 jpayne@69: * if cols[5] == ".": qual = -1 jpayne@69: * else: jpayne@69: * try: qual = float(cols[5]) # <<<<<<<<<<<<<< jpayne@69: * except: self.error(line,self.QUAL_NOT_NUMERICAL) jpayne@69: * jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); jpayne@69: __Pyx_XGOTREF(__pyx_t_15); jpayne@69: __Pyx_XGOTREF(__pyx_t_14); jpayne@69: __Pyx_XGOTREF(__pyx_t_13); jpayne@69: /*try:*/ { jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cols, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L27_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_20 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_20 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L27_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_v_qual = __pyx_t_20; jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: goto __pyx_L32_try_end; jpayne@69: __pyx_L27_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":723 jpayne@69: * else: jpayne@69: * try: qual = float(cols[5]) jpayne@69: * except: self.error(line,self.QUAL_NOT_NUMERICAL) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # postpone checking that filters exist. Encode missing filter or no filtering as empty list jpayne@69: */ jpayne@69: /*except:*/ { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 723, __pyx_L29_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_2); jpayne@69: __Pyx_XGOTREF(__pyx_t_12); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L29_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 723, __pyx_L29_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_16 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_16)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_16); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_v_line, __pyx_t_11}; jpayne@69: __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 723, __pyx_L29_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: goto __pyx_L28_exception_handled; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":722 jpayne@69: * if cols[5] == ".": qual = -1 jpayne@69: * else: jpayne@69: * try: qual = float(cols[5]) # <<<<<<<<<<<<<< jpayne@69: * except: self.error(line,self.QUAL_NOT_NUMERICAL) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_L29_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_15); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L28_exception_handled:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_15); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); jpayne@69: __pyx_L32_try_end:; jpayne@69: } jpayne@69: } jpayne@69: __pyx_L26:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":726 jpayne@69: * jpayne@69: * # postpone checking that filters exist. Encode missing filter or no filtering as empty list jpayne@69: * if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = [] # <<<<<<<<<<<<<< jpayne@69: * else: filter = cols[6].split(';') jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 726, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 726, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (!__pyx_t_7) { jpayne@69: } else { jpayne@69: __pyx_t_17 = __pyx_t_7; jpayne@69: goto __pyx_L36_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 726, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_PASS, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 726, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (!__pyx_t_7) { jpayne@69: } else { jpayne@69: __pyx_t_17 = __pyx_t_7; jpayne@69: goto __pyx_L36_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 726, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_0, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 726, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_17 = __pyx_t_7; jpayne@69: __pyx_L36_bool_binop_done:; jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 726, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_v_filter = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: goto __pyx_L35; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":727 jpayne@69: * # postpone checking that filters exist. Encode missing filter or no filtering as empty list jpayne@69: * if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = [] jpayne@69: * else: filter = cols[6].split(';') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # dictionary of keys, and list of values jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_2)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u__6}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 727, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_v_filter = __pyx_t_12; jpayne@69: __pyx_t_12 = 0; jpayne@69: } jpayne@69: __pyx_L35:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":730 jpayne@69: * jpayne@69: * # dictionary of keys, and list of values jpayne@69: * info = {} # <<<<<<<<<<<<<< jpayne@69: * if cols[7] != ".": jpayne@69: * for blurp in cols[7].split(';'): jpayne@69: */ jpayne@69: __pyx_t_12 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 730, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_v_info = ((PyObject*)__pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":731 jpayne@69: * # dictionary of keys, and list of values jpayne@69: * info = {} jpayne@69: * if cols[7] != ".": # <<<<<<<<<<<<<< jpayne@69: * for blurp in cols[7].split(';'): jpayne@69: * elts = blurp.split('=') jpayne@69: */ jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 731, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u__5, Py_NE)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 731, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":732 jpayne@69: * info = {} jpayne@69: * if cols[7] != ".": jpayne@69: * for blurp in cols[7].split(';'): # <<<<<<<<<<<<<< jpayne@69: * elts = blurp.split('=') jpayne@69: * if len(elts) == 1: v = None jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cols, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_u__6}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { jpayne@69: __pyx_t_2 = __pyx_t_12; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_12 = __pyx_t_18(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_12)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 732, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_blurp, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":733 jpayne@69: * if cols[7] != ".": jpayne@69: * for blurp in cols[7].split(';'): jpayne@69: * elts = blurp.split('=') # <<<<<<<<<<<<<< jpayne@69: * if len(elts) == 1: v = None jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_blurp, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_kp_u__7}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 733, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_elts, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":734 jpayne@69: * for blurp in cols[7].split(';'): jpayne@69: * elts = blurp.split('=') jpayne@69: * if len(elts) == 1: v = None # <<<<<<<<<<<<<< jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: * else: self.error(line,self.ERROR_INFO_STRING) jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 734, __pyx_L1_error) jpayne@69: __pyx_t_17 = (__pyx_t_5 == 1); jpayne@69: if (__pyx_t_17) { jpayne@69: __Pyx_INCREF(Py_None); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, Py_None); jpayne@69: goto __pyx_L42; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":735 jpayne@69: * elts = blurp.split('=') jpayne@69: * if len(elts) == 1: v = None jpayne@69: * elif len(elts) == 2: v = elts[1] # <<<<<<<<<<<<<< jpayne@69: * else: self.error(line,self.ERROR_INFO_STRING) jpayne@69: * info[elts[0]] = self.parse_formatdata(elts[0], jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 735, __pyx_L1_error) jpayne@69: __pyx_t_17 = (__pyx_t_5 == 2); jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_elts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 735, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: goto __pyx_L42; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":736 jpayne@69: * if len(elts) == 1: v = None jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: * else: self.error(line,self.ERROR_INFO_STRING) # <<<<<<<<<<<<<< jpayne@69: * info[elts[0]] = self.parse_formatdata(elts[0], jpayne@69: * v, jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERROR_INFO_STRING); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 736, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_line, __pyx_t_9}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 736, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __pyx_L42:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":737 jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: * else: self.error(line,self.ERROR_INFO_STRING) jpayne@69: * info[elts[0]] = self.parse_formatdata(elts[0], # <<<<<<<<<<<<<< jpayne@69: * v, jpayne@69: * self._info, jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_formatdata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 737, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":738 jpayne@69: * else: self.error(line,self.ERROR_INFO_STRING) jpayne@69: * info[elts[0]] = self.parse_formatdata(elts[0], jpayne@69: * v, # <<<<<<<<<<<<<< jpayne@69: * self._info, jpayne@69: * line) jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_v)) { __Pyx_RaiseUnboundLocalError("v"); __PYX_ERR(0, 738, __pyx_L1_error) } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":739 jpayne@69: * info[elts[0]] = self.parse_formatdata(elts[0], jpayne@69: * v, jpayne@69: * self._info, # <<<<<<<<<<<<<< jpayne@69: * line) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":740 jpayne@69: * v, jpayne@69: * self._info, jpayne@69: * line) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # Gracefully deal with absent FORMAT column jpayne@69: */ jpayne@69: __pyx_t_11 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_11)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_11, __pyx_t_9, __pyx_v_v, __pyx_t_3, __pyx_v_line}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 737, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":737 jpayne@69: * elif len(elts) == 2: v = elts[1] jpayne@69: * else: self.error(line,self.ERROR_INFO_STRING) jpayne@69: * info[elts[0]] = self.parse_formatdata(elts[0], # <<<<<<<<<<<<<< jpayne@69: * v, jpayne@69: * self._info, jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_info, __pyx_t_1, __pyx_t_12) < 0))) __PYX_ERR(0, 737, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":732 jpayne@69: * info = {} jpayne@69: * if cols[7] != ".": jpayne@69: * for blurp in cols[7].split(';'): # <<<<<<<<<<<<<< jpayne@69: * elts = blurp.split('=') jpayne@69: * if len(elts) == 1: v = None jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":731 jpayne@69: * # dictionary of keys, and list of values jpayne@69: * info = {} jpayne@69: * if cols[7] != ".": # <<<<<<<<<<<<<< jpayne@69: * for blurp in cols[7].split(';'): jpayne@69: * elts = blurp.split('=') jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":743 jpayne@69: * jpayne@69: * # Gracefully deal with absent FORMAT column jpayne@69: * if cols[8] == "": format = [] # <<<<<<<<<<<<<< jpayne@69: * else: format = cols[8].split(':') jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_17 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 743, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_v_format = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: goto __pyx_L44; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":744 jpayne@69: * # Gracefully deal with absent FORMAT column jpayne@69: * if cols[8] == "": format = [] jpayne@69: * else: format = cols[8].split(':') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # check: all filters are defined jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_cols, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 744, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_u__3}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_v_format = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_L44:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":747 jpayne@69: * jpayne@69: * # check: all filters are defined jpayne@69: * for f in filter: # <<<<<<<<<<<<<< jpayne@69: * if f not in self._filter: self.error(line,self.FILTER_NOT_DEFINED, f) jpayne@69: * jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_filter)) || PyTuple_CheckExact(__pyx_v_filter)) { jpayne@69: __pyx_t_2 = __pyx_v_filter; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_filter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_18(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 747, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":748 jpayne@69: * # check: all filters are defined jpayne@69: * for f in filter: jpayne@69: * if f not in self._filter: self.error(line,self.FILTER_NOT_DEFINED, f) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # check: format fields are defined jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_17 = (__Pyx_PySequence_ContainsTF(__pyx_v_f, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 748, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 748, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FILTER_NOT_DEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_12))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_12, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_line, __pyx_t_3, __pyx_v_f}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":747 jpayne@69: * jpayne@69: * # check: all filters are defined jpayne@69: * for f in filter: # <<<<<<<<<<<<<< jpayne@69: * if f not in self._filter: self.error(line,self.FILTER_NOT_DEFINED, f) jpayne@69: * jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":751 jpayne@69: * jpayne@69: * # check: format fields are defined jpayne@69: * if self._format: # <<<<<<<<<<<<<< jpayne@69: * for f in format: jpayne@69: * if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 751, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":752 jpayne@69: * # check: format fields are defined jpayne@69: * if self._format: jpayne@69: * for f in format: # <<<<<<<<<<<<<< jpayne@69: * if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f) jpayne@69: * jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_format)) || PyTuple_CheckExact(__pyx_v_format)) { jpayne@69: __pyx_t_2 = __pyx_v_format; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_18(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 752, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":753 jpayne@69: * if self._format: jpayne@69: * for f in format: jpayne@69: * if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # convert v3.3 alleles jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_17 = (__Pyx_PySequence_ContainsTF(__pyx_v_f, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 753, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 753, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_FORMAT_NOT_DEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 753, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_12))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_12, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_line, __pyx_t_3, __pyx_v_f}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":752 jpayne@69: * # check: format fields are defined jpayne@69: * if self._format: jpayne@69: * for f in format: # <<<<<<<<<<<<<< jpayne@69: * if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f) jpayne@69: * jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":751 jpayne@69: * jpayne@69: * # check: format fields are defined jpayne@69: * if self._format: # <<<<<<<<<<<<<< jpayne@69: * for f in format: jpayne@69: * if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":756 jpayne@69: * jpayne@69: * # convert v3.3 alleles jpayne@69: * if self._version == 33: # <<<<<<<<<<<<<< jpayne@69: * if len(ref) != 1: self.error(line,self.V33_BAD_REF) jpayne@69: * newalts = [] jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_17 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_2, __pyx_int_33, 33, 0)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 756, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":757 jpayne@69: * # convert v3.3 alleles jpayne@69: * if self._version == 33: jpayne@69: * if len(ref) != 1: self.error(line,self.V33_BAD_REF) # <<<<<<<<<<<<<< jpayne@69: * newalts = [] jpayne@69: * have_deletions = False jpayne@69: */ jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 757, __pyx_L1_error) jpayne@69: __pyx_t_17 = (__pyx_t_6 != 1); jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V33_BAD_REF); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 757, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_line, __pyx_t_12}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":758 jpayne@69: * if self._version == 33: jpayne@69: * if len(ref) != 1: self.error(line,self.V33_BAD_REF) jpayne@69: * newalts = [] # <<<<<<<<<<<<<< jpayne@69: * have_deletions = False jpayne@69: * for a in alt: jpayne@69: */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_v_newalts = ((PyObject*)__pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":759 jpayne@69: * if len(ref) != 1: self.error(line,self.V33_BAD_REF) jpayne@69: * newalts = [] jpayne@69: * have_deletions = False # <<<<<<<<<<<<<< jpayne@69: * for a in alt: jpayne@69: * if len(a) == 1: a = a + ref[1:] # SNP; add trailing reference jpayne@69: */ jpayne@69: __pyx_v_have_deletions = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":760 jpayne@69: * newalts = [] jpayne@69: * have_deletions = False jpayne@69: * for a in alt: # <<<<<<<<<<<<<< jpayne@69: * if len(a) == 1: a = a + ref[1:] # SNP; add trailing reference jpayne@69: * elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:] # insertion just beyond pos; add first and trailing reference jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_18(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 760, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":761 jpayne@69: * have_deletions = False jpayne@69: * for a in alt: jpayne@69: * if len(a) == 1: a = a + ref[1:] # SNP; add trailing reference # <<<<<<<<<<<<<< jpayne@69: * elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:] # insertion just beyond pos; add first and trailing reference jpayne@69: * elif a.startswith('D'): # allow D and D jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 761, __pyx_L1_error) jpayne@69: __pyx_t_17 = (__pyx_t_5 == 1); jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_ref, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = PyNumber_Add(__pyx_v_a, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 761, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: goto __pyx_L58; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":762 jpayne@69: * for a in alt: jpayne@69: * if len(a) == 1: a = a + ref[1:] # SNP; add trailing reference jpayne@69: * elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:] # insertion just beyond pos; add first and trailing reference # <<<<<<<<<<<<<< jpayne@69: * elif a.startswith('D'): # allow D and D jpayne@69: * have_deletions = True jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_u_I}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 762, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 762, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_ref, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 762, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_a, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = PyNumber_Add(__pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_ref, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 762, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: goto __pyx_L58; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":763 jpayne@69: * if len(a) == 1: a = a + ref[1:] # SNP; add trailing reference jpayne@69: * elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:] # insertion just beyond pos; add first and trailing reference jpayne@69: * elif a.startswith('D'): # allow D and D # <<<<<<<<<<<<<< jpayne@69: * have_deletions = True jpayne@69: * try: jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_u_D}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 763, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 763, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":764 jpayne@69: * elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:] # insertion just beyond pos; add first and trailing reference jpayne@69: * elif a.startswith('D'): # allow D and D jpayne@69: * have_deletions = True # <<<<<<<<<<<<<< jpayne@69: * try: jpayne@69: * l = int(a[1:]) # throws ValueError if sequence jpayne@69: */ jpayne@69: __pyx_v_have_deletions = 1; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":765 jpayne@69: * elif a.startswith('D'): # allow D and D jpayne@69: * have_deletions = True jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * l = int(a[1:]) # throws ValueError if sequence jpayne@69: * if len(ref) < l: # add to reference if necessary jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); jpayne@69: __Pyx_XGOTREF(__pyx_t_13); jpayne@69: __Pyx_XGOTREF(__pyx_t_14); jpayne@69: __Pyx_XGOTREF(__pyx_t_15); jpayne@69: /*try:*/ { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":766 jpayne@69: * have_deletions = True jpayne@69: * try: jpayne@69: * l = int(a[1:]) # throws ValueError if sequence # <<<<<<<<<<<<<< jpayne@69: * if len(ref) < l: # add to reference if necessary jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference) jpayne@69: */ jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_a, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 766, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":767 jpayne@69: * try: jpayne@69: * l = int(a[1:]) # throws ValueError if sequence jpayne@69: * if len(ref) < l: # add to reference if necessary # <<<<<<<<<<<<<< jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference) jpayne@69: * ref += addns jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 767, __pyx_L59_error) jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = PyObject_RichCompare(__pyx_t_1, __pyx_v_l, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 767, __pyx_L59_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 767, __pyx_L59_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":768 jpayne@69: * l = int(a[1:]) # throws ValueError if sequence jpayne@69: * if len(ref) < l: # add to reference if necessary jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference) # <<<<<<<<<<<<<< jpayne@69: * ref += addns jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 768, __pyx_L59_error) } jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 768, __pyx_L59_error) jpayne@69: __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 768, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = PyNumber_Add(__pyx_v_pos, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 768, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 768, __pyx_L59_error) } jpayne@69: __pyx_t_3 = PyNumber_Add(__pyx_v_pos, __pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 768, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 768, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_16 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_16)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_16); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_16, __pyx_v_chrom, __pyx_t_9, __pyx_t_3, __pyx_t_11}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 768, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_addns, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":769 jpayne@69: * if len(ref) < l: # add to reference if necessary jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference) jpayne@69: * ref += addns # <<<<<<<<<<<<<< jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns jpayne@69: * a = ref[l:] # new deletion, deleting pos...pos+l jpayne@69: */ jpayne@69: __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 769, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":770 jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference) jpayne@69: * ref += addns jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns # <<<<<<<<<<<<<< jpayne@69: * a = ref[l:] # new deletion, deleting pos...pos+l jpayne@69: * except ValueError: jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_t_12 = __pyx_int_0; jpayne@69: __pyx_t_1 = __pyx_v_newalts; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_5 = 0; jpayne@69: for (;;) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 770, __pyx_L59_error) jpayne@69: #endif jpayne@69: if (__pyx_t_5 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 770, __pyx_L59_error) jpayne@69: #else jpayne@69: __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 770, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: #endif jpayne@69: __Pyx_XDECREF_SET(__pyx_v_na, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_12); jpayne@69: __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_t_12, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 770, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_12); jpayne@69: __pyx_t_12 = __pyx_t_11; jpayne@69: __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 770, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_newalts, __pyx_v_i, __pyx_t_11) < 0))) __PYX_ERR(0, 770, __pyx_L59_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":767 jpayne@69: * try: jpayne@69: * l = int(a[1:]) # throws ValueError if sequence jpayne@69: * if len(ref) < l: # add to reference if necessary # <<<<<<<<<<<<<< jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference) jpayne@69: * ref += addns jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":771 jpayne@69: * ref += addns jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns jpayne@69: * a = ref[l:] # new deletion, deleting pos...pos+l # <<<<<<<<<<<<<< jpayne@69: * except ValueError: jpayne@69: * s = a[1:] jpayne@69: */ jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_ref, 0, 0, &__pyx_v_l, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 771, __pyx_L59_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":765 jpayne@69: * elif a.startswith('D'): # allow D and D jpayne@69: * have_deletions = True jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * l = int(a[1:]) # throws ValueError if sequence jpayne@69: * if len(ref) < l: # add to reference if necessary jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; jpayne@69: goto __pyx_L66_try_end; jpayne@69: __pyx_L59_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":772 jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns jpayne@69: * a = ref[l:] # new deletion, deleting pos...pos+l jpayne@69: * except ValueError: # <<<<<<<<<<<<<< jpayne@69: * s = a[1:] jpayne@69: * if len(ref) < len(s): # add Ns to reference if necessary jpayne@69: */ jpayne@69: __pyx_t_21 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); jpayne@69: if (__pyx_t_21) { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_1, &__pyx_t_11) < 0) __PYX_ERR(0, 772, __pyx_L61_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_12); jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_11); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":773 jpayne@69: * a = ref[l:] # new deletion, deleting pos...pos+l jpayne@69: * except ValueError: jpayne@69: * s = a[1:] # <<<<<<<<<<<<<< jpayne@69: * if len(ref) < len(s): # add Ns to reference if necessary jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_a, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":774 jpayne@69: * except ValueError: jpayne@69: * s = a[1:] jpayne@69: * if len(ref) < len(s): # add Ns to reference if necessary # <<<<<<<<<<<<<< jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference) jpayne@69: * if not s.endswith(addns) and addns != 'N'*len(addns): jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 774, __pyx_L61_except_error) jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 774, __pyx_L61_except_error) jpayne@69: __pyx_t_17 = (__pyx_t_5 < __pyx_t_22); jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":775 jpayne@69: * s = a[1:] jpayne@69: * if len(ref) < len(s): # add Ns to reference if necessary jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference) # <<<<<<<<<<<<<< jpayne@69: * if not s.endswith(addns) and addns != 'N'*len(addns): jpayne@69: * self.error(line,self.V33_UNMATCHED_DELETION, jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 775, __pyx_L61_except_error) } jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __pyx_t_16 = PyInt_FromSsize_t(__pyx_t_22); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_23 = PyNumber_Add(__pyx_v_pos, __pyx_t_16); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_23); jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 775, __pyx_L61_except_error) } jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __pyx_t_16 = PyInt_FromSsize_t(__pyx_t_22); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_24 = PyNumber_Add(__pyx_v_pos, __pyx_t_16); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_24); jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: __pyx_t_25 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_9))) { jpayne@69: __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_9); jpayne@69: if (likely(__pyx_t_25)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_25); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_9, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_25, __pyx_v_chrom, __pyx_t_23, __pyx_t_24, __pyx_t_16}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_addns, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":776 jpayne@69: * if len(ref) < len(s): # add Ns to reference if necessary jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference) jpayne@69: * if not s.endswith(addns) and addns != 'N'*len(addns): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.V33_UNMATCHED_DELETION, jpayne@69: * "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference))) jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_endswith); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 776, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_16 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_9))) { jpayne@69: __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9); jpayne@69: if (likely(__pyx_t_16)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_16); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_9, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_addns}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: } jpayne@69: __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 776, __pyx_L61_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_26 = (!__pyx_t_7); jpayne@69: if (__pyx_t_26) { jpayne@69: } else { jpayne@69: __pyx_t_17 = __pyx_t_26; jpayne@69: goto __pyx_L75_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_addns); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 776, __pyx_L61_except_error) jpayne@69: __pyx_t_3 = __Pyx_PySequence_Multiply(__pyx_n_u_N, __pyx_t_22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_26 = (__Pyx_PyUnicode_Equals(__pyx_v_addns, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 776, __pyx_L61_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_17 = __pyx_t_26; jpayne@69: __pyx_L75_bool_binop_done:; jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":777 jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference) jpayne@69: * if not s.endswith(addns) and addns != 'N'*len(addns): jpayne@69: * self.error(line,self.V33_UNMATCHED_DELETION, # <<<<<<<<<<<<<< jpayne@69: * "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference))) jpayne@69: * ref += addns jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 777, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V33_UNMATCHED_DELETION); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 777, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_16); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":778 jpayne@69: * if not s.endswith(addns) and addns != 'N'*len(addns): jpayne@69: * self.error(line,self.V33_UNMATCHED_DELETION, jpayne@69: * "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference))) # <<<<<<<<<<<<<< jpayne@69: * ref += addns jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns jpayne@69: */ jpayne@69: __pyx_t_24 = PyTuple_New(5); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_24); jpayne@69: __pyx_t_22 = 0; jpayne@69: __pyx_t_10 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_deletion_is); jpayne@69: __pyx_t_22 += 13; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_deletion_is); jpayne@69: PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_kp_u_deletion_is); jpayne@69: __pyx_t_23 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_a), __pyx_empty_unicode); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_23); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23) : __pyx_t_10; jpayne@69: __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23); jpayne@69: __Pyx_GIVEREF(__pyx_t_23); jpayne@69: PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_23); jpayne@69: __pyx_t_23 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_reference_is_2); jpayne@69: __pyx_t_22 += 15; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_reference_is_2); jpayne@69: PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_kp_u_reference_is_2); jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 778, __pyx_L61_except_error) } jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 778, __pyx_L61_except_error) } jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __pyx_t_27 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_27); jpayne@69: __pyx_t_28 = PyNumber_Add(__pyx_v_pos, __pyx_t_27); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_28); jpayne@69: __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; jpayne@69: __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_27); jpayne@69: __pyx_t_29 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_25))) { jpayne@69: __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_25); jpayne@69: if (likely(__pyx_t_29)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25); jpayne@69: __Pyx_INCREF(__pyx_t_29); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_25, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_29, __pyx_v_chrom, __pyx_v_pos, __pyx_t_28, __pyx_t_27}; jpayne@69: __pyx_t_23 = __Pyx_PyObject_FastCall(__pyx_t_25, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; jpayne@69: if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_23); jpayne@69: __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; jpayne@69: } jpayne@69: __pyx_t_25 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_23), __pyx_empty_unicode); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) : __pyx_t_10; jpayne@69: __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25); jpayne@69: __Pyx_GIVEREF(__pyx_t_25); jpayne@69: PyTuple_SET_ITEM(__pyx_t_24, 3, __pyx_t_25); jpayne@69: __pyx_t_25 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__8); jpayne@69: __pyx_t_22 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__8); jpayne@69: PyTuple_SET_ITEM(__pyx_t_24, 4, __pyx_kp_u__8); jpayne@69: __pyx_t_25 = __Pyx_PyUnicode_Join(__pyx_t_24, 5, __pyx_t_22, __pyx_t_10); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 778, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; jpayne@69: __pyx_t_24 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_9))) { jpayne@69: __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_9); jpayne@69: if (likely(__pyx_t_24)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_24); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_9, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_24, __pyx_v_line, __pyx_t_16, __pyx_t_25}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":776 jpayne@69: * if len(ref) < len(s): # add Ns to reference if necessary jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference) jpayne@69: * if not s.endswith(addns) and addns != 'N'*len(addns): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.V33_UNMATCHED_DELETION, jpayne@69: * "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference))) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":779 jpayne@69: * self.error(line,self.V33_UNMATCHED_DELETION, jpayne@69: * "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference))) jpayne@69: * ref += addns # <<<<<<<<<<<<<< jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns jpayne@69: * a = ref[len(s):] # new deletion, deleting from pos jpayne@69: */ jpayne@69: __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":780 jpayne@69: * "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference))) jpayne@69: * ref += addns jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns # <<<<<<<<<<<<<< jpayne@69: * a = ref[len(s):] # new deletion, deleting from pos jpayne@69: * else: jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_int_0); jpayne@69: __pyx_t_3 = __pyx_int_0; jpayne@69: __pyx_t_9 = __pyx_v_newalts; __Pyx_INCREF(__pyx_t_9); jpayne@69: __pyx_t_22 = 0; jpayne@69: for (;;) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 780, __pyx_L61_except_error) jpayne@69: #endif jpayne@69: if (__pyx_t_22 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_25 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_22); __Pyx_INCREF(__pyx_t_25); __pyx_t_22++; if (unlikely((0 < 0))) __PYX_ERR(0, 780, __pyx_L61_except_error) jpayne@69: #else jpayne@69: __pyx_t_25 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 780, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: #endif jpayne@69: __Pyx_XDECREF_SET(__pyx_v_na, __pyx_t_25); jpayne@69: __pyx_t_25 = 0; jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); jpayne@69: __pyx_t_25 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 780, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __Pyx_DECREF(__pyx_t_3); jpayne@69: __pyx_t_3 = __pyx_t_25; jpayne@69: __pyx_t_25 = 0; jpayne@69: __pyx_t_25 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 780, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: if (unlikely((PyObject_SetItem(__pyx_v_newalts, __pyx_v_i, __pyx_t_25) < 0))) __PYX_ERR(0, 780, __pyx_L61_except_error) jpayne@69: __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":774 jpayne@69: * except ValueError: jpayne@69: * s = a[1:] jpayne@69: * if len(ref) < len(s): # add Ns to reference if necessary # <<<<<<<<<<<<<< jpayne@69: * addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference) jpayne@69: * if not s.endswith(addns) and addns != 'N'*len(addns): jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":781 jpayne@69: * ref += addns jpayne@69: * for i,na in enumerate(newalts): newalts[i] = na+addns jpayne@69: * a = ref[len(s):] # new deletion, deleting from pos # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * self.error(line,self.V33_BAD_ALLELE) jpayne@69: */ jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 781, __pyx_L61_except_error) jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_ref, __pyx_t_22, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __pyx_L61_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: goto __pyx_L60_exception_handled; jpayne@69: } jpayne@69: goto __pyx_L61_except_error; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":765 jpayne@69: * elif a.startswith('D'): # allow D and D jpayne@69: * have_deletions = True jpayne@69: * try: # <<<<<<<<<<<<<< jpayne@69: * l = int(a[1:]) # throws ValueError if sequence jpayne@69: * if len(ref) < l: # add to reference if necessary jpayne@69: */ jpayne@69: __pyx_L61_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_15); jpayne@69: __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L60_exception_handled:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_13); jpayne@69: __Pyx_XGIVEREF(__pyx_t_14); jpayne@69: __Pyx_XGIVEREF(__pyx_t_15); jpayne@69: __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); jpayne@69: __pyx_L66_try_end:; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":763 jpayne@69: * if len(a) == 1: a = a + ref[1:] # SNP; add trailing reference jpayne@69: * elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:] # insertion just beyond pos; add first and trailing reference jpayne@69: * elif a.startswith('D'): # allow D and D # <<<<<<<<<<<<<< jpayne@69: * have_deletions = True jpayne@69: * try: jpayne@69: */ jpayne@69: goto __pyx_L58; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":783 jpayne@69: * a = ref[len(s):] # new deletion, deleting from pos jpayne@69: * else: jpayne@69: * self.error(line,self.V33_BAD_ALLELE) # <<<<<<<<<<<<<< jpayne@69: * newalts.append(a) jpayne@69: * alt = newalts jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V33_BAD_ALLELE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 783, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_line, __pyx_t_12}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 783, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __pyx_L58:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":784 jpayne@69: * else: jpayne@69: * self.error(line,self.V33_BAD_ALLELE) jpayne@69: * newalts.append(a) # <<<<<<<<<<<<<< jpayne@69: * alt = newalts jpayne@69: * # deletion alleles exist, add dummy 1st reference allele, and account for leading base jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_newalts, __pyx_v_a); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 784, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":760 jpayne@69: * newalts = [] jpayne@69: * have_deletions = False jpayne@69: * for a in alt: # <<<<<<<<<<<<<< jpayne@69: * if len(a) == 1: a = a + ref[1:] # SNP; add trailing reference jpayne@69: * elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:] # insertion just beyond pos; add first and trailing reference jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":785 jpayne@69: * self.error(line,self.V33_BAD_ALLELE) jpayne@69: * newalts.append(a) jpayne@69: * alt = newalts # <<<<<<<<<<<<<< jpayne@69: * # deletion alleles exist, add dummy 1st reference allele, and account for leading base jpayne@69: * if have_deletions: jpayne@69: */ jpayne@69: __Pyx_INCREF(__pyx_v_newalts); jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt, __pyx_v_newalts); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":787 jpayne@69: * alt = newalts jpayne@69: * # deletion alleles exist, add dummy 1st reference allele, and account for leading base jpayne@69: * if have_deletions: # <<<<<<<<<<<<<< jpayne@69: * if pos == 0: jpayne@69: * # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1 jpayne@69: */ jpayne@69: if (__pyx_v_have_deletions) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":788 jpayne@69: * # deletion alleles exist, add dummy 1st reference allele, and account for leading base jpayne@69: * if have_deletions: jpayne@69: * if pos == 0: # <<<<<<<<<<<<<< jpayne@69: * # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1 jpayne@69: * addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference) jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 788, __pyx_L1_error) } jpayne@69: __pyx_t_17 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_pos, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 788, __pyx_L1_error) jpayne@69: if (__pyx_t_17) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":790 jpayne@69: * if pos == 0: jpayne@69: * # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1 jpayne@69: * addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference) # <<<<<<<<<<<<<< jpayne@69: * ref += addn jpayne@69: * alt = [allele+addn for allele in alt] jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 790, __pyx_L1_error) } jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 790, __pyx_L1_error) } jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_9 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_9)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_v_chrom, __pyx_t_12, __pyx_t_1, __pyx_t_3}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __pyx_v_addn = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":791 jpayne@69: * # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1 jpayne@69: * addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference) jpayne@69: * ref += addn # <<<<<<<<<<<<<< jpayne@69: * alt = [allele+addn for allele in alt] jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":792 jpayne@69: * addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference) jpayne@69: * ref += addn jpayne@69: * alt = [allele+addn for allele in alt] # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * addn = get_sequence(chrom,pos-1,pos,self._reference) jpayne@69: */ jpayne@69: { /* enter inner scope */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_11 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_11); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_11))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_3 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: #else jpayne@69: __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: #else jpayne@69: __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_3 = __pyx_t_18(__pyx_t_11); jpayne@69: if (unlikely(!__pyx_t_3)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_allele, __pyx_t_3); jpayne@69: __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = PyNumber_Add(__pyx_8genexpr3__pyx_v_allele, __pyx_v_addn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 792, __pyx_L85_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_allele); __pyx_8genexpr3__pyx_v_allele = 0; jpayne@69: goto __pyx_L89_exit_scope; jpayne@69: __pyx_L85_error:; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_allele); __pyx_8genexpr3__pyx_v_allele = 0; jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L89_exit_scope:; jpayne@69: } /* exit inner scope */ jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":788 jpayne@69: * # deletion alleles exist, add dummy 1st reference allele, and account for leading base jpayne@69: * if have_deletions: jpayne@69: * if pos == 0: # <<<<<<<<<<<<<< jpayne@69: * # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1 jpayne@69: * addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference) jpayne@69: */ jpayne@69: goto __pyx_L82; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":794 jpayne@69: * alt = [allele+addn for allele in alt] jpayne@69: * else: jpayne@69: * addn = get_sequence(chrom,pos-1,pos,self._reference) # <<<<<<<<<<<<<< jpayne@69: * ref = addn + ref jpayne@69: * alt = [addn + allele for allele in alt] jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_get_sequence); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 794, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 794, __pyx_L1_error) } jpayne@69: __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_pos, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 794, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 794, __pyx_L1_error) } jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_12, __pyx_v_chrom, __pyx_t_3, __pyx_v_pos, __pyx_t_1}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __pyx_v_addn = __pyx_t_2; jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":795 jpayne@69: * else: jpayne@69: * addn = get_sequence(chrom,pos-1,pos,self._reference) jpayne@69: * ref = addn + ref # <<<<<<<<<<<<<< jpayne@69: * alt = [addn + allele for allele in alt] jpayne@69: * pos -= 1 jpayne@69: */ jpayne@69: __pyx_t_2 = PyNumber_Add(__pyx_v_addn, __pyx_v_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":796 jpayne@69: * addn = get_sequence(chrom,pos-1,pos,self._reference) jpayne@69: * ref = addn + ref jpayne@69: * alt = [addn + allele for allele in alt] # <<<<<<<<<<<<<< jpayne@69: * pos -= 1 jpayne@69: * else: jpayne@69: */ jpayne@69: { /* enter inner scope */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_11 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_11); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_11))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_18(__pyx_t_11); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_allele, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyNumber_Add(__pyx_v_addn, __pyx_8genexpr4__pyx_v_allele); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 796, __pyx_L92_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_allele); __pyx_8genexpr4__pyx_v_allele = 0; jpayne@69: goto __pyx_L96_exit_scope; jpayne@69: __pyx_L92_error:; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_allele); __pyx_8genexpr4__pyx_v_allele = 0; jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L96_exit_scope:; jpayne@69: } /* exit inner scope */ jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":797 jpayne@69: * ref = addn + ref jpayne@69: * alt = [addn + allele for allele in alt] jpayne@69: * pos -= 1 # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * # format v4.0 -- just check for nucleotides jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 797, __pyx_L1_error) } jpayne@69: __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_pos, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_L82:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":787 jpayne@69: * alt = newalts jpayne@69: * # deletion alleles exist, add dummy 1st reference allele, and account for leading base jpayne@69: * if have_deletions: # <<<<<<<<<<<<<< jpayne@69: * if pos == 0: jpayne@69: * # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1 jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":756 jpayne@69: * jpayne@69: * # convert v3.3 alleles jpayne@69: * if self._version == 33: # <<<<<<<<<<<<<< jpayne@69: * if len(ref) != 1: self.error(line,self.V33_BAD_REF) jpayne@69: * newalts = [] jpayne@69: */ jpayne@69: goto __pyx_L54; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":800 jpayne@69: * else: jpayne@69: * # format v4.0 -- just check for nucleotides jpayne@69: * for allele in alt: # <<<<<<<<<<<<<< jpayne@69: * if not alleleRegEx.match(allele): jpayne@69: * self.error(line,self.V40_BAD_ALLELE,allele) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_11 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_11 = __pyx_t_18(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_11)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 800, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":801 jpayne@69: * # format v4.0 -- just check for nucleotides jpayne@69: * for allele in alt: jpayne@69: * if not alleleRegEx.match(allele): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.V40_BAD_ALLELE,allele) jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_alleleRegEx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (unlikely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_allele}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 801, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 801, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_26 = (!__pyx_t_17); jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":802 jpayne@69: * for allele in alt: jpayne@69: * if not alleleRegEx.match(allele): jpayne@69: * self.error(line,self.V40_BAD_ALLELE,allele) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # check for leading nucleotide in indel calls jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_V40_BAD_ALLELE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_v_line, __pyx_t_1, __pyx_v_allele}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 802, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":801 jpayne@69: * # format v4.0 -- just check for nucleotides jpayne@69: * for allele in alt: jpayne@69: * if not alleleRegEx.match(allele): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.V40_BAD_ALLELE,allele) jpayne@69: * jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":800 jpayne@69: * else: jpayne@69: * # format v4.0 -- just check for nucleotides jpayne@69: * for allele in alt: # <<<<<<<<<<<<<< jpayne@69: * if not alleleRegEx.match(allele): jpayne@69: * self.error(line,self.V40_BAD_ALLELE,allele) jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_L54:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":805 jpayne@69: * jpayne@69: * # check for leading nucleotide in indel calls jpayne@69: * for allele in alt: # <<<<<<<<<<<<<< jpayne@69: * if len(allele) != len(ref): jpayne@69: * if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE) jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_11 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_11 = __pyx_t_18(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_11)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 805, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":806 jpayne@69: * # check for leading nucleotide in indel calls jpayne@69: * for allele in alt: jpayne@69: * if len(allele) != len(ref): # <<<<<<<<<<<<<< jpayne@69: * if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE) jpayne@69: * if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper(): jpayne@69: */ jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 806, __pyx_L1_error) jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 806, __pyx_L1_error) jpayne@69: __pyx_t_26 = (__pyx_t_22 != __pyx_t_5); jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":807 jpayne@69: * for allele in alt: jpayne@69: * if len(allele) != len(ref): jpayne@69: * if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE) # <<<<<<<<<<<<<< jpayne@69: * if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper(): jpayne@69: * self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE) jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 807, __pyx_L1_error) jpayne@69: __pyx_t_26 = (__pyx_t_5 == 0); jpayne@69: if (__pyx_t_26) { jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ZERO_LENGTH_ALLELE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_line, __pyx_t_1}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 807, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":808 jpayne@69: * if len(allele) != len(ref): jpayne@69: * if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE) jpayne@69: * if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper(): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_ref, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_allele, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_upper); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_12))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_12, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: } else { jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: goto __pyx_L106_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ref, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_allele, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_upper); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __pyx_t_17 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_N, __pyx_t_12, Py_NE)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 808, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: __pyx_L106_bool_binop_done:; jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":809 jpayne@69: * if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE) jpayne@69: * if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper(): jpayne@69: * self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # trim trailing bases in alleles jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 809, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_line, __pyx_t_3}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 809, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":808 jpayne@69: * if len(allele) != len(ref): jpayne@69: * if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE) jpayne@69: * if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper(): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE) jpayne@69: * jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":806 jpayne@69: * # check for leading nucleotide in indel calls jpayne@69: * for allele in alt: jpayne@69: * if len(allele) != len(ref): # <<<<<<<<<<<<<< jpayne@69: * if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE) jpayne@69: * if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper(): jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":805 jpayne@69: * jpayne@69: * # check for leading nucleotide in indel calls jpayne@69: * for allele in alt: # <<<<<<<<<<<<<< jpayne@69: * if len(allele) != len(ref): jpayne@69: * if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE) jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":821 jpayne@69: * jpayne@69: * # left-align alleles, if a reference is available jpayne@69: * if self._leftalign and self._reference: # <<<<<<<<<<<<<< jpayne@69: * while left < pos: jpayne@69: * movable = True jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_leftalign_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 821, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_17) { jpayne@69: } else { jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: goto __pyx_L110_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reference_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 821, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: __pyx_L110_bool_binop_done:; jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":822 jpayne@69: * # left-align alleles, if a reference is available jpayne@69: * if self._leftalign and self._reference: jpayne@69: * while left < pos: # <<<<<<<<<<<<<< jpayne@69: * movable = True jpayne@69: * for allele in alt: jpayne@69: */ jpayne@69: while (1) { jpayne@69: if (unlikely(!__pyx_v_left)) { __Pyx_RaiseUnboundLocalError("left"); __PYX_ERR(0, 822, __pyx_L1_error) } jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 822, __pyx_L1_error) } jpayne@69: __pyx_t_2 = PyObject_RichCompare(__pyx_v_left, __pyx_v_pos, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error) jpayne@69: __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 822, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (!__pyx_t_26) break; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":823 jpayne@69: * if self._leftalign and self._reference: jpayne@69: * while left < pos: jpayne@69: * movable = True # <<<<<<<<<<<<<< jpayne@69: * for allele in alt: jpayne@69: * if len(allele) > len(ref): jpayne@69: */ jpayne@69: __pyx_v_movable = 1; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":824 jpayne@69: * while left < pos: jpayne@69: * movable = True jpayne@69: * for allele in alt: # <<<<<<<<<<<<<< jpayne@69: * if len(allele) > len(ref): jpayne@69: * longest, shortest = allele, ref jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_2 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_2); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_12 = __pyx_t_18(__pyx_t_2); jpayne@69: if (unlikely(!__pyx_t_12)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 824, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_allele, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":825 jpayne@69: * movable = True jpayne@69: * for allele in alt: jpayne@69: * if len(allele) > len(ref): # <<<<<<<<<<<<<< jpayne@69: * longest, shortest = allele, ref jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 825, __pyx_L1_error) jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 825, __pyx_L1_error) jpayne@69: __pyx_t_26 = (__pyx_t_5 > __pyx_t_22); jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":826 jpayne@69: * for allele in alt: jpayne@69: * if len(allele) > len(ref): jpayne@69: * longest, shortest = allele, ref # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * longest, shortest = ref, allele jpayne@69: */ jpayne@69: __pyx_t_12 = __pyx_v_allele; jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __pyx_t_11 = __pyx_v_ref; jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_longest, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_shortest, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":825 jpayne@69: * movable = True jpayne@69: * for allele in alt: jpayne@69: * if len(allele) > len(ref): # <<<<<<<<<<<<<< jpayne@69: * longest, shortest = allele, ref jpayne@69: * else: jpayne@69: */ jpayne@69: goto __pyx_L116; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":828 jpayne@69: * longest, shortest = allele, ref jpayne@69: * else: jpayne@69: * longest, shortest = ref, allele # <<<<<<<<<<<<<< jpayne@69: * if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper(): jpayne@69: * movable = False jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_11 = __pyx_v_ref; jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __pyx_t_12 = __pyx_v_allele; jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_longest, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_shortest, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: } jpayne@69: __pyx_L116:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":829 jpayne@69: * else: jpayne@69: * longest, shortest = ref, allele jpayne@69: * if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper(): # <<<<<<<<<<<<<< jpayne@69: * movable = False jpayne@69: * if longest[-1].upper() != longest[len(shortest)-1].upper(): jpayne@69: */ jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_longest); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __pyx_t_17 = (__pyx_t_22 == __pyx_t_5); jpayne@69: if (!__pyx_t_17) { jpayne@69: } else { jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: goto __pyx_L118_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_longest, 0, __pyx_t_5, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_11)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_shortest, __pyx_n_s_upper); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 829, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: __pyx_L118_bool_binop_done:; jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":830 jpayne@69: * longest, shortest = ref, allele jpayne@69: * if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper(): jpayne@69: * movable = False # <<<<<<<<<<<<<< jpayne@69: * if longest[-1].upper() != longest[len(shortest)-1].upper(): jpayne@69: * movable = False jpayne@69: */ jpayne@69: __pyx_v_movable = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":829 jpayne@69: * else: jpayne@69: * longest, shortest = ref, allele jpayne@69: * if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper(): # <<<<<<<<<<<<<< jpayne@69: * movable = False jpayne@69: * if longest[-1].upper() != longest[len(shortest)-1].upper(): jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":831 jpayne@69: * if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper(): jpayne@69: * movable = False jpayne@69: * if longest[-1].upper() != longest[len(shortest)-1].upper(): # <<<<<<<<<<<<<< jpayne@69: * movable = False jpayne@69: * if not movable: jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_longest, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_upper); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_12))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_12, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __pyx_t_22 = (__pyx_t_5 - 1); jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_longest, __pyx_t_22, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_1))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_1, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_11, __pyx_t_12, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 831, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":832 jpayne@69: * movable = False jpayne@69: * if longest[-1].upper() != longest[len(shortest)-1].upper(): jpayne@69: * movable = False # <<<<<<<<<<<<<< jpayne@69: * if not movable: jpayne@69: * break jpayne@69: */ jpayne@69: __pyx_v_movable = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":831 jpayne@69: * if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper(): jpayne@69: * movable = False jpayne@69: * if longest[-1].upper() != longest[len(shortest)-1].upper(): # <<<<<<<<<<<<<< jpayne@69: * movable = False jpayne@69: * if not movable: jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":824 jpayne@69: * while left < pos: jpayne@69: * movable = True jpayne@69: * for allele in alt: # <<<<<<<<<<<<<< jpayne@69: * if len(allele) > len(ref): jpayne@69: * longest, shortest = allele, ref jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":833 jpayne@69: * if longest[-1].upper() != longest[len(shortest)-1].upper(): jpayne@69: * movable = False jpayne@69: * if not movable: # <<<<<<<<<<<<<< jpayne@69: * break jpayne@69: * ref = ref[:-1] jpayne@69: */ jpayne@69: __pyx_t_26 = (!__pyx_v_movable); jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":834 jpayne@69: * movable = False jpayne@69: * if not movable: jpayne@69: * break # <<<<<<<<<<<<<< jpayne@69: * ref = ref[:-1] jpayne@69: * alt = [allele[:-1] for allele in alt] jpayne@69: */ jpayne@69: goto __pyx_L113_break; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":833 jpayne@69: * if longest[-1].upper() != longest[len(shortest)-1].upper(): jpayne@69: * movable = False jpayne@69: * if not movable: # <<<<<<<<<<<<<< jpayne@69: * break jpayne@69: * ref = ref[:-1] jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":835 jpayne@69: * if not movable: jpayne@69: * break jpayne@69: * ref = ref[:-1] # <<<<<<<<<<<<<< jpayne@69: * alt = [allele[:-1] for allele in alt] jpayne@69: * if min([len(allele) for allele in alt]) == 0 or len(ref) == 0: jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_ref, 0, -1L, NULL, NULL, &__pyx_slice__28, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":836 jpayne@69: * break jpayne@69: * ref = ref[:-1] jpayne@69: * alt = [allele[:-1] for allele in alt] # <<<<<<<<<<<<<< jpayne@69: * if min([len(allele) for allele in alt]) == 0 or len(ref) == 0: jpayne@69: * ref = faref_leftflank[pos-left-1] + ref jpayne@69: */ jpayne@69: { /* enter inner scope */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_1 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_12 = __pyx_t_18(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_12)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_allele, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_8genexpr5__pyx_v_allele, 0, -1L, NULL, NULL, &__pyx_slice__28, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 836, __pyx_L125_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_allele); __pyx_8genexpr5__pyx_v_allele = 0; jpayne@69: goto __pyx_L129_exit_scope; jpayne@69: __pyx_L125_error:; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_allele); __pyx_8genexpr5__pyx_v_allele = 0; jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L129_exit_scope:; jpayne@69: } /* exit inner scope */ jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":837 jpayne@69: * ref = ref[:-1] jpayne@69: * alt = [allele[:-1] for allele in alt] jpayne@69: * if min([len(allele) for allele in alt]) == 0 or len(ref) == 0: # <<<<<<<<<<<<<< jpayne@69: * ref = faref_leftflank[pos-left-1] + ref jpayne@69: * alt = [faref_leftflank[pos-left-1] + allele for allele in alt] jpayne@69: */ jpayne@69: { /* enter inner scope */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_1 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_12 = __pyx_t_18(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_12)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_allele, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_8genexpr6__pyx_v_allele); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_22); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 837, __pyx_L135_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_allele); __pyx_8genexpr6__pyx_v_allele = 0; jpayne@69: goto __pyx_L139_exit_scope; jpayne@69: __pyx_L135_error:; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_allele); __pyx_8genexpr6__pyx_v_allele = 0; jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L139_exit_scope:; jpayne@69: } /* exit inner scope */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_17 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 837, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (!__pyx_t_17) { jpayne@69: } else { jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: goto __pyx_L131_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 837, __pyx_L1_error) jpayne@69: __pyx_t_17 = (__pyx_t_6 == 0); jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: __pyx_L131_bool_binop_done:; jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":838 jpayne@69: * alt = [allele[:-1] for allele in alt] jpayne@69: * if min([len(allele) for allele in alt]) == 0 or len(ref) == 0: jpayne@69: * ref = faref_leftflank[pos-left-1] + ref # <<<<<<<<<<<<<< jpayne@69: * alt = [faref_leftflank[pos-left-1] + allele for allele in alt] jpayne@69: * pos -= 1 jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_faref_leftflank)) { __Pyx_RaiseUnboundLocalError("faref_leftflank"); __PYX_ERR(0, 838, __pyx_L1_error) } jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 838, __pyx_L1_error) } jpayne@69: if (unlikely(!__pyx_v_left)) { __Pyx_RaiseUnboundLocalError("left"); __PYX_ERR(0, 838, __pyx_L1_error) } jpayne@69: __pyx_t_1 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":839 jpayne@69: * if min([len(allele) for allele in alt]) == 0 or len(ref) == 0: jpayne@69: * ref = faref_leftflank[pos-left-1] + ref jpayne@69: * alt = [faref_leftflank[pos-left-1] + allele for allele in alt] # <<<<<<<<<<<<<< jpayne@69: * pos -= 1 jpayne@69: * jpayne@69: */ jpayne@69: { /* enter inner scope */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (likely(PyList_CheckExact(__pyx_v_alt)) || PyTuple_CheckExact(__pyx_v_alt)) { jpayne@69: __pyx_t_1 = __pyx_v_alt; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_alt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: #else jpayne@69: __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_12 = __pyx_t_18(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_12)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_allele, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_v_faref_leftflank)) { __Pyx_RaiseUnboundLocalError("faref_leftflank"); __PYX_ERR(0, 839, __pyx_L142_error) } jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 839, __pyx_L142_error) } jpayne@69: if (unlikely(!__pyx_v_left)) { __Pyx_RaiseUnboundLocalError("left"); __PYX_ERR(0, 839, __pyx_L142_error) } jpayne@69: __pyx_t_12 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_11 = __Pyx_PyInt_SubtractObjC(__pyx_t_12, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_8genexpr7__pyx_v_allele); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 839, __pyx_L142_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_allele); __pyx_8genexpr7__pyx_v_allele = 0; jpayne@69: goto __pyx_L146_exit_scope; jpayne@69: __pyx_L142_error:; jpayne@69: __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_allele); __pyx_8genexpr7__pyx_v_allele = 0; jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L146_exit_scope:; jpayne@69: } /* exit inner scope */ jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":840 jpayne@69: * ref = faref_leftflank[pos-left-1] + ref jpayne@69: * alt = [faref_leftflank[pos-left-1] + allele for allele in alt] jpayne@69: * pos -= 1 # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # parse sample columns jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 840, __pyx_L1_error) } jpayne@69: __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_pos, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":837 jpayne@69: * ref = ref[:-1] jpayne@69: * alt = [allele[:-1] for allele in alt] jpayne@69: * if min([len(allele) for allele in alt]) == 0 or len(ref) == 0: # <<<<<<<<<<<<<< jpayne@69: * ref = faref_leftflank[pos-left-1] + ref jpayne@69: * alt = [faref_leftflank[pos-left-1] + allele for allele in alt] jpayne@69: */ jpayne@69: } jpayne@69: } jpayne@69: __pyx_L113_break:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":821 jpayne@69: * jpayne@69: * # left-align alleles, if a reference is available jpayne@69: * if self._leftalign and self._reference: # <<<<<<<<<<<<<< jpayne@69: * while left < pos: jpayne@69: * movable = True jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":843 jpayne@69: * jpayne@69: * # parse sample columns jpayne@69: * samples = [] # <<<<<<<<<<<<<< jpayne@69: * for sample in cols[9:]: jpayne@69: * dict = {} jpayne@69: */ jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_v_samples = ((PyObject*)__pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":844 jpayne@69: * # parse sample columns jpayne@69: * samples = [] jpayne@69: * for sample in cols[9:]: # <<<<<<<<<<<<<< jpayne@69: * dict = {} jpayne@69: * values = sample.split(':') jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_cols, 9, 0, NULL, NULL, &__pyx_slice__26, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { jpayne@69: __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_18(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_2)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 844, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_sample, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":845 jpayne@69: * samples = [] jpayne@69: * for sample in cols[9:]: jpayne@69: * dict = {} # <<<<<<<<<<<<<< jpayne@69: * values = sample.split(':') jpayne@69: * if len(values) > len(format): jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_dict, ((PyObject*)__pyx_t_2)); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":846 jpayne@69: * for sample in cols[9:]: jpayne@69: * dict = {} jpayne@69: * values = sample.split(':') # <<<<<<<<<<<<<< jpayne@69: * if len(values) > len(format): jpayne@69: * self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format))) jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 846, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_u__3}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_values, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":847 jpayne@69: * dict = {} jpayne@69: * values = sample.split(':') jpayne@69: * if len(values) > len(format): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format))) jpayne@69: * for idx in range(len(format)): jpayne@69: */ jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 847, __pyx_L1_error) jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 847, __pyx_L1_error) jpayne@69: __pyx_t_26 = (__pyx_t_22 > __pyx_t_5); jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":848 jpayne@69: * values = sample.split(':') jpayne@69: * if len(values) > len(format): jpayne@69: * self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format))) # <<<<<<<<<<<<<< jpayne@69: * for idx in range(len(format)): jpayne@69: * expected = self.get_expected(format[idx], self._format, alt) jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BAD_NUMBER_OF_VALUES); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_5 = 0; jpayne@69: __pyx_t_10 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_found); jpayne@69: __pyx_t_5 += 7; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_found); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_found); jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_22, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_values_in_element); jpayne@69: __pyx_t_5 += 19; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_values_in_element); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_values_in_element); jpayne@69: __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_sample), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_10; jpayne@69: __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_expected); jpayne@69: __pyx_t_5 += 11; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_expected); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_expected); jpayne@69: __pyx_t_22 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_22, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u__8); jpayne@69: __pyx_t_5 += 1; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__8); jpayne@69: PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u__8); jpayne@69: __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_3, 7, __pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_line, __pyx_t_12, __pyx_t_9}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":847 jpayne@69: * dict = {} jpayne@69: * values = sample.split(':') jpayne@69: * if len(values) > len(format): # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format))) jpayne@69: * for idx in range(len(format)): jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":849 jpayne@69: * if len(values) > len(format): jpayne@69: * self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format))) jpayne@69: * for idx in range(len(format)): # <<<<<<<<<<<<<< jpayne@69: * expected = self.get_expected(format[idx], self._format, alt) jpayne@69: * if idx < len(values): value = values[idx] jpayne@69: */ jpayne@69: __pyx_t_5 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 849, __pyx_L1_error) jpayne@69: __pyx_t_22 = __pyx_t_5; jpayne@69: for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_22; __pyx_t_30+=1) { jpayne@69: __pyx_v_idx = __pyx_t_30; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":850 jpayne@69: * self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format))) jpayne@69: * for idx in range(len(format)): jpayne@69: * expected = self.get_expected(format[idx], self._format, alt) # <<<<<<<<<<<<<< jpayne@69: * if idx < len(values): value = values[idx] jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_expected); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 850, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 850, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 850, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_11))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_11, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_9, __pyx_t_12, __pyx_v_alt}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_expected, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":851 jpayne@69: * for idx in range(len(format)): jpayne@69: * expected = self.get_expected(format[idx], self._format, alt) jpayne@69: * if idx < len(values): value = values[idx] # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * if expected == -1: value = "." jpayne@69: */ jpayne@69: __pyx_t_31 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_31 == ((Py_ssize_t)-1))) __PYX_ERR(0, 851, __pyx_L1_error) jpayne@69: __pyx_t_26 = (__pyx_v_idx < __pyx_t_31); jpayne@69: if (__pyx_t_26) { jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: goto __pyx_L152; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":853 jpayne@69: * if idx < len(values): value = values[idx] jpayne@69: * else: jpayne@69: * if expected == -1: value = "." # <<<<<<<<<<<<<< jpayne@69: * else: value = ",".join(["."]*expected) jpayne@69: * jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_26 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_expected, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 853, __pyx_L1_error) jpayne@69: if (__pyx_t_26) { jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __Pyx_XDECREF_SET(__pyx_v_value, __pyx_kp_u__5); jpayne@69: goto __pyx_L153; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":854 jpayne@69: * else: jpayne@69: * if expected == -1: value = "." jpayne@69: * else: value = ",".join(["."]*expected) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * dict[format[idx]] = self.parse_formatdata(format[idx], jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __Pyx_GIVEREF(__pyx_kp_u__5); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__5)) __PYX_ERR(0, 854, __pyx_L1_error); jpayne@69: { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_expected); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 854, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_temp); jpayne@69: __Pyx_DECREF(__pyx_t_2); jpayne@69: __pyx_t_2 = __pyx_temp; jpayne@69: } jpayne@69: __pyx_t_11 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 854, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11); jpayne@69: __pyx_t_11 = 0; jpayne@69: } jpayne@69: __pyx_L153:; jpayne@69: } jpayne@69: __pyx_L152:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":856 jpayne@69: * else: value = ",".join(["."]*expected) jpayne@69: * jpayne@69: * dict[format[idx]] = self.parse_formatdata(format[idx], # <<<<<<<<<<<<<< jpayne@69: * value, jpayne@69: * self._format, jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_formatdata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 856, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":858 jpayne@69: * dict[format[idx]] = self.parse_formatdata(format[idx], jpayne@69: * value, jpayne@69: * self._format, # <<<<<<<<<<<<<< jpayne@69: * line) jpayne@69: * if expected != -1 and len(dict[format[idx]]) != expected: jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 858, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":859 jpayne@69: * value, jpayne@69: * self._format, jpayne@69: * line) # <<<<<<<<<<<<<< jpayne@69: * if expected != -1 and len(dict[format[idx]]) != expected: jpayne@69: * self.error(line,self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: */ jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_12, __pyx_v_value, __pyx_t_9, __pyx_v_line}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 856, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":856 jpayne@69: * else: value = ",".join(["."]*expected) jpayne@69: * jpayne@69: * dict[format[idx]] = self.parse_formatdata(format[idx], # <<<<<<<<<<<<<< jpayne@69: * value, jpayne@69: * self._format, jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_dict, __pyx_t_2, __pyx_t_11) < 0))) __PYX_ERR(0, 856, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":860 jpayne@69: * self._format, jpayne@69: * line) jpayne@69: * if expected != -1 and len(dict[format[idx]]) != expected: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]])) jpayne@69: */ jpayne@69: __pyx_t_17 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_expected, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 860, __pyx_L1_error) jpayne@69: if (__pyx_t_17) { jpayne@69: } else { jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: goto __pyx_L155_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 860, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_31 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_31 == ((Py_ssize_t)-1))) __PYX_ERR(0, 860, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_31); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_v_expected, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 860, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 860, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_26 = __pyx_t_17; jpayne@69: __pyx_L155_bool_binop_done:; jpayne@69: if (__pyx_t_26) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":861 jpayne@69: * line) jpayne@69: * if expected != -1 and len(dict[format[idx]]) != expected: jpayne@69: * self.error(line,self.BAD_NUMBER_OF_PARAMETERS, # <<<<<<<<<<<<<< jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]])) jpayne@69: * if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]])) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 861, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_BAD_NUMBER_OF_PARAMETERS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 861, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":862 jpayne@69: * if expected != -1 and len(dict[format[idx]]) != expected: jpayne@69: * self.error(line,self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]])) # <<<<<<<<<<<<<< jpayne@69: * if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]])) jpayne@69: * dict[format[idx]] = dict[format[idx]][:expected] jpayne@69: */ jpayne@69: __pyx_t_12 = PyTuple_New(6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 862, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_31 = 0; jpayne@69: __pyx_t_10 = 127; jpayne@69: __Pyx_INCREF(__pyx_kp_u_id); jpayne@69: __pyx_t_31 += 3; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_id); jpayne@69: PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_id); jpayne@69: __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_25 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_3), __pyx_empty_unicode); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 862, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) : __pyx_t_10; jpayne@69: __pyx_t_31 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25); jpayne@69: __Pyx_GIVEREF(__pyx_t_25); jpayne@69: PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_25); jpayne@69: __pyx_t_25 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_expected_2); jpayne@69: __pyx_t_31 += 11; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_expected_2); jpayne@69: PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u_expected_2); jpayne@69: __pyx_t_25 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_expected), __pyx_empty_unicode); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 862, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) : __pyx_t_10; jpayne@69: __pyx_t_31 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25); jpayne@69: __Pyx_GIVEREF(__pyx_t_25); jpayne@69: PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_25); jpayne@69: __pyx_t_25 = 0; jpayne@69: __Pyx_INCREF(__pyx_kp_u_parameters_got); jpayne@69: __pyx_t_31 += 17; jpayne@69: __Pyx_GIVEREF(__pyx_kp_u_parameters_got); jpayne@69: PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_kp_u_parameters_got); jpayne@69: __pyx_t_25 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 862, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; jpayne@69: __pyx_t_25 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_3), __pyx_empty_unicode); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 862, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_25) : __pyx_t_10; jpayne@69: __pyx_t_31 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25); jpayne@69: __Pyx_GIVEREF(__pyx_t_25); jpayne@69: PyTuple_SET_ITEM(__pyx_t_12, 5, __pyx_t_25); jpayne@69: __pyx_t_25 = 0; jpayne@69: __pyx_t_25 = __Pyx_PyUnicode_Join(__pyx_t_12, 6, __pyx_t_31, __pyx_t_10); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 862, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_12)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_v_line, __pyx_t_9, __pyx_t_25}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 861, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":863 jpayne@69: * self.error(line,self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]])) jpayne@69: * if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]])) # <<<<<<<<<<<<<< jpayne@69: * dict[format[idx]] = dict[format[idx]][:expected] jpayne@69: * samples.append( dict ) jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_31 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_31 == ((Py_ssize_t)-1))) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_31); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_v_expected, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (__pyx_t_26) { jpayne@69: __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_25 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_25); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; jpayne@69: __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_9, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_25); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_31 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_31 == ((Py_ssize_t)-1))) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_31); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __pyx_t_9 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_GIVEREF(__pyx_t_25); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_25)) __PYX_ERR(0, 863, __pyx_L1_error); jpayne@69: { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_12, __pyx_t_9); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_temp); jpayne@69: __Pyx_DECREF(__pyx_t_12); jpayne@69: __pyx_t_12 = __pyx_temp; jpayne@69: } jpayne@69: __pyx_t_25 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_dict, __pyx_t_11, __pyx_t_9) < 0))) __PYX_ERR(0, 863, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":864 jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]])) jpayne@69: * if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]])) jpayne@69: * dict[format[idx]] = dict[format[idx]][:expected] # <<<<<<<<<<<<<< jpayne@69: * samples.append( dict ) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 864, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_dict, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 864, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_t_9, 0, 0, NULL, &__pyx_v_expected, NULL, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 864, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_format, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 864, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_dict, __pyx_t_9, __pyx_t_11) < 0))) __PYX_ERR(0, 864, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":860 jpayne@69: * self._format, jpayne@69: * line) jpayne@69: * if expected != -1 and len(dict[format[idx]]) != expected: # <<<<<<<<<<<<<< jpayne@69: * self.error(line,self.BAD_NUMBER_OF_PARAMETERS, jpayne@69: * "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]])) jpayne@69: */ jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":865 jpayne@69: * if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]])) jpayne@69: * dict[format[idx]] = dict[format[idx]][:expected] jpayne@69: * samples.append( dict ) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # done jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_samples, __pyx_v_dict); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 865, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":844 jpayne@69: * # parse sample columns jpayne@69: * samples = [] jpayne@69: * for sample in cols[9:]: # <<<<<<<<<<<<<< jpayne@69: * dict = {} jpayne@69: * values = sample.split(':') jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":868 jpayne@69: * jpayne@69: * # done jpayne@69: * d = {'chrom':chrom, # <<<<<<<<<<<<<< jpayne@69: * 'pos':pos, # return 0-based position jpayne@69: * 'id':id, jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_chrom, __pyx_v_chrom) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":869 jpayne@69: * # done jpayne@69: * d = {'chrom':chrom, jpayne@69: * 'pos':pos, # return 0-based position # <<<<<<<<<<<<<< jpayne@69: * 'id':id, jpayne@69: * 'ref':ref, jpayne@69: */ jpayne@69: if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); __PYX_ERR(0, 869, __pyx_L1_error) } jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pos, __pyx_v_pos) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":870 jpayne@69: * d = {'chrom':chrom, jpayne@69: * 'pos':pos, # return 0-based position jpayne@69: * 'id':id, # <<<<<<<<<<<<<< jpayne@69: * 'ref':ref, jpayne@69: * 'alt':alt, jpayne@69: */ jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_id_2, __pyx_v_id) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":871 jpayne@69: * 'pos':pos, # return 0-based position jpayne@69: * 'id':id, jpayne@69: * 'ref':ref, # <<<<<<<<<<<<<< jpayne@69: * 'alt':alt, jpayne@69: * 'qual':qual, jpayne@69: */ jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ref, __pyx_v_ref) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":872 jpayne@69: * 'id':id, jpayne@69: * 'ref':ref, jpayne@69: * 'alt':alt, # <<<<<<<<<<<<<< jpayne@69: * 'qual':qual, jpayne@69: * 'filter':filter, jpayne@69: */ jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_alt, __pyx_v_alt) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":873 jpayne@69: * 'ref':ref, jpayne@69: * 'alt':alt, jpayne@69: * 'qual':qual, # <<<<<<<<<<<<<< jpayne@69: * 'filter':filter, jpayne@69: * 'info':info, jpayne@69: */ jpayne@69: __pyx_t_11 = PyFloat_FromDouble(__pyx_v_qual); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 873, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_qual, __pyx_t_11) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":874 jpayne@69: * 'alt':alt, jpayne@69: * 'qual':qual, jpayne@69: * 'filter':filter, # <<<<<<<<<<<<<< jpayne@69: * 'info':info, jpayne@69: * 'format':format} jpayne@69: */ jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_filter_2, __pyx_v_filter) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":875 jpayne@69: * 'qual':qual, jpayne@69: * 'filter':filter, jpayne@69: * 'info':info, # <<<<<<<<<<<<<< jpayne@69: * 'format':format} jpayne@69: * for key,value in zip(self._samples,samples): jpayne@69: */ jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_info_2, __pyx_v_info) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":876 jpayne@69: * 'filter':filter, jpayne@69: * 'info':info, jpayne@69: * 'format':format} # <<<<<<<<<<<<<< jpayne@69: * for key,value in zip(self._samples,samples): jpayne@69: * d[key] = value jpayne@69: */ jpayne@69: if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_format, __pyx_v_format) < 0) __PYX_ERR(0, 868, __pyx_L1_error) jpayne@69: __pyx_v_d = ((PyObject*)__pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":877 jpayne@69: * 'info':info, jpayne@69: * 'format':format} jpayne@69: * for key,value in zip(self._samples,samples): # <<<<<<<<<<<<<< jpayne@69: * d[key] = value jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_samples); jpayne@69: __Pyx_GIVEREF(__pyx_v_samples); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_samples)) __PYX_ERR(0, 877, __pyx_L1_error); jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { jpayne@69: __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_18 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_18)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_11))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_18(__pyx_t_11); jpayne@69: if (unlikely(!__pyx_t_1)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: } jpayne@69: if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { jpayne@69: PyObject* sequence = __pyx_t_1; jpayne@69: Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); jpayne@69: if (unlikely(size != 2)) { jpayne@69: if (size > 2) __Pyx_RaiseTooManyValuesError(2); jpayne@69: else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); jpayne@69: __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: if (likely(PyTuple_CheckExact(sequence))) { jpayne@69: __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); jpayne@69: } else { jpayne@69: __pyx_t_9 = PyList_GET_ITEM(sequence, 0); jpayne@69: __pyx_t_12 = PyList_GET_ITEM(sequence, 1); jpayne@69: } jpayne@69: __Pyx_INCREF(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_12); jpayne@69: #else jpayne@69: __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: #endif jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: } else { jpayne@69: Py_ssize_t index = -1; jpayne@69: __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_32 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); jpayne@69: index = 0; __pyx_t_9 = __pyx_t_32(__pyx_t_2); if (unlikely(!__pyx_t_9)) goto __pyx_L161_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: index = 1; __pyx_t_12 = __pyx_t_32(__pyx_t_2); if (unlikely(!__pyx_t_12)) goto __pyx_L161_unpacking_failed; jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: if (__Pyx_IternextUnpackEndCheck(__pyx_t_32(__pyx_t_2), 2) < 0) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __pyx_t_32 = NULL; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: goto __pyx_L162_unpacking_done; jpayne@69: __pyx_L161_unpacking_failed:; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_32 = NULL; jpayne@69: if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); jpayne@69: __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __pyx_L162_unpacking_done:; jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9); jpayne@69: __pyx_t_9 = 0; jpayne@69: __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_12); jpayne@69: __pyx_t_12 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":878 jpayne@69: * 'format':format} jpayne@69: * for key,value in zip(self._samples,samples): jpayne@69: * d[key] = value # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * return d jpayne@69: */ jpayne@69: if (unlikely((PyDict_SetItem(__pyx_v_d, __pyx_v_key, __pyx_v_value) < 0))) __PYX_ERR(0, 878, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":877 jpayne@69: * 'info':info, jpayne@69: * 'format':format} jpayne@69: * for key,value in zip(self._samples,samples): # <<<<<<<<<<<<<< jpayne@69: * d[key] = value jpayne@69: * jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":880 jpayne@69: * d[key] = value jpayne@69: * jpayne@69: * return d # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v_d); jpayne@69: __pyx_r = __pyx_v_d; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":671 jpayne@69: * return False jpayne@69: * jpayne@69: * def parse_data( self, line, lineparse=False ): # <<<<<<<<<<<<<< jpayne@69: * cols = line.split('\t') jpayne@69: * if len(cols) != len(self._samples)+9: jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_9); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_XDECREF(__pyx_t_12); jpayne@69: __Pyx_XDECREF(__pyx_t_16); jpayne@69: __Pyx_XDECREF(__pyx_t_23); jpayne@69: __Pyx_XDECREF(__pyx_t_24); jpayne@69: __Pyx_XDECREF(__pyx_t_25); jpayne@69: __Pyx_XDECREF(__pyx_t_27); jpayne@69: __Pyx_XDECREF(__pyx_t_28); jpayne@69: __Pyx_XDECREF(__pyx_t_29); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_cols); jpayne@69: __Pyx_XDECREF(__pyx_v_chrom); jpayne@69: __Pyx_XDECREF(__pyx_v_pos); jpayne@69: __Pyx_XDECREF(__pyx_v_id); jpayne@69: __Pyx_XDECREF(__pyx_v_ref); jpayne@69: __Pyx_XDECREF(__pyx_v_c); jpayne@69: __Pyx_XDECREF(__pyx_v_left); jpayne@69: __Pyx_XDECREF(__pyx_v_faref_leftflank); jpayne@69: __Pyx_XDECREF(__pyx_v_faref); jpayne@69: __Pyx_XDECREF(__pyx_v_alt); jpayne@69: __Pyx_XDECREF(__pyx_v_filter); jpayne@69: __Pyx_XDECREF(__pyx_v_info); jpayne@69: __Pyx_XDECREF(__pyx_v_blurp); jpayne@69: __Pyx_XDECREF(__pyx_v_elts); jpayne@69: __Pyx_XDECREF(__pyx_v_v); jpayne@69: __Pyx_XDECREF(__pyx_v_format); jpayne@69: __Pyx_XDECREF(__pyx_v_f); jpayne@69: __Pyx_XDECREF(__pyx_v_newalts); jpayne@69: __Pyx_XDECREF(__pyx_v_a); jpayne@69: __Pyx_XDECREF(__pyx_v_l); jpayne@69: __Pyx_XDECREF(__pyx_v_addns); jpayne@69: __Pyx_XDECREF(__pyx_v_i); jpayne@69: __Pyx_XDECREF(__pyx_v_na); jpayne@69: __Pyx_XDECREF(__pyx_v_s); jpayne@69: __Pyx_XDECREF(__pyx_v_addn); jpayne@69: __Pyx_XDECREF(__pyx_v_allele); jpayne@69: __Pyx_XDECREF(__pyx_v_longest); jpayne@69: __Pyx_XDECREF(__pyx_v_shortest); jpayne@69: __Pyx_XDECREF(__pyx_v_samples); jpayne@69: __Pyx_XDECREF(__pyx_v_sample); jpayne@69: __Pyx_XDECREF(__pyx_v_dict); jpayne@69: __Pyx_XDECREF(__pyx_v_values); jpayne@69: __Pyx_XDECREF(__pyx_v_expected); jpayne@69: __Pyx_XDECREF(__pyx_v_value); jpayne@69: __Pyx_XDECREF(__pyx_v_d); jpayne@69: __Pyx_XDECREF(__pyx_v_key); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_allele); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_allele); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_allele); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_allele); jpayne@69: __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_allele); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":883 jpayne@69: * jpayne@69: * jpayne@69: * def write_data(self, stream, data): # <<<<<<<<<<<<<< jpayne@69: * required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples jpayne@69: * for k in required: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_35write_data(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_34write_data, "VCF.write_data(self, stream, data)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_35write_data = {"write_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_35write_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_34write_data}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_35write_data(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_stream = 0; jpayne@69: PyObject *__pyx_v_data = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("write_data (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,&__pyx_n_s_data,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 883, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 883, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, 1); __PYX_ERR(0, 883, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 883, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, 2); __PYX_ERR(0, 883, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write_data") < 0)) __PYX_ERR(0, 883, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 3)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_stream = values[1]; jpayne@69: __pyx_v_data = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 883, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.write_data", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_34write_data(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_data); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_34write_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_data) { jpayne@69: PyObject *__pyx_v_required = NULL; jpayne@69: PyObject *__pyx_v_k = NULL; jpayne@69: PyObject *__pyx_v_alt = NULL; jpayne@69: PyObject *__pyx_v_filter = NULL; jpayne@69: PyObject *__pyx_v_qual = NULL; jpayne@69: PyObject *__pyx_v_output = NULL; jpayne@69: PyObject *__pyx_v_s = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: Py_ssize_t __pyx_t_4; jpayne@69: PyObject *(*__pyx_t_5)(PyObject *); jpayne@69: int __pyx_t_6; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: PyObject *__pyx_t_9 = NULL; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: PyObject *__pyx_t_12 = NULL; jpayne@69: int __pyx_t_13; jpayne@69: unsigned int __pyx_t_14; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("write_data", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":884 jpayne@69: * jpayne@69: * def write_data(self, stream, data): jpayne@69: * required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples # <<<<<<<<<<<<<< jpayne@69: * for k in required: jpayne@69: * if k not in data: raise ValueError("Required key %s not found in data" % str(k)) jpayne@69: */ jpayne@69: __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_n_u_chrom); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_chrom); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_chrom)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_pos); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_pos); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_pos)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_id_2); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_id_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_id_2)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_ref); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_ref); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_ref)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_alt); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_alt); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_u_alt)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_qual); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_qual); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_u_qual)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_filter_2); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_filter_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_u_filter_2)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_info_2); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_info_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_u_info_2)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_format); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_format); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_u_format)) __PYX_ERR(0, 884, __pyx_L1_error); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_v_required = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":885 jpayne@69: * def write_data(self, stream, data): jpayne@69: * required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples jpayne@69: * for k in required: # <<<<<<<<<<<<<< jpayne@69: * if k not in data: raise ValueError("Required key %s not found in data" % str(k)) jpayne@69: * if data['alt'] == []: alt = "." jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_required)) || PyTuple_CheckExact(__pyx_v_required)) { jpayne@69: __pyx_t_3 = __pyx_v_required; __Pyx_INCREF(__pyx_t_3); jpayne@69: __pyx_t_4 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_required); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 885, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 885, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_5)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_3))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 885, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __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, 885, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 885, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __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, 885, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_5(__pyx_t_3); jpayne@69: if (unlikely(!__pyx_t_2)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 885, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":886 jpayne@69: * required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples jpayne@69: * for k in required: jpayne@69: * if k not in data: raise ValueError("Required key %s not found in data" % str(k)) # <<<<<<<<<<<<<< jpayne@69: * if data['alt'] == []: alt = "." jpayne@69: * else: alt = ",".join(data['alt']) jpayne@69: */ jpayne@69: __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_k, __pyx_v_data, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 886, __pyx_L1_error) jpayne@69: if (unlikely(__pyx_t_6)) { jpayne@69: __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_k); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_Required_key_s_not_found_in_data, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_Raise(__pyx_t_2, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __PYX_ERR(0, 886, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":885 jpayne@69: * def write_data(self, stream, data): jpayne@69: * required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples jpayne@69: * for k in required: # <<<<<<<<<<<<<< jpayne@69: * if k not in data: raise ValueError("Required key %s not found in data" % str(k)) jpayne@69: * if data['alt'] == []: alt = "." jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":887 jpayne@69: * for k in required: jpayne@69: * if k not in data: raise ValueError("Required key %s not found in data" % str(k)) jpayne@69: * if data['alt'] == []: alt = "." # <<<<<<<<<<<<<< jpayne@69: * else: alt = ",".join(data['alt']) jpayne@69: * if data['filter'] == None: filter = "." jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_alt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 887, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_6) { jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __pyx_v_alt = __pyx_kp_u__5; jpayne@69: goto __pyx_L7; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":888 jpayne@69: * if k not in data: raise ValueError("Required key %s not found in data" % str(k)) jpayne@69: * if data['alt'] == []: alt = "." jpayne@69: * else: alt = ",".join(data['alt']) # <<<<<<<<<<<<<< jpayne@69: * if data['filter'] == None: filter = "." jpayne@69: * elif data['filter'] == []: jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_alt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_v_alt = ((PyObject*)__pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_L7:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":889 jpayne@69: * if data['alt'] == []: alt = "." jpayne@69: * else: alt = ",".join(data['alt']) jpayne@69: * if data['filter'] == None: filter = "." # <<<<<<<<<<<<<< jpayne@69: * elif data['filter'] == []: jpayne@69: * if self._version == 33: filter = "0" jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_filter_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 889, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_6) { jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __pyx_v_filter = __pyx_kp_u__5; jpayne@69: goto __pyx_L8; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":890 jpayne@69: * else: alt = ",".join(data['alt']) jpayne@69: * if data['filter'] == None: filter = "." jpayne@69: * elif data['filter'] == []: # <<<<<<<<<<<<<< jpayne@69: * if self._version == 33: filter = "0" jpayne@69: * else: filter = "PASS" jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_filter_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 890, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 890, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_6) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":891 jpayne@69: * if data['filter'] == None: filter = "." jpayne@69: * elif data['filter'] == []: jpayne@69: * if self._version == 33: filter = "0" # <<<<<<<<<<<<<< jpayne@69: * else: filter = "PASS" jpayne@69: * else: filter = ';'.join(data['filter']) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 891, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_3, __pyx_int_33, 33, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 891, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_6) { jpayne@69: __Pyx_INCREF(__pyx_kp_u_0); jpayne@69: __pyx_v_filter = __pyx_kp_u_0; jpayne@69: goto __pyx_L9; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":892 jpayne@69: * elif data['filter'] == []: jpayne@69: * if self._version == 33: filter = "0" jpayne@69: * else: filter = "PASS" # <<<<<<<<<<<<<< jpayne@69: * else: filter = ';'.join(data['filter']) jpayne@69: * if data['qual'] == -1: qual = "." jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __Pyx_INCREF(__pyx_n_u_PASS); jpayne@69: __pyx_v_filter = __pyx_n_u_PASS; jpayne@69: } jpayne@69: __pyx_L9:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":890 jpayne@69: * else: alt = ",".join(data['alt']) jpayne@69: * if data['filter'] == None: filter = "." jpayne@69: * elif data['filter'] == []: # <<<<<<<<<<<<<< jpayne@69: * if self._version == 33: filter = "0" jpayne@69: * else: filter = "PASS" jpayne@69: */ jpayne@69: goto __pyx_L8; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":893 jpayne@69: * if self._version == 33: filter = "0" jpayne@69: * else: filter = "PASS" jpayne@69: * else: filter = ';'.join(data['filter']) # <<<<<<<<<<<<<< jpayne@69: * if data['qual'] == -1: qual = "." jpayne@69: * else: qual = str(data['qual']) jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_filter_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 893, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_v_filter = ((PyObject*)__pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_L8:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":894 jpayne@69: * else: filter = "PASS" jpayne@69: * else: filter = ';'.join(data['filter']) jpayne@69: * if data['qual'] == -1: qual = "." # <<<<<<<<<<<<<< jpayne@69: * else: qual = str(data['qual']) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_qual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_2, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 894, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__pyx_t_6) { jpayne@69: __Pyx_INCREF(__pyx_kp_u__5); jpayne@69: __pyx_v_qual = __pyx_kp_u__5; jpayne@69: goto __pyx_L10; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":895 jpayne@69: * else: filter = ';'.join(data['filter']) jpayne@69: * if data['qual'] == -1: qual = "." jpayne@69: * else: qual = str(data['qual']) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * output = [data['chrom'], jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_qual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 895, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_v_qual = __pyx_t_3; jpayne@69: __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_L10:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":897 jpayne@69: * else: qual = str(data['qual']) jpayne@69: * jpayne@69: * output = [data['chrom'], # <<<<<<<<<<<<<< jpayne@69: * str(data['pos']+1), # change to 1-based position jpayne@69: * data['id'], jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 897, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":898 jpayne@69: * jpayne@69: * output = [data['chrom'], jpayne@69: * str(data['pos']+1), # change to 1-based position # <<<<<<<<<<<<<< jpayne@69: * data['id'], jpayne@69: * data['ref'], jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":899 jpayne@69: * output = [data['chrom'], jpayne@69: * str(data['pos']+1), # change to 1-based position jpayne@69: * data['id'], # <<<<<<<<<<<<<< jpayne@69: * data['ref'], jpayne@69: * alt, jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":900 jpayne@69: * str(data['pos']+1), # change to 1-based position jpayne@69: * data['id'], jpayne@69: * data['ref'], # <<<<<<<<<<<<<< jpayne@69: * alt, jpayne@69: * qual, jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_ref); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 900, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":904 jpayne@69: * qual, jpayne@69: * filter, jpayne@69: * self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data['info'], self._info, separator=";"), jpayne@69: * self.format_formatdata( jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_formatdata); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":905 jpayne@69: * filter, jpayne@69: * self.format_formatdata( jpayne@69: * data['info'], self._info, separator=";"), # <<<<<<<<<<<<<< jpayne@69: * self.format_formatdata( jpayne@69: * data['format'], self._format, value=False)] jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_info_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 905, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 905, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":904 jpayne@69: * qual, jpayne@69: * filter, jpayne@69: * self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data['info'], self._info, separator=";"), jpayne@69: * self.format_formatdata( jpayne@69: */ jpayne@69: __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 904, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9)) __PYX_ERR(0, 904, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_10); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10)) __PYX_ERR(0, 904, __pyx_L1_error); jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_10 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":905 jpayne@69: * filter, jpayne@69: * self.format_formatdata( jpayne@69: * data['info'], self._info, separator=";"), # <<<<<<<<<<<<<< jpayne@69: * self.format_formatdata( jpayne@69: * data['format'], self._format, value=False)] jpayne@69: */ jpayne@69: __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 905, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_separator, __pyx_kp_u__6) < 0) __PYX_ERR(0, 905, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":904 jpayne@69: * qual, jpayne@69: * filter, jpayne@69: * self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data['info'], self._info, separator=";"), jpayne@69: * self.format_formatdata( jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 904, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":906 jpayne@69: * self.format_formatdata( jpayne@69: * data['info'], self._info, separator=";"), jpayne@69: * self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data['format'], self._format, value=False)] jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_formatdata); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 906, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":907 jpayne@69: * data['info'], self._info, separator=";"), jpayne@69: * self.format_formatdata( jpayne@69: * data['format'], self._format, value=False)] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * for s in self._samples: jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 907, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":906 jpayne@69: * self.format_formatdata( jpayne@69: * data['info'], self._info, separator=";"), jpayne@69: * self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data['format'], self._format, value=False)] jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 906, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_12); jpayne@69: __Pyx_GIVEREF(__pyx_t_11); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11)) __PYX_ERR(0, 906, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_8); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8)) __PYX_ERR(0, 906, __pyx_L1_error); jpayne@69: __pyx_t_11 = 0; jpayne@69: __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":907 jpayne@69: * data['info'], self._info, separator=";"), jpayne@69: * self.format_formatdata( jpayne@69: * data['format'], self._format, value=False)] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * for s in self._samples: jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_value, Py_False) < 0) __PYX_ERR(0, 907, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":906 jpayne@69: * self.format_formatdata( jpayne@69: * data['info'], self._info, separator=";"), jpayne@69: * self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data['format'], self._format, value=False)] jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 906, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":897 jpayne@69: * else: qual = str(data['qual']) jpayne@69: * jpayne@69: * output = [data['chrom'], # <<<<<<<<<<<<<< jpayne@69: * str(data['pos']+1), # change to 1-based position jpayne@69: * data['id'], jpayne@69: */ jpayne@69: __pyx_t_8 = PyList_New(9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 897, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __Pyx_GIVEREF(__pyx_t_3); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 3, __pyx_t_7)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_alt); jpayne@69: __Pyx_GIVEREF(__pyx_v_alt); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 4, __pyx_v_alt)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_qual); jpayne@69: __Pyx_GIVEREF(__pyx_v_qual); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 5, __pyx_v_qual)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_filter); jpayne@69: __Pyx_GIVEREF(__pyx_v_filter); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 6, __pyx_v_filter)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 7, __pyx_t_9)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_11); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 8, __pyx_t_11)) __PYX_ERR(0, 897, __pyx_L1_error); jpayne@69: __pyx_t_3 = 0; jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_1 = 0; jpayne@69: __pyx_t_7 = 0; jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_11 = 0; jpayne@69: __pyx_v_output = ((PyObject*)__pyx_t_8); jpayne@69: __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":909 jpayne@69: * data['format'], self._format, value=False)] jpayne@69: * jpayne@69: * for s in self._samples: # <<<<<<<<<<<<<< jpayne@69: * output.append(self.format_formatdata( jpayne@69: * data[s], self._format, key=False)) jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { jpayne@69: __pyx_t_11 = __pyx_t_8; __Pyx_INCREF(__pyx_t_11); jpayne@69: __pyx_t_4 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_5)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_11))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_8 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_4 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_8 = __pyx_t_5(__pyx_t_11); jpayne@69: if (unlikely(!__pyx_t_8)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 909, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_8); jpayne@69: __pyx_t_8 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":910 jpayne@69: * jpayne@69: * for s in self._samples: jpayne@69: * output.append(self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data[s], self._format, key=False)) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_formatdata); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 910, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":911 jpayne@69: * for s in self._samples: jpayne@69: * output.append(self.format_formatdata( jpayne@69: * data[s], self._format, key=False)) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * stream.write( "\t".join(output) + "\n" ) jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_v_s); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 911, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 911, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":910 jpayne@69: * jpayne@69: * for s in self._samples: jpayne@69: * output.append(self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data[s], self._format, key=False)) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_GIVEREF(__pyx_t_9); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9)) __PYX_ERR(0, 910, __pyx_L1_error); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7)) __PYX_ERR(0, 910, __pyx_L1_error); jpayne@69: __pyx_t_9 = 0; jpayne@69: __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":911 jpayne@69: * for s in self._samples: jpayne@69: * output.append(self.format_formatdata( jpayne@69: * data[s], self._format, key=False)) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * stream.write( "\t".join(output) + "\n" ) jpayne@69: */ jpayne@69: __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 911, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_key, Py_False) < 0) __PYX_ERR(0, 911, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":910 jpayne@69: * jpayne@69: * for s in self._samples: jpayne@69: * output.append(self.format_formatdata( # <<<<<<<<<<<<<< jpayne@69: * data[s], self._format, key=False)) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 910, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_output, __pyx_t_9); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 910, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":909 jpayne@69: * data['format'], self._format, value=False)] jpayne@69: * jpayne@69: * for s in self._samples: # <<<<<<<<<<<<<< jpayne@69: * output.append(self.format_formatdata( jpayne@69: * data[s], self._format, key=False)) jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":913 jpayne@69: * data[s], self._format, key=False)) jpayne@69: * jpayne@69: * stream.write( "\t".join(output) + "\n" ) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def _parse_header(self, stream): jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 913, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_9); jpayne@69: __pyx_t_7 = PyUnicode_Join(__pyx_kp_u__25, __pyx_v_output); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 913, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_7, __pyx_kp_u__14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_14 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_9))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_9, function); jpayne@69: __pyx_t_14 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1}; jpayne@69: __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 913, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_11); jpayne@69: __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":883 jpayne@69: * jpayne@69: * jpayne@69: * def write_data(self, stream, data): # <<<<<<<<<<<<<< jpayne@69: * required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples jpayne@69: * for k in required: jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_9); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_XDECREF(__pyx_t_12); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.write_data", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_required); jpayne@69: __Pyx_XDECREF(__pyx_v_k); jpayne@69: __Pyx_XDECREF(__pyx_v_alt); jpayne@69: __Pyx_XDECREF(__pyx_v_filter); jpayne@69: __Pyx_XDECREF(__pyx_v_qual); jpayne@69: __Pyx_XDECREF(__pyx_v_output); jpayne@69: __Pyx_XDECREF(__pyx_v_s); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":915 jpayne@69: * stream.write( "\t".join(output) + "\n" ) jpayne@69: * jpayne@69: * def _parse_header(self, stream): # <<<<<<<<<<<<<< jpayne@69: * self._lineno = 0 jpayne@69: * for line in stream: jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_37_parse_header(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_36_parse_header, "VCF._parse_header(self, stream)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_37_parse_header = {"_parse_header", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_37_parse_header, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_36_parse_header}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_37_parse_header(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_stream = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("_parse_header (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("_parse_header", 1, 2, 2, 1); __PYX_ERR(0, 915, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_parse_header") < 0)) __PYX_ERR(0, 915, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_stream = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("_parse_header", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 915, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF._parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_36_parse_header(__pyx_self, __pyx_v_self, __pyx_v_stream); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) { jpayne@69: PyObject *__pyx_v_line = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: Py_ssize_t __pyx_t_2; jpayne@69: PyObject *(*__pyx_t_3)(PyObject *); jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_6; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: unsigned int __pyx_t_8; jpayne@69: int __pyx_t_9; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("_parse_header", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":916 jpayne@69: * jpayne@69: * def _parse_header(self, stream): jpayne@69: * self._lineno = 0 # <<<<<<<<<<<<<< jpayne@69: * for line in stream: jpayne@69: * line = force_str(line, self.encoding) jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lineno, __pyx_int_0) < 0) __PYX_ERR(0, 916, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":917 jpayne@69: * def _parse_header(self, stream): jpayne@69: * self._lineno = 0 jpayne@69: * for line in stream: # <<<<<<<<<<<<<< jpayne@69: * line = force_str(line, self.encoding) jpayne@69: * self._lineno += 1 jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_stream)) || PyTuple_CheckExact(__pyx_v_stream)) { jpayne@69: __pyx_t_1 = __pyx_v_stream; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_3)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 917, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_2 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __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, 917, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 917, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_2 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __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, 917, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_4 = __pyx_t_3(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_4)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 917, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_4); jpayne@69: __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":918 jpayne@69: * self._lineno = 0 jpayne@69: * for line in stream: jpayne@69: * line = force_str(line, self.encoding) # <<<<<<<<<<<<<< jpayne@69: * self._lineno += 1 jpayne@69: * if line.startswith('##'): jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __pyx_t_6.__pyx_n = 1; jpayne@69: __pyx_t_6.encoding = __pyx_t_4; jpayne@69: __pyx_t_5 = __pyx_f_5pysam_9libcutils_force_str(__pyx_v_line, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 918, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_5); jpayne@69: __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":919 jpayne@69: * for line in stream: jpayne@69: * line = force_str(line, self.encoding) jpayne@69: * self._lineno += 1 # <<<<<<<<<<<<<< jpayne@69: * if line.startswith('##'): jpayne@69: * self.parse_header(line.strip()) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lineno, __pyx_t_4) < 0) __PYX_ERR(0, 919, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":920 jpayne@69: * line = force_str(line, self.encoding) jpayne@69: * self._lineno += 1 jpayne@69: * if line.startswith('##'): # <<<<<<<<<<<<<< jpayne@69: * self.parse_header(line.strip()) jpayne@69: * elif line.startswith('#'): jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 920, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_5))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_5, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u__23}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 920, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: } jpayne@69: __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 920, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (__pyx_t_9) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":921 jpayne@69: * self._lineno += 1 jpayne@69: * if line.startswith('##'): jpayne@69: * self.parse_header(line.strip()) # <<<<<<<<<<<<<< jpayne@69: * elif line.startswith('#'): jpayne@69: * self.parse_heading(line.strip()) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_header); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 921, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 921, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_11 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_10))) { jpayne@69: __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); jpayne@69: if (likely(__pyx_t_11)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_10, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; jpayne@69: __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 921, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: } jpayne@69: __pyx_t_10 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_5))) { jpayne@69: __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5); jpayne@69: if (likely(__pyx_t_10)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); jpayne@69: __Pyx_INCREF(__pyx_t_10); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_5, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_7}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 921, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":920 jpayne@69: * line = force_str(line, self.encoding) jpayne@69: * self._lineno += 1 jpayne@69: * if line.startswith('##'): # <<<<<<<<<<<<<< jpayne@69: * self.parse_header(line.strip()) jpayne@69: * elif line.startswith('#'): jpayne@69: */ jpayne@69: goto __pyx_L5; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":922 jpayne@69: * if line.startswith('##'): jpayne@69: * self.parse_header(line.strip()) jpayne@69: * elif line.startswith('#'): # <<<<<<<<<<<<<< jpayne@69: * self.parse_heading(line.strip()) jpayne@69: * self.enter_default_format() jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 922, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_5))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_5, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u__24}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 922, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: } jpayne@69: __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 922, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (__pyx_t_9) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":923 jpayne@69: * self.parse_header(line.strip()) jpayne@69: * elif line.startswith('#'): jpayne@69: * self.parse_heading(line.strip()) # <<<<<<<<<<<<<< jpayne@69: * self.enter_default_format() jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_heading); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 923, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 923, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __pyx_t_11 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_10))) { jpayne@69: __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); jpayne@69: if (likely(__pyx_t_11)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_10, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; jpayne@69: __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 923, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: } jpayne@69: __pyx_t_10 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_5))) { jpayne@69: __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5); jpayne@69: if (likely(__pyx_t_10)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); jpayne@69: __Pyx_INCREF(__pyx_t_10); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_5, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_7}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 923, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":924 jpayne@69: * elif line.startswith('#'): jpayne@69: * self.parse_heading(line.strip()) jpayne@69: * self.enter_default_format() # <<<<<<<<<<<<<< jpayne@69: * else: jpayne@69: * break jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_enter_default_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 924, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_5))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_5, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":922 jpayne@69: * if line.startswith('##'): jpayne@69: * self.parse_header(line.strip()) jpayne@69: * elif line.startswith('#'): # <<<<<<<<<<<<<< jpayne@69: * self.parse_heading(line.strip()) jpayne@69: * self.enter_default_format() jpayne@69: */ jpayne@69: goto __pyx_L5; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":926 jpayne@69: * self.enter_default_format() jpayne@69: * else: jpayne@69: * break # <<<<<<<<<<<<<< jpayne@69: * return line jpayne@69: * jpayne@69: */ jpayne@69: /*else*/ { jpayne@69: goto __pyx_L4_break; jpayne@69: } jpayne@69: __pyx_L5:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":917 jpayne@69: * def _parse_header(self, stream): jpayne@69: * self._lineno = 0 jpayne@69: * for line in stream: # <<<<<<<<<<<<<< jpayne@69: * line = force_str(line, self.encoding) jpayne@69: * self._lineno += 1 jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: goto __pyx_L6_for_end; jpayne@69: __pyx_L4_break:; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: goto __pyx_L6_for_end; jpayne@69: __pyx_L6_for_end:; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":927 jpayne@69: * else: jpayne@69: * break jpayne@69: * return line # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def _parse(self, line, stream): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: if (unlikely(!__pyx_v_line)) { __Pyx_RaiseUnboundLocalError("line"); __PYX_ERR(0, 927, __pyx_L1_error) } jpayne@69: __Pyx_INCREF(__pyx_v_line); jpayne@69: __pyx_r = __pyx_v_line; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":915 jpayne@69: * stream.write( "\t".join(output) + "\n" ) jpayne@69: * jpayne@69: * def _parse_header(self, stream): # <<<<<<<<<<<<<< jpayne@69: * self._lineno = 0 jpayne@69: * for line in stream: jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF._parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_line); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: static PyObject *__pyx_gb_5pysam_7libcvcf_3VCF_40generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":929 jpayne@69: * return line jpayne@69: * jpayne@69: * def _parse(self, line, stream): # <<<<<<<<<<<<<< jpayne@69: * # deal with files with header only jpayne@69: * if line.startswith("##"): return jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_39_parse(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_38_parse, "VCF._parse(self, line, stream)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_39_parse = {"_parse", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_39_parse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_38_parse}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_39_parse(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_line = 0; jpayne@69: PyObject *__pyx_v_stream = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("_parse (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_line,&__pyx_n_s_stream,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, 1); __PYX_ERR(0, 929, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, 2); __PYX_ERR(0, 929, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_parse") < 0)) __PYX_ERR(0, 929, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 3)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_line = values[1]; jpayne@69: __pyx_v_stream = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 929, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF._parse", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_38_parse(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_stream); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_38_parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_stream) { jpayne@69: struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *__pyx_cur_scope; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("_parse", 0); jpayne@69: __pyx_cur_scope = (struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *)__pyx_tp_new_5pysam_7libcvcf___pyx_scope_struct___parse(__pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse, __pyx_empty_tuple, NULL); jpayne@69: if (unlikely(!__pyx_cur_scope)) { jpayne@69: __pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *)Py_None); jpayne@69: __Pyx_INCREF(Py_None); jpayne@69: __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: } else { jpayne@69: __Pyx_GOTREF((PyObject *)__pyx_cur_scope); jpayne@69: } jpayne@69: __pyx_cur_scope->__pyx_v_self = __pyx_v_self; jpayne@69: __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); jpayne@69: __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); jpayne@69: __pyx_cur_scope->__pyx_v_line = __pyx_v_line; jpayne@69: __Pyx_INCREF(__pyx_cur_scope->__pyx_v_line); jpayne@69: __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_line); jpayne@69: __pyx_cur_scope->__pyx_v_stream = __pyx_v_stream; jpayne@69: __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stream); jpayne@69: __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stream); jpayne@69: { jpayne@69: __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pysam_7libcvcf_3VCF_40generator, __pyx_codeobj__29, (PyObject *) __pyx_cur_scope, __pyx_n_s_parse, __pyx_n_s_VCF__parse, __pyx_n_s_pysam_libcvcf); if (unlikely(!gen)) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_cur_scope); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return (PyObject *) gen; jpayne@69: } jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF._parse", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __Pyx_DECREF((PyObject *)__pyx_cur_scope); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_gb_5pysam_7libcvcf_3VCF_40generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ jpayne@69: { jpayne@69: struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *__pyx_cur_scope = ((struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *)__pyx_generator->closure); jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_t_5; jpayne@69: Py_ssize_t __pyx_t_6; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: PyObject *__pyx_t_8 = NULL; jpayne@69: PyObject *(*__pyx_t_9)(PyObject *); jpayne@69: int __pyx_t_10; jpayne@69: PyObject *__pyx_t_11 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("_parse", 0); jpayne@69: switch (__pyx_generator->resume_label) { jpayne@69: case 0: goto __pyx_L3_first_run; jpayne@69: case 1: goto __pyx_L7_resume_from_yield; jpayne@69: case 2: goto __pyx_L14_resume_from_yield; jpayne@69: default: /* CPython raises the right error here */ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: } jpayne@69: __pyx_L3_first_run:; jpayne@69: if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":931 jpayne@69: * def _parse(self, line, stream): jpayne@69: * # deal with files with header only jpayne@69: * if line.startswith("##"): return # <<<<<<<<<<<<<< jpayne@69: * if len(line.strip()) > 0: jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__23}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 931, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_5) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_r = NULL; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":932 jpayne@69: * # deal with files with header only jpayne@69: * if line.startswith("##"): return jpayne@69: * if len(line.strip()) > 0: # <<<<<<<<<<<<<< jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: * if d: yield d jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 932, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_5 = (__pyx_t_6 > 0); jpayne@69: if (__pyx_t_5) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":933 jpayne@69: * if line.startswith("##"): return jpayne@69: * if len(line.strip()) > 0: jpayne@69: * d = self.parse_data( line.strip() ) # <<<<<<<<<<<<<< jpayne@69: * if d: yield d jpayne@69: * for line in stream: jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_parse_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 933, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __pyx_t_8 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_7))) { jpayne@69: __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); jpayne@69: if (likely(__pyx_t_8)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); jpayne@69: __Pyx_INCREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_7, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 933, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: } jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: __pyx_cur_scope->__pyx_v_d = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":934 jpayne@69: * if len(line.strip()) > 0: jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: * if d: yield d # <<<<<<<<<<<<<< jpayne@69: * for line in stream: jpayne@69: * self._lineno += 1 jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_d); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 934, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: __Pyx_INCREF(__pyx_cur_scope->__pyx_v_d); jpayne@69: __pyx_r = __pyx_cur_scope->__pyx_v_d; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: __Pyx_Coroutine_ResetAndClearException(__pyx_generator); jpayne@69: /* return from generator, yielding value */ jpayne@69: __pyx_generator->resume_label = 1; jpayne@69: return __pyx_r; jpayne@69: __pyx_L7_resume_from_yield:; jpayne@69: if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 934, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":932 jpayne@69: * # deal with files with header only jpayne@69: * if line.startswith("##"): return jpayne@69: * if len(line.strip()) > 0: # <<<<<<<<<<<<<< jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: * if d: yield d jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":935 jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: * if d: yield d jpayne@69: * for line in stream: # <<<<<<<<<<<<<< jpayne@69: * self._lineno += 1 jpayne@69: * if self._lines and self._lineno > self._lines: raise StopIteration jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_stream)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_stream)) { jpayne@69: __pyx_t_1 = __pyx_cur_scope->__pyx_v_stream; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_6 = 0; jpayne@69: __pyx_t_9 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_9)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_6 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_9(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_2)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 935, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_line); jpayne@69: __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_line, __pyx_t_2); jpayne@69: __Pyx_GIVEREF(__pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":936 jpayne@69: * if d: yield d jpayne@69: * for line in stream: jpayne@69: * self._lineno += 1 # <<<<<<<<<<<<<< jpayne@69: * if self._lines and self._lineno > self._lines: raise StopIteration jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lineno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lineno, __pyx_t_3) < 0) __PYX_ERR(0, 936, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":937 jpayne@69: * for line in stream: jpayne@69: * self._lineno += 1 jpayne@69: * if self._lines and self._lineno > self._lines: raise StopIteration # <<<<<<<<<<<<<< jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: * if d: yield d jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lines_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 937, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__pyx_t_10) { jpayne@69: } else { jpayne@69: __pyx_t_5 = __pyx_t_10; jpayne@69: goto __pyx_L11_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_lines_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 937, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 937, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __pyx_t_5 = __pyx_t_10; jpayne@69: __pyx_L11_bool_binop_done:; jpayne@69: if (unlikely(__pyx_t_5)) { jpayne@69: __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); jpayne@69: __PYX_ERR(0, 937, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":938 jpayne@69: * self._lineno += 1 jpayne@69: * if self._lines and self._lineno > self._lines: raise StopIteration jpayne@69: * d = self.parse_data( line.strip() ) # <<<<<<<<<<<<<< jpayne@69: * if d: yield d jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_parse_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 938, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_8); jpayne@69: __pyx_t_11 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_8))) { jpayne@69: __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); jpayne@69: if (likely(__pyx_t_11)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); jpayne@69: __Pyx_INCREF(__pyx_t_11); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_8, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; jpayne@69: __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; jpayne@69: if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: } jpayne@69: __pyx_t_8 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_8)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_8); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_3}; jpayne@69: __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_d); jpayne@69: __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_d, __pyx_t_7); jpayne@69: __Pyx_GIVEREF(__pyx_t_7); jpayne@69: __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":939 jpayne@69: * if self._lines and self._lineno > self._lines: raise StopIteration jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: * if d: yield d # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * ###################################################################################################### jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_d); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 939, __pyx_L1_error) jpayne@69: if (__pyx_t_5) { jpayne@69: __Pyx_INCREF(__pyx_cur_scope->__pyx_v_d); jpayne@69: __pyx_r = __pyx_cur_scope->__pyx_v_d; jpayne@69: __Pyx_XGIVEREF(__pyx_t_1); jpayne@69: __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; jpayne@69: __pyx_cur_scope->__pyx_t_1 = __pyx_t_6; jpayne@69: __pyx_cur_scope->__pyx_t_2 = __pyx_t_9; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: __Pyx_Coroutine_ResetAndClearException(__pyx_generator); jpayne@69: /* return from generator, yielding value */ jpayne@69: __pyx_generator->resume_label = 2; jpayne@69: return __pyx_r; jpayne@69: __pyx_L14_resume_from_yield:; jpayne@69: __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; jpayne@69: __pyx_cur_scope->__pyx_t_0 = 0; jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = __pyx_cur_scope->__pyx_t_1; jpayne@69: __pyx_t_9 = __pyx_cur_scope->__pyx_t_2; jpayne@69: if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 939, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":935 jpayne@69: * d = self.parse_data( line.strip() ) jpayne@69: * if d: yield d jpayne@69: * for line in stream: # <<<<<<<<<<<<<< jpayne@69: * self._lineno += 1 jpayne@69: * if self._lines and self._lineno > self._lines: raise StopIteration jpayne@69: */ jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":929 jpayne@69: * return line jpayne@69: * jpayne@69: * def _parse(self, line, stream): # <<<<<<<<<<<<<< jpayne@69: * # deal with files with header only jpayne@69: * if line.startswith("##"): return jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: PyErr_SetNone(PyExc_StopIteration); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_Generator_Replace_StopIteration(0); jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_11); jpayne@69: __Pyx_AddTraceback("_parse", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_r); __pyx_r = 0; jpayne@69: #if !CYTHON_USE_EXC_INFO_STACK jpayne@69: __Pyx_Coroutine_ResetAndClearException(__pyx_generator); jpayne@69: #endif jpayne@69: __pyx_generator->resume_label = -1; jpayne@69: __Pyx_Coroutine_clear((PyObject*)__pyx_generator); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":947 jpayne@69: * ###################################################################################################### jpayne@69: * jpayne@69: * def getsamples(self): # <<<<<<<<<<<<<< jpayne@69: * """ List of samples in VCF file """ jpayne@69: * return self._samples jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_42getsamples(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_41getsamples, "VCF.getsamples(self)\n List of samples in VCF file "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_42getsamples = {"getsamples", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_42getsamples, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_41getsamples}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_42getsamples(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("getsamples (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 947, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getsamples") < 0)) __PYX_ERR(0, 947, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("getsamples", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 947, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getsamples", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_41getsamples(__pyx_self, __pyx_v_self); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_41getsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("getsamples", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":949 jpayne@69: * def getsamples(self): jpayne@69: * """ List of samples in VCF file """ jpayne@69: * return self._samples # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def setsamples(self,samples): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":947 jpayne@69: * ###################################################################################################### jpayne@69: * jpayne@69: * def getsamples(self): # <<<<<<<<<<<<<< jpayne@69: * """ List of samples in VCF file """ jpayne@69: * return self._samples jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getsamples", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":951 jpayne@69: * return self._samples jpayne@69: * jpayne@69: * def setsamples(self,samples): # <<<<<<<<<<<<<< jpayne@69: * """ List of samples in VCF file """ jpayne@69: * self._samples = samples jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_44setsamples(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_43setsamples, "VCF.setsamples(self, samples)\n List of samples in VCF file "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_44setsamples = {"setsamples", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_44setsamples, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_43setsamples}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_44setsamples(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_samples = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("setsamples (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_samples_3,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 951, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_samples_3)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 951, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("setsamples", 1, 2, 2, 1); __PYX_ERR(0, 951, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setsamples") < 0)) __PYX_ERR(0, 951, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_samples = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("setsamples", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 951, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setsamples", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_43setsamples(__pyx_self, __pyx_v_self, __pyx_v_samples); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_43setsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_samples) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("setsamples", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":953 jpayne@69: * def setsamples(self,samples): jpayne@69: * """ List of samples in VCF file """ jpayne@69: * self._samples = samples # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def getheader(self): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_samples, __pyx_v_samples) < 0) __PYX_ERR(0, 953, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":951 jpayne@69: * return self._samples jpayne@69: * jpayne@69: * def setsamples(self,samples): # <<<<<<<<<<<<<< jpayne@69: * """ List of samples in VCF file """ jpayne@69: * self._samples = samples jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setsamples", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":955 jpayne@69: * self._samples = samples jpayne@69: * jpayne@69: * def getheader(self): # <<<<<<<<<<<<<< jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * return self._header jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_46getheader(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_45getheader, "VCF.getheader(self)\n List of header key-value pairs (strings) "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_46getheader = {"getheader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_46getheader, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_45getheader}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_46getheader(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("getheader (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getheader") < 0)) __PYX_ERR(0, 955, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("getheader", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 955, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getheader", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_45getheader(__pyx_self, __pyx_v_self); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_45getheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("getheader", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":957 jpayne@69: * def getheader(self): jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * return self._header # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def setheader(self,header): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":955 jpayne@69: * self._samples = samples jpayne@69: * jpayne@69: * def getheader(self): # <<<<<<<<<<<<<< jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * return self._header jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getheader", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":959 jpayne@69: * return self._header jpayne@69: * jpayne@69: * def setheader(self,header): # <<<<<<<<<<<<<< jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * self._header = header jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_48setheader(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_47setheader, "VCF.setheader(self, header)\n List of header key-value pairs (strings) "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_48setheader = {"setheader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_48setheader, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_47setheader}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_48setheader(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_header = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("setheader (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_header_2,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_header_2)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("setheader", 1, 2, 2, 1); __PYX_ERR(0, 959, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setheader") < 0)) __PYX_ERR(0, 959, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_header = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("setheader", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 959, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setheader", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_47setheader(__pyx_self, __pyx_v_self, __pyx_v_header); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_47setheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_header) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("setheader", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":961 jpayne@69: * def setheader(self,header): jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * self._header = header # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def getinfo(self): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_v_header) < 0) __PYX_ERR(0, 961, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":959 jpayne@69: * return self._header jpayne@69: * jpayne@69: * def setheader(self,header): # <<<<<<<<<<<<<< jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * self._header = header jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setheader", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":963 jpayne@69: * self._header = header jpayne@69: * jpayne@69: * def getinfo(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * return self._info jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_50getinfo(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_49getinfo, "VCF.getinfo(self)\n Dictionary of ##INFO tags, as VCF.FORMAT values "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_50getinfo = {"getinfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_50getinfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_49getinfo}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_50getinfo(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("getinfo (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getinfo") < 0)) __PYX_ERR(0, 963, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("getinfo", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 963, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_49getinfo(__pyx_self, __pyx_v_self); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_49getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("getinfo", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":965 jpayne@69: * def getinfo(self): jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * return self._info # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def setinfo(self,info): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":963 jpayne@69: * self._header = header jpayne@69: * jpayne@69: * def getinfo(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * return self._info jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":967 jpayne@69: * return self._info jpayne@69: * jpayne@69: * def setinfo(self,info): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * self._info = info jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_52setinfo(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_51setinfo, "VCF.setinfo(self, info)\n Dictionary of ##INFO tags, as VCF.FORMAT values "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_52setinfo = {"setinfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_52setinfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_51setinfo}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_52setinfo(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_info = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("setinfo (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_info_2,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_info_2)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("setinfo", 1, 2, 2, 1); __PYX_ERR(0, 967, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setinfo") < 0)) __PYX_ERR(0, 967, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_info = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("setinfo", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 967, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_51setinfo(__pyx_self, __pyx_v_self, __pyx_v_info); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_51setinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("setinfo", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":969 jpayne@69: * def setinfo(self,info): jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * self._info = info # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def getformat(self): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_info, __pyx_v_info) < 0) __PYX_ERR(0, 969, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":967 jpayne@69: * return self._info jpayne@69: * jpayne@69: * def setinfo(self,info): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * self._info = info jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":971 jpayne@69: * self._info = info jpayne@69: * jpayne@69: * def getformat(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * return self._format jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_54getformat(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_53getformat, "VCF.getformat(self)\n Dictionary of ##FORMAT tags, as VCF.FORMAT values "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_54getformat = {"getformat", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_54getformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_53getformat}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_54getformat(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("getformat (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 971, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getformat") < 0)) __PYX_ERR(0, 971, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("getformat", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 971, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getformat", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_53getformat(__pyx_self, __pyx_v_self); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_53getformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("getformat", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":973 jpayne@69: * def getformat(self): jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * return self._format # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def setformat(self,format): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":971 jpayne@69: * self._info = info jpayne@69: * jpayne@69: * def getformat(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * return self._format jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getformat", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":975 jpayne@69: * return self._format jpayne@69: * jpayne@69: * def setformat(self,format): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * self._format = format jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_56setformat(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_55setformat, "VCF.setformat(self, format)\n Dictionary of ##FORMAT tags, as VCF.FORMAT values "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_56setformat = {"setformat", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_56setformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_55setformat}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_56setformat(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_format = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("setformat (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_format,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 975, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 975, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("setformat", 1, 2, 2, 1); __PYX_ERR(0, 975, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setformat") < 0)) __PYX_ERR(0, 975, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_format = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("setformat", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 975, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setformat", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_55setformat(__pyx_self, __pyx_v_self, __pyx_v_format); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_55setformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("setformat", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":977 jpayne@69: * def setformat(self,format): jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * self._format = format # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def getfilter(self): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_format_2, __pyx_v_format) < 0) __PYX_ERR(0, 977, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":975 jpayne@69: * return self._format jpayne@69: * jpayne@69: * def setformat(self,format): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * self._format = format jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setformat", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":979 jpayne@69: * self._format = format jpayne@69: * jpayne@69: * def getfilter(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * return self._filter jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_58getfilter(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_57getfilter, "VCF.getfilter(self)\n Dictionary of ##FILTER tags, as VCF.FORMAT values "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_58getfilter = {"getfilter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_58getfilter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_57getfilter}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_58getfilter(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("getfilter (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 979, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getfilter") < 0)) __PYX_ERR(0, 979, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("getfilter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 979, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getfilter", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_57getfilter(__pyx_self, __pyx_v_self); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_57getfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("getfilter", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":981 jpayne@69: * def getfilter(self): jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * return self._filter # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def setfilter(self,filter): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":979 jpayne@69: * self._format = format jpayne@69: * jpayne@69: * def getfilter(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * return self._filter jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.getfilter", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":983 jpayne@69: * return self._filter jpayne@69: * jpayne@69: * def setfilter(self,filter): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * self._filter = filter jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_60setfilter(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_59setfilter, "VCF.setfilter(self, filter)\n Dictionary of ##FILTER tags, as VCF.FORMAT values "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_60setfilter = {"setfilter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_60setfilter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_59setfilter}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_60setfilter(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_filter = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("setfilter (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filter_2,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 983, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filter_2)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 983, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("setfilter", 1, 2, 2, 1); __PYX_ERR(0, 983, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setfilter") < 0)) __PYX_ERR(0, 983, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_filter = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("setfilter", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 983, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setfilter", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_59setfilter(__pyx_self, __pyx_v_self, __pyx_v_filter); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_59setfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filter) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("setfilter", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":985 jpayne@69: * def setfilter(self,filter): jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * self._filter = filter # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def setversion(self, version): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filter, __pyx_v_filter) < 0) __PYX_ERR(0, 985, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":983 jpayne@69: * return self._filter jpayne@69: * jpayne@69: * def setfilter(self,filter): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * self._filter = filter jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setfilter", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":987 jpayne@69: * self._filter = filter jpayne@69: * jpayne@69: * def setversion(self, version): # <<<<<<<<<<<<<< jpayne@69: * if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files") jpayne@69: * self._version = version jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_62setversion(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_61setversion, "VCF.setversion(self, version)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_62setversion = {"setversion", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_62setversion, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_61setversion}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_62setversion(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_version = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("setversion (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_version_2,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 987, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_version_2)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 987, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("setversion", 1, 2, 2, 1); __PYX_ERR(0, 987, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setversion") < 0)) __PYX_ERR(0, 987, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_version = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("setversion", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 987, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setversion", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_61setversion(__pyx_self, __pyx_v_self, __pyx_v_version); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_61setversion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_version) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_t_1; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("setversion", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":988 jpayne@69: * jpayne@69: * def setversion(self, version): jpayne@69: * if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files") # <<<<<<<<<<<<<< jpayne@69: * self._version = version jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_version, __pyx_int_33, 33, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 988, __pyx_L1_error) jpayne@69: if (__pyx_t_2) { jpayne@69: } else { jpayne@69: __pyx_t_1 = __pyx_t_2; jpayne@69: goto __pyx_L4_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_2 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_version, __pyx_int_40, 40, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 988, __pyx_L1_error) jpayne@69: __pyx_t_1 = __pyx_t_2; jpayne@69: __pyx_L4_bool_binop_done:; jpayne@69: if (unlikely(__pyx_t_1)) { jpayne@69: __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_Raise(__pyx_t_3, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __PYX_ERR(0, 988, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":989 jpayne@69: * def setversion(self, version): jpayne@69: * if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files") jpayne@69: * self._version = version # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def setregions(self, regions): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_version, __pyx_v_version) < 0) __PYX_ERR(0, 989, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":987 jpayne@69: * self._filter = filter jpayne@69: * jpayne@69: * def setversion(self, version): # <<<<<<<<<<<<<< jpayne@69: * if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files") jpayne@69: * self._version = version jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setversion", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":991 jpayne@69: * self._version = version jpayne@69: * jpayne@69: * def setregions(self, regions): # <<<<<<<<<<<<<< jpayne@69: * self._regions = regions jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_64setregions(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_63setregions, "VCF.setregions(self, regions)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_64setregions = {"setregions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_64setregions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_63setregions}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_64setregions(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_regions = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("setregions (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_regions,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_regions)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("setregions", 1, 2, 2, 1); __PYX_ERR(0, 991, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setregions") < 0)) __PYX_ERR(0, 991, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_regions = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("setregions", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 991, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setregions", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_63setregions(__pyx_self, __pyx_v_self, __pyx_v_regions); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_63setregions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_regions) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("setregions", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":992 jpayne@69: * jpayne@69: * def setregions(self, regions): jpayne@69: * self._regions = regions # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def setreference(self, ref): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_regions_2, __pyx_v_regions) < 0) __PYX_ERR(0, 992, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":991 jpayne@69: * self._version = version jpayne@69: * jpayne@69: * def setregions(self, regions): # <<<<<<<<<<<<<< jpayne@69: * self._regions = regions jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setregions", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":994 jpayne@69: * self._regions = regions jpayne@69: * jpayne@69: * def setreference(self, ref): # <<<<<<<<<<<<<< jpayne@69: * """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """ jpayne@69: * self._reference = ref jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_66setreference(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_65setreference, "VCF.setreference(self, ref)\n Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_66setreference = {"setreference", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_66setreference, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_65setreference}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_66setreference(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_ref = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("setreference (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ref,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("setreference", 1, 2, 2, 1); __PYX_ERR(0, 994, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setreference") < 0)) __PYX_ERR(0, 994, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_ref = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("setreference", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 994, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setreference", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_65setreference(__pyx_self, __pyx_v_self, __pyx_v_ref); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_65setreference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ref) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("setreference", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":996 jpayne@69: * def setreference(self, ref): jpayne@69: * """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """ jpayne@69: * self._reference = ref # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def ignoreerror(self, errorstring): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reference_2, __pyx_v_ref) < 0) __PYX_ERR(0, 996, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":994 jpayne@69: * self._regions = regions jpayne@69: * jpayne@69: * def setreference(self, ref): # <<<<<<<<<<<<<< jpayne@69: * """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """ jpayne@69: * self._reference = ref jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.setreference", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":998 jpayne@69: * self._reference = ref jpayne@69: * jpayne@69: * def ignoreerror(self, errorstring): # <<<<<<<<<<<<<< jpayne@69: * try: self._ignored_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_68ignoreerror(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_67ignoreerror, "VCF.ignoreerror(self, errorstring)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_68ignoreerror = {"ignoreerror", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_68ignoreerror, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_67ignoreerror}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_68ignoreerror(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_errorstring = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("ignoreerror (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_errorstring,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_errorstring)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("ignoreerror", 1, 2, 2, 1); __PYX_ERR(0, 998, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "ignoreerror") < 0)) __PYX_ERR(0, 998, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_errorstring = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("ignoreerror", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 998, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.ignoreerror", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_67ignoreerror(__pyx_self, __pyx_v_self, __pyx_v_errorstring); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: unsigned int __pyx_t_8; jpayne@69: int __pyx_t_9; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("ignoreerror", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":999 jpayne@69: * jpayne@69: * def ignoreerror(self, errorstring): jpayne@69: * try: self._ignored_errors.add(self.__dict__[errorstring]) # <<<<<<<<<<<<<< jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_2); jpayne@69: __Pyx_XGOTREF(__pyx_t_3); jpayne@69: /*try:*/ { jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ignored_errors); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 999, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_add); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 999, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 999, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_errorstring); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 999, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 999, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: goto __pyx_L8_try_end; jpayne@69: __pyx_L3_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1000 jpayne@69: * def ignoreerror(self, errorstring): jpayne@69: * try: self._ignored_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def warnerror(self, errorstring): jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); jpayne@69: if (__pyx_t_9) { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.ignoreerror", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1000, __pyx_L5_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_4); jpayne@69: __Pyx_XGOTREF(__pyx_t_6); jpayne@69: __Pyx_XGOTREF(__pyx_t_7); jpayne@69: __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Invalid_error_string_s, __pyx_v_errorstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1000, __pyx_L5_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1000, __pyx_L5_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_Raise(__pyx_t_10, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __PYX_ERR(0, 1000, __pyx_L5_except_error) jpayne@69: } jpayne@69: goto __pyx_L5_except_error; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":999 jpayne@69: * jpayne@69: * def ignoreerror(self, errorstring): jpayne@69: * try: self._ignored_errors.add(self.__dict__[errorstring]) # <<<<<<<<<<<<<< jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_L5_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_1); jpayne@69: __Pyx_XGIVEREF(__pyx_t_2); jpayne@69: __Pyx_XGIVEREF(__pyx_t_3); jpayne@69: __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L8_try_end:; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":998 jpayne@69: * self._reference = ref jpayne@69: * jpayne@69: * def ignoreerror(self, errorstring): # <<<<<<<<<<<<<< jpayne@69: * try: self._ignored_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.ignoreerror", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1002 jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: * def warnerror(self, errorstring): # <<<<<<<<<<<<<< jpayne@69: * try: self._warn_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_70warnerror(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_69warnerror, "VCF.warnerror(self, errorstring)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_70warnerror = {"warnerror", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_70warnerror, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_69warnerror}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_70warnerror(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_errorstring = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("warnerror (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_errorstring,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1002, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_errorstring)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1002, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("warnerror", 1, 2, 2, 1); __PYX_ERR(0, 1002, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "warnerror") < 0)) __PYX_ERR(0, 1002, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_errorstring = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("warnerror", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1002, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.warnerror", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_69warnerror(__pyx_self, __pyx_v_self, __pyx_v_errorstring); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: unsigned int __pyx_t_8; jpayne@69: int __pyx_t_9; jpayne@69: PyObject *__pyx_t_10 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("warnerror", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1003 jpayne@69: * jpayne@69: * def warnerror(self, errorstring): jpayne@69: * try: self._warn_errors.add(self.__dict__[errorstring]) # <<<<<<<<<<<<<< jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: */ jpayne@69: { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); jpayne@69: __Pyx_XGOTREF(__pyx_t_1); jpayne@69: __Pyx_XGOTREF(__pyx_t_2); jpayne@69: __Pyx_XGOTREF(__pyx_t_3); jpayne@69: /*try:*/ { jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_warn_errors); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1003, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_add); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1003, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1003, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_errorstring); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1003, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_7); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_5 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_5)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L3_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: goto __pyx_L8_try_end; jpayne@69: __pyx_L3_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1004 jpayne@69: * def warnerror(self, errorstring): jpayne@69: * try: self._warn_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def parse(self, stream): jpayne@69: */ jpayne@69: __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); jpayne@69: if (__pyx_t_9) { jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.warnerror", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1004, __pyx_L5_except_error) jpayne@69: __Pyx_XGOTREF(__pyx_t_4); jpayne@69: __Pyx_XGOTREF(__pyx_t_6); jpayne@69: __Pyx_XGOTREF(__pyx_t_7); jpayne@69: __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Invalid_error_string_s, __pyx_v_errorstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1004, __pyx_L5_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1004, __pyx_L5_except_error) jpayne@69: __Pyx_GOTREF(__pyx_t_10); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_Raise(__pyx_t_10, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; jpayne@69: __PYX_ERR(0, 1004, __pyx_L5_except_error) jpayne@69: } jpayne@69: goto __pyx_L5_except_error; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1003 jpayne@69: * jpayne@69: * def warnerror(self, errorstring): jpayne@69: * try: self._warn_errors.add(self.__dict__[errorstring]) # <<<<<<<<<<<<<< jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_L5_except_error:; jpayne@69: __Pyx_XGIVEREF(__pyx_t_1); jpayne@69: __Pyx_XGIVEREF(__pyx_t_2); jpayne@69: __Pyx_XGIVEREF(__pyx_t_3); jpayne@69: __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); jpayne@69: goto __pyx_L1_error; jpayne@69: __pyx_L8_try_end:; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1002 jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: * def warnerror(self, errorstring): # <<<<<<<<<<<<<< jpayne@69: * try: self._warn_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_XDECREF(__pyx_t_10); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.warnerror", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1006 jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: * def parse(self, stream): # <<<<<<<<<<<<<< jpayne@69: * """ Parse a stream of VCF-formatted lines. Initializes class instance and return generator """ jpayne@69: * last_line = self._parse_header(stream) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_72parse(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_71parse, "VCF.parse(self, stream)\n Parse a stream of VCF-formatted lines. Initializes class instance and return generator "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_72parse = {"parse", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_72parse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_71parse}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_72parse(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_stream = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("parse (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, 1); __PYX_ERR(0, 1006, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse") < 0)) __PYX_ERR(0, 1006, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_stream = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1006, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_71parse(__pyx_self, __pyx_v_self, __pyx_v_stream); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) { jpayne@69: PyObject *__pyx_v_last_line = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("parse", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1008 jpayne@69: * def parse(self, stream): jpayne@69: * """ Parse a stream of VCF-formatted lines. Initializes class instance and return generator """ jpayne@69: * last_line = self._parse_header(stream) # <<<<<<<<<<<<<< jpayne@69: * # now return a generator that does the actual work. In this way the pre-processing is done jpayne@69: * # before the first piece of data is yielded jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_header_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_stream}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_v_last_line = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1011 jpayne@69: * # now return a generator that does the actual work. In this way the pre-processing is done jpayne@69: * # before the first piece of data is yielded jpayne@69: * return self._parse(last_line, stream) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def write(self, stream, datagenerator): jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_last_line, __pyx_v_stream}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1006 jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: * def parse(self, stream): # <<<<<<<<<<<<<< jpayne@69: * """ Parse a stream of VCF-formatted lines. Initializes class instance and return generator """ jpayne@69: * last_line = self._parse_header(stream) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_last_line); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1013 jpayne@69: * return self._parse(last_line, stream) jpayne@69: * jpayne@69: * def write(self, stream, datagenerator): # <<<<<<<<<<<<<< jpayne@69: * """ Writes a VCF file to a stream, using a data generator (or list) """ jpayne@69: * self.write_header(stream) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_74write(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_73write, "VCF.write(self, stream, datagenerator)\n Writes a VCF file to a stream, using a data generator (or list) "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_74write = {"write", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_74write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_73write}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_74write(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_stream = 0; jpayne@69: PyObject *__pyx_v_datagenerator = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("write (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,&__pyx_n_s_datagenerator,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 1); __PYX_ERR(0, 1013, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_datagenerator)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 2); __PYX_ERR(0, 1013, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 1013, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 3)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_stream = values[1]; jpayne@69: __pyx_v_datagenerator = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1013, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.write", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_73write(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_datagenerator); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_73write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_datagenerator) { jpayne@69: PyObject *__pyx_v_data = NULL; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: Py_ssize_t __pyx_t_5; jpayne@69: PyObject *(*__pyx_t_6)(PyObject *); jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("write", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1015 jpayne@69: * def write(self, stream, datagenerator): jpayne@69: * """ Writes a VCF file to a stream, using a data generator (or list) """ jpayne@69: * self.write_header(stream) # <<<<<<<<<<<<<< jpayne@69: * self.write_heading(stream) jpayne@69: * for data in datagenerator: self.write_data(stream,data) jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_header); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_stream}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1016 jpayne@69: * """ Writes a VCF file to a stream, using a data generator (or list) """ jpayne@69: * self.write_header(stream) jpayne@69: * self.write_heading(stream) # <<<<<<<<<<<<<< jpayne@69: * for data in datagenerator: self.write_data(stream,data) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_heading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_stream}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1017 jpayne@69: * self.write_header(stream) jpayne@69: * self.write_heading(stream) jpayne@69: * for data in datagenerator: self.write_data(stream,data) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def writeheader(self, stream): jpayne@69: */ jpayne@69: if (likely(PyList_CheckExact(__pyx_v_datagenerator)) || PyTuple_CheckExact(__pyx_v_datagenerator)) { jpayne@69: __pyx_t_1 = __pyx_v_datagenerator; __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_t_5 = 0; jpayne@69: __pyx_t_6 = NULL; jpayne@69: } else { jpayne@69: __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_datagenerator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: } jpayne@69: for (;;) { jpayne@69: if (likely(!__pyx_t_6)) { jpayne@69: if (likely(PyList_CheckExact(__pyx_t_1))) { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_5 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } else { jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); jpayne@69: #if !CYTHON_ASSUME_SAFE_MACROS jpayne@69: if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_t_5 >= __pyx_temp) break; jpayne@69: } jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_6(__pyx_t_1); jpayne@69: if (unlikely(!__pyx_t_2)) { jpayne@69: PyObject* exc_type = PyErr_Occurred(); jpayne@69: if (exc_type) { jpayne@69: if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); jpayne@69: else __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: } jpayne@69: __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_2); jpayne@69: __pyx_t_2 = 0; jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_stream, __pyx_v_data}; jpayne@69: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1013 jpayne@69: * return self._parse(last_line, stream) jpayne@69: * jpayne@69: * def write(self, stream, datagenerator): # <<<<<<<<<<<<<< jpayne@69: * """ Writes a VCF file to a stream, using a data generator (or list) """ jpayne@69: * self.write_header(stream) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.write", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_data); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1019 jpayne@69: * for data in datagenerator: self.write_data(stream,data) jpayne@69: * jpayne@69: * def writeheader(self, stream): # <<<<<<<<<<<<<< jpayne@69: * """ Writes a VCF header """ jpayne@69: * self.write_header(stream) jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_76writeheader(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_75writeheader, "VCF.writeheader(self, stream)\n Writes a VCF header "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_76writeheader = {"writeheader", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_76writeheader, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_75writeheader}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_76writeheader(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_stream = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("writeheader (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stream)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("writeheader", 1, 2, 2, 1); __PYX_ERR(0, 1019, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "writeheader") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_stream = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("writeheader", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1019, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.writeheader", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_75writeheader(__pyx_self, __pyx_v_self, __pyx_v_stream); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_75writeheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("writeheader", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1021 jpayne@69: * def writeheader(self, stream): jpayne@69: * """ Writes a VCF header """ jpayne@69: * self.write_header(stream) # <<<<<<<<<<<<<< jpayne@69: * self.write_heading(stream) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_header); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_stream}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1022 jpayne@69: * """ Writes a VCF header """ jpayne@69: * self.write_header(stream) jpayne@69: * self.write_heading(stream) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2): jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_heading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_stream}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1019 jpayne@69: * for data in datagenerator: self.write_data(stream,data) jpayne@69: * jpayne@69: * def writeheader(self, stream): # <<<<<<<<<<<<<< jpayne@69: * """ Writes a VCF header """ jpayne@69: * self.write_header(stream) jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.writeheader", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1024 jpayne@69: * self.write_heading(stream) jpayne@69: * jpayne@69: * def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2): # <<<<<<<<<<<<<< jpayne@69: * """ Utility function: compares two calls for equality """ jpayne@69: * # a variant should always be assigned to a unique position, one base before jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_78compare_calls(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_77compare_calls, "VCF.compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2)\n Utility function: compares two calls for equality "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_78compare_calls = {"compare_calls", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_78compare_calls, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_77compare_calls}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_78compare_calls(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: CYTHON_UNUSED PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_pos1 = 0; jpayne@69: PyObject *__pyx_v_ref1 = 0; jpayne@69: PyObject *__pyx_v_alt1 = 0; jpayne@69: PyObject *__pyx_v_pos2 = 0; jpayne@69: PyObject *__pyx_v_ref2 = 0; jpayne@69: PyObject *__pyx_v_alt2 = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[7] = {0,0,0,0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("compare_calls (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pos1,&__pyx_n_s_ref1,&__pyx_n_s_alt1,&__pyx_n_s_pos2,&__pyx_n_s_ref2,&__pyx_n_s_alt2,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos1)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 1); __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref1)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 2); __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alt1)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 3); __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pos2)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 4); __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 5: jpayne@69: if (likely((values[5] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref2)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[5]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 5); __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 6: jpayne@69: if (likely((values[6] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alt2)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[6]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 6); __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compare_calls") < 0)) __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 7)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); jpayne@69: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_pos1 = values[1]; jpayne@69: __pyx_v_ref1 = values[2]; jpayne@69: __pyx_v_alt1 = values[3]; jpayne@69: __pyx_v_pos2 = values[4]; jpayne@69: __pyx_v_ref2 = values[5]; jpayne@69: __pyx_v_alt2 = values[6]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 1024, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.compare_calls", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_77compare_calls(__pyx_self, __pyx_v_self, __pyx_v_pos1, __pyx_v_ref1, __pyx_v_alt1, __pyx_v_pos2, __pyx_v_ref2, __pyx_v_alt2); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_pos1, PyObject *__pyx_v_ref1, PyObject *__pyx_v_alt1, PyObject *__pyx_v_pos2, PyObject *__pyx_v_ref2, PyObject *__pyx_v_alt2) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: Py_ssize_t __pyx_t_3; jpayne@69: int __pyx_t_4; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("compare_calls", 0); jpayne@69: __Pyx_INCREF(__pyx_v_ref1); jpayne@69: __Pyx_INCREF(__pyx_v_alt1); jpayne@69: __Pyx_INCREF(__pyx_v_ref2); jpayne@69: __Pyx_INCREF(__pyx_v_alt2); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1029 jpayne@69: * # the leftmost position of the alignment gap. If this rule is implemented jpayne@69: * # correctly, the two positions must be equal for the calls to be identical. jpayne@69: * if pos1 != pos2: return False # <<<<<<<<<<<<<< jpayne@69: * # from both calls, trim rightmost bases when identical. Do this safely, i.e. jpayne@69: * # only when the reference bases are not Ns jpayne@69: */ jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos1, __pyx_v_pos2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error) jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1029, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(Py_False); jpayne@69: __pyx_r = Py_False; jpayne@69: goto __pyx_L0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1032 jpayne@69: * # from both calls, trim rightmost bases when identical. Do this safely, i.e. jpayne@69: * # only when the reference bases are not Ns jpayne@69: * while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]: # <<<<<<<<<<<<<< jpayne@69: * ref1 = ref1[:-1] jpayne@69: * alt1 = alt1[:-1] jpayne@69: */ jpayne@69: while (1) { jpayne@69: __pyx_t_3 = PyObject_Length(__pyx_v_ref1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1032, __pyx_L1_error) jpayne@69: __pyx_t_4 = (__pyx_t_3 > 0); jpayne@69: if (__pyx_t_4) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: goto __pyx_L6_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_3 = PyObject_Length(__pyx_v_alt1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1032, __pyx_L1_error) jpayne@69: __pyx_t_4 = (__pyx_t_3 > 0); jpayne@69: if (__pyx_t_4) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: goto __pyx_L6_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ref1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_alt1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1032, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1032, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1032, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: __pyx_L6_bool_binop_done:; jpayne@69: if (!__pyx_t_2) break; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1033 jpayne@69: * # only when the reference bases are not Ns jpayne@69: * while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]: jpayne@69: * ref1 = ref1[:-1] # <<<<<<<<<<<<<< jpayne@69: * alt1 = alt1[:-1] jpayne@69: * while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]: jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_ref1, 0, -1L, NULL, NULL, &__pyx_slice__28, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1033, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref1, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1034 jpayne@69: * while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]: jpayne@69: * ref1 = ref1[:-1] jpayne@69: * alt1 = alt1[:-1] # <<<<<<<<<<<<<< jpayne@69: * while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]: jpayne@69: * ref2 = ref2[:-1] jpayne@69: */ jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_alt1, 0, -1L, NULL, NULL, &__pyx_slice__28, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1034, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt1, __pyx_t_6); jpayne@69: __pyx_t_6 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1035 jpayne@69: * ref1 = ref1[:-1] jpayne@69: * alt1 = alt1[:-1] jpayne@69: * while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]: # <<<<<<<<<<<<<< jpayne@69: * ref2 = ref2[:-1] jpayne@69: * alt2 = alt2[:-1] jpayne@69: */ jpayne@69: while (1) { jpayne@69: __pyx_t_3 = PyObject_Length(__pyx_v_ref2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1035, __pyx_L1_error) jpayne@69: __pyx_t_4 = (__pyx_t_3 > 0); jpayne@69: if (__pyx_t_4) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: goto __pyx_L11_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_3 = PyObject_Length(__pyx_v_alt2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1035, __pyx_L1_error) jpayne@69: __pyx_t_4 = (__pyx_t_3 > 0); jpayne@69: if (__pyx_t_4) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: goto __pyx_L11_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ref2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1035, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_alt2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1035, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1035, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: __pyx_L11_bool_binop_done:; jpayne@69: if (!__pyx_t_2) break; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1036 jpayne@69: * alt1 = alt1[:-1] jpayne@69: * while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]: jpayne@69: * ref2 = ref2[:-1] # <<<<<<<<<<<<<< jpayne@69: * alt2 = alt2[:-1] jpayne@69: * # now, the alternative alleles must be identical jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_ref2, 0, -1L, NULL, NULL, &__pyx_slice__28, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_ref2, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1037 jpayne@69: * while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]: jpayne@69: * ref2 = ref2[:-1] jpayne@69: * alt2 = alt2[:-1] # <<<<<<<<<<<<<< jpayne@69: * # now, the alternative alleles must be identical jpayne@69: * return alt1 == alt2 jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_alt2, 0, -1L, NULL, NULL, &__pyx_slice__28, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF_SET(__pyx_v_alt2, __pyx_t_1); jpayne@69: __pyx_t_1 = 0; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1039 jpayne@69: * alt2 = alt2[:-1] jpayne@69: * # now, the alternative alleles must be identical jpayne@69: * return alt1 == alt2 # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * ########################################################################################################### jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt1, __pyx_v_alt2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) jpayne@69: __pyx_r = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1024 jpayne@69: * self.write_heading(stream) jpayne@69: * jpayne@69: * def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2): # <<<<<<<<<<<<<< jpayne@69: * """ Utility function: compares two calls for equality """ jpayne@69: * # a variant should always be assigned to a unique position, one base before jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.compare_calls", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v_ref1); jpayne@69: __Pyx_XDECREF(__pyx_v_alt1); jpayne@69: __Pyx_XDECREF(__pyx_v_ref2); jpayne@69: __Pyx_XDECREF(__pyx_v_alt2); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1046 jpayne@69: * ########################################################################################################### jpayne@69: * jpayne@69: * def connect(self, filename, encoding="ascii"): # <<<<<<<<<<<<<< jpayne@69: * '''connect to tabix file.''' jpayne@69: * self.encoding=encoding jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_80connect(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_79connect, "VCF.connect(self, filename, encoding=u'ascii')\nconnect to tabix file."); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_80connect = {"connect", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_80connect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_79connect}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_80connect(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_filename = 0; jpayne@69: PyObject *__pyx_v_encoding = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("connect (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_filename,&__pyx_n_s_encoding,0}; jpayne@69: values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_u_ascii))); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("connect", 0, 2, 3, 1); __PYX_ERR(0, 1046, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding); jpayne@69: if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "connect") < 0)) __PYX_ERR(0, 1046, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_filename = values[1]; jpayne@69: __pyx_v_encoding = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("connect", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1046, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_79connect(__pyx_self, __pyx_v_self, __pyx_v_filename, __pyx_v_encoding); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_79connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_encoding) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: unsigned int __pyx_t_5; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("connect", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1048 jpayne@69: * def connect(self, filename, encoding="ascii"): jpayne@69: * '''connect to tabix file.''' jpayne@69: * self.encoding=encoding # <<<<<<<<<<<<<< jpayne@69: * self.tabixfile = pysam.Tabixfile(filename, encoding=encoding) jpayne@69: * self._parse_header(self.tabixfile.header) jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_encoding, __pyx_v_encoding) < 0) __PYX_ERR(0, 1048, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1049 jpayne@69: * '''connect to tabix file.''' jpayne@69: * self.encoding=encoding jpayne@69: * self.tabixfile = pysam.Tabixfile(filename, encoding=encoding) # <<<<<<<<<<<<<< jpayne@69: * self._parse_header(self.tabixfile.header) jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pysam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Tabixfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_v_filename); jpayne@69: __Pyx_GIVEREF(__pyx_v_filename); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename)) __PYX_ERR(0, 1049, __pyx_L1_error); jpayne@69: __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) __PYX_ERR(0, 1049, __pyx_L1_error) jpayne@69: __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1049, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile, __pyx_t_4) < 0) __PYX_ERR(0, 1049, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1050 jpayne@69: * self.encoding=encoding jpayne@69: * self.tabixfile = pysam.Tabixfile(filename, encoding=encoding) jpayne@69: * self._parse_header(self.tabixfile.header) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def __del__(self): jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_header_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1050, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_header_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_1)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2}; jpayne@69: __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1050, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1046 jpayne@69: * ########################################################################################################### jpayne@69: * jpayne@69: * def connect(self, filename, encoding="ascii"): # <<<<<<<<<<<<<< jpayne@69: * '''connect to tabix file.''' jpayne@69: * self.encoding=encoding jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1052 jpayne@69: * self._parse_header(self.tabixfile.header) jpayne@69: * jpayne@69: * def __del__(self): # <<<<<<<<<<<<<< jpayne@69: * self.close() jpayne@69: * self.tabixfile = None jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_82__del__(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_81__del__, "VCF.__del__(self)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_82__del__ = {"__del__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_82__del__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_81__del__}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_82__del__(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__del__") < 0)) __PYX_ERR(0, 1052, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("__del__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1052, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_81__del__(__pyx_self, __pyx_v_self); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_81__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: unsigned int __pyx_t_4; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__del__", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1053 jpayne@69: * jpayne@69: * def __del__(self): jpayne@69: * self.close() # <<<<<<<<<<<<<< jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_4 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_2))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_2, function); jpayne@69: __pyx_t_4 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1054 jpayne@69: * def __del__(self): jpayne@69: * self.close() jpayne@69: * self.tabixfile = None # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def close(self): jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile, Py_None) < 0) __PYX_ERR(0, 1054, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1052 jpayne@69: * self._parse_header(self.tabixfile.header) jpayne@69: * jpayne@69: * def __del__(self): # <<<<<<<<<<<<<< jpayne@69: * self.close() jpayne@69: * self.tabixfile = None jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1056 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def close(self): # <<<<<<<<<<<<<< jpayne@69: * if self.tabixfile: jpayne@69: * self.tabixfile.close() jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_84close(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_83close, "VCF.close(self)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_84close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_84close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_83close}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_84close(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[1] = {0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("close (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1056, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "close") < 0)) __PYX_ERR(0, 1056, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 1)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("close", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1056, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.close", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_83close(__pyx_self, __pyx_v_self); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_83close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: unsigned int __pyx_t_5; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("close", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1057 jpayne@69: * jpayne@69: * def close(self): jpayne@69: * if self.tabixfile: # <<<<<<<<<<<<<< jpayne@69: * self.tabixfile.close() jpayne@69: * self.tabixfile = None jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1057, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1058 jpayne@69: * def close(self): jpayne@69: * if self.tabixfile: jpayne@69: * self.tabixfile.close() # <<<<<<<<<<<<<< jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_4))) { jpayne@69: __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); jpayne@69: if (likely(__pyx_t_3)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); jpayne@69: __Pyx_INCREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_4, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1059 jpayne@69: * if self.tabixfile: jpayne@69: * self.tabixfile.close() jpayne@69: * self.tabixfile = None # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def fetch(self, jpayne@69: */ jpayne@69: if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile, Py_None) < 0) __PYX_ERR(0, 1059, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1057 jpayne@69: * jpayne@69: * def close(self): jpayne@69: * if self.tabixfile: # <<<<<<<<<<<<<< jpayne@69: * self.tabixfile.close() jpayne@69: * self.tabixfile = None jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1056 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def close(self): # <<<<<<<<<<<<<< jpayne@69: * if self.tabixfile: jpayne@69: * self.tabixfile.close() jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.close", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1061 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def fetch(self, # <<<<<<<<<<<<<< jpayne@69: * reference=None, jpayne@69: * start=None, jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_86fetch(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_85fetch, "VCF.fetch(self, reference=None, start=None, end=None, region=None)\n Parse a stream of VCF-formatted lines.\n Initializes class instance and return generator "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_86fetch = {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_86fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_85fetch}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_86fetch(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v_self = 0; jpayne@69: PyObject *__pyx_v_reference = 0; jpayne@69: PyObject *__pyx_v_start = 0; jpayne@69: PyObject *__pyx_v_end = 0; jpayne@69: PyObject *__pyx_v_region = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[5] = {0,0,0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("fetch (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,0}; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1062 jpayne@69: * jpayne@69: * def fetch(self, jpayne@69: * reference=None, # <<<<<<<<<<<<<< jpayne@69: * start=None, jpayne@69: * end=None, jpayne@69: */ jpayne@69: values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1063 jpayne@69: * def fetch(self, jpayne@69: * reference=None, jpayne@69: * start=None, # <<<<<<<<<<<<<< jpayne@69: * end=None, jpayne@69: * region=None ): jpayne@69: */ jpayne@69: values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1064 jpayne@69: * reference=None, jpayne@69: * start=None, jpayne@69: * end=None, # <<<<<<<<<<<<<< jpayne@69: * region=None ): jpayne@69: * """ Parse a stream of VCF-formatted lines. jpayne@69: */ jpayne@69: values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1065 jpayne@69: * start=None, jpayne@69: * end=None, jpayne@69: * region=None ): # <<<<<<<<<<<<<< jpayne@69: * """ Parse a stream of VCF-formatted lines. jpayne@69: * Initializes class instance and return generator """ jpayne@69: */ jpayne@69: values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1061, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reference); jpayne@69: if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1061, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start); jpayne@69: if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1061, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end); jpayne@69: if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1061, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (kw_args > 0) { jpayne@69: PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_region); jpayne@69: if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1061, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fetch") < 0)) __PYX_ERR(0, 1061, __pyx_L3_error) jpayne@69: } jpayne@69: } else { jpayne@69: switch (__pyx_nargs) { jpayne@69: case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_reference = values[1]; jpayne@69: __pyx_v_start = values[2]; jpayne@69: __pyx_v_end = values[3]; jpayne@69: __pyx_v_region = values[4]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("fetch", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1061, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_85fetch(__pyx_self, __pyx_v_self, __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1061 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def fetch(self, # <<<<<<<<<<<<<< jpayne@69: * reference=None, jpayne@69: * start=None, jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_85fetch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("fetch", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1068 jpayne@69: * """ Parse a stream of VCF-formatted lines. jpayne@69: * Initializes class instance and return generator """ jpayne@69: * return self.tabixfile.fetch( # <<<<<<<<<<<<<< jpayne@69: * reference, jpayne@69: * start, jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tabixfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fetch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1072 jpayne@69: * start, jpayne@69: * end, jpayne@69: * region, # <<<<<<<<<<<<<< jpayne@69: * parser = asVCFRecord(self)) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_v_reference); jpayne@69: __Pyx_GIVEREF(__pyx_v_reference); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference)) __PYX_ERR(0, 1068, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_start); jpayne@69: __Pyx_GIVEREF(__pyx_v_start); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start)) __PYX_ERR(0, 1068, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_end); jpayne@69: __Pyx_GIVEREF(__pyx_v_end); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end)) __PYX_ERR(0, 1068, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_v_region); jpayne@69: __Pyx_GIVEREF(__pyx_v_region); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region)) __PYX_ERR(0, 1068, __pyx_L1_error); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1073 jpayne@69: * end, jpayne@69: * region, jpayne@69: * parser = asVCFRecord(self)) # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def validate(self, record): jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1073, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5pysam_7libcvcf_asVCFRecord), __pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1073, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_parser, __pyx_t_4) < 0) __PYX_ERR(0, 1073, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1068 jpayne@69: * """ Parse a stream of VCF-formatted lines. jpayne@69: * Initializes class instance and return generator """ jpayne@69: * return self.tabixfile.fetch( # <<<<<<<<<<<<<< jpayne@69: * reference, jpayne@69: * start, jpayne@69: */ jpayne@69: __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_r = __pyx_t_4; jpayne@69: __pyx_t_4 = 0; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1061 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def fetch(self, # <<<<<<<<<<<<<< jpayne@69: * reference=None, jpayne@69: * start=None, jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1075 jpayne@69: * parser = asVCFRecord(self)) jpayne@69: * jpayne@69: * def validate(self, record): # <<<<<<<<<<<<<< jpayne@69: * '''validate vcf record. jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_88validate(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_3VCF_87validate, "VCF.validate(self, record)\nvalidate vcf record.\n\n returns a validated record.\n "); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_3VCF_88validate = {"validate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_3VCF_88validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_3VCF_87validate}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_3VCF_88validate(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: CYTHON_UNUSED PyObject *__pyx_v_self = 0; jpayne@69: CYTHON_UNUSED PyObject *__pyx_v_record = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[2] = {0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("validate (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_record,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1075, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_record)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1075, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("validate", 1, 2, 2, 1); __PYX_ERR(0, 1075, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "validate") < 0)) __PYX_ERR(0, 1075, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 2)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: } jpayne@69: __pyx_v_self = values[0]; jpayne@69: __pyx_v_record = values[1]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("validate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1075, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.validate", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_3VCF_87validate(__pyx_self, __pyx_v_self, __pyx_v_record); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_3VCF_87validate(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_record) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("validate", 1); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1081 jpayne@69: * ''' jpayne@69: * jpayne@69: * raise NotImplementedError("needs to be checked") # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * chrom, pos = record.chrom, record.pos jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_Raise(__pyx_t_1, 0, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __PYX_ERR(0, 1081, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1075 jpayne@69: * parser = asVCFRecord(self)) jpayne@69: * jpayne@69: * def validate(self, record): # <<<<<<<<<<<<<< jpayne@69: * '''validate vcf record. jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.VCF.validate", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __pyx_unpickle_asVCFRecord(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * cdef object __pyx_PickleError jpayne@69: * cdef object __pyx_result jpayne@69: */ jpayne@69: jpayne@69: /* Python wrapper */ jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_5__pyx_unpickle_asVCFRecord(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ); /*proto*/ jpayne@69: PyDoc_STRVAR(__pyx_doc_5pysam_7libcvcf_4__pyx_unpickle_asVCFRecord, "__pyx_unpickle_asVCFRecord(__pyx_type, long __pyx_checksum, __pyx_state)"); jpayne@69: static PyMethodDef __pyx_mdef_5pysam_7libcvcf_5__pyx_unpickle_asVCFRecord = {"__pyx_unpickle_asVCFRecord", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_5__pyx_unpickle_asVCFRecord, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_4__pyx_unpickle_asVCFRecord}; jpayne@69: static PyObject *__pyx_pw_5pysam_7libcvcf_5__pyx_unpickle_asVCFRecord(PyObject *__pyx_self, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds jpayne@69: #else jpayne@69: PyObject *__pyx_args, PyObject *__pyx_kwds jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *__pyx_v___pyx_type = 0; jpayne@69: long __pyx_v___pyx_checksum; jpayne@69: PyObject *__pyx_v___pyx_state = 0; jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: CYTHON_UNUSED Py_ssize_t __pyx_nargs; jpayne@69: #endif jpayne@69: CYTHON_UNUSED PyObject *const *__pyx_kwvalues; jpayne@69: PyObject* values[3] = {0,0,0}; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: PyObject *__pyx_r = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__pyx_unpickle_asVCFRecord (wrapper)", 0); jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); jpayne@69: #else jpayne@69: __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; jpayne@69: #endif jpayne@69: #endif jpayne@69: __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); jpayne@69: { jpayne@69: PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; jpayne@69: if (__pyx_kwds) { jpayne@69: Py_ssize_t kw_args; jpayne@69: switch (__pyx_nargs) { jpayne@69: case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 0: break; jpayne@69: default: goto __pyx_L5_argtuple_error; jpayne@69: } jpayne@69: kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); jpayne@69: switch (__pyx_nargs) { jpayne@69: case 0: jpayne@69: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) jpayne@69: else goto __pyx_L5_argtuple_error; jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 1: jpayne@69: if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCFRecord", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { jpayne@69: (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); jpayne@69: kw_args--; jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) jpayne@69: else { jpayne@69: __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCFRecord", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(kw_args > 0)) { jpayne@69: const Py_ssize_t kwd_pos_args = __pyx_nargs; jpayne@69: if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_asVCFRecord") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) jpayne@69: } jpayne@69: } else if (unlikely(__pyx_nargs != 3)) { jpayne@69: goto __pyx_L5_argtuple_error; jpayne@69: } else { jpayne@69: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); jpayne@69: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); jpayne@69: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); jpayne@69: } jpayne@69: __pyx_v___pyx_type = values[0]; jpayne@69: __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) jpayne@69: __pyx_v___pyx_state = values[2]; jpayne@69: } jpayne@69: goto __pyx_L6_skip; jpayne@69: __pyx_L5_argtuple_error:; jpayne@69: __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCFRecord", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error) jpayne@69: __pyx_L6_skip:; jpayne@69: goto __pyx_L4_argument_unpacking_done; jpayne@69: __pyx_L3_error:; jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.__pyx_unpickle_asVCFRecord", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return NULL; jpayne@69: __pyx_L4_argument_unpacking_done:; jpayne@69: __pyx_r = __pyx_pf_5pysam_7libcvcf_4__pyx_unpickle_asVCFRecord(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); jpayne@69: jpayne@69: /* function exit code */ jpayne@69: { jpayne@69: Py_ssize_t __pyx_temp; jpayne@69: for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { jpayne@69: __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_pf_5pysam_7libcvcf_4__pyx_unpickle_asVCFRecord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { jpayne@69: PyObject *__pyx_v___pyx_PickleError = 0; jpayne@69: PyObject *__pyx_v___pyx_result = 0; jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: unsigned int __pyx_t_5; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__pyx_unpickle_asVCFRecord", 1); jpayne@69: jpayne@69: /* "(tree fragment)":4 jpayne@69: * cdef object __pyx_PickleError jpayne@69: * cdef object __pyx_result jpayne@69: * if __pyx_checksum not in (0xe48d6d5, 0xcc3d7cd, 0x1c28f48): # <<<<<<<<<<<<<< jpayne@69: * from pickle import PickleError as __pyx_PickleError jpayne@69: * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))" % __pyx_checksum jpayne@69: */ jpayne@69: __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__32, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "(tree fragment)":5 jpayne@69: * cdef object __pyx_result jpayne@69: * if __pyx_checksum not in (0xe48d6d5, 0xcc3d7cd, 0x1c28f48): jpayne@69: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< jpayne@69: * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))" % __pyx_checksum jpayne@69: * __pyx_result = asVCFRecord.__new__(__pyx_type) jpayne@69: */ jpayne@69: __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_n_s_PickleError); jpayne@69: __Pyx_GIVEREF(__pyx_n_s_PickleError); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error); jpayne@69: __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_INCREF(__pyx_t_1); jpayne@69: __pyx_v___pyx_PickleError = __pyx_t_1; jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":6 jpayne@69: * if __pyx_checksum not in (0xe48d6d5, 0xcc3d7cd, 0x1c28f48): jpayne@69: * from pickle import PickleError as __pyx_PickleError jpayne@69: * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))" % __pyx_checksum # <<<<<<<<<<<<<< jpayne@69: * __pyx_result = asVCFRecord.__new__(__pyx_type) jpayne@69: * if __pyx_state is not None: jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __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(1, 6, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __PYX_ERR(1, 6, __pyx_L1_error) jpayne@69: jpayne@69: /* "(tree fragment)":4 jpayne@69: * cdef object __pyx_PickleError jpayne@69: * cdef object __pyx_result jpayne@69: * if __pyx_checksum not in (0xe48d6d5, 0xcc3d7cd, 0x1c28f48): # <<<<<<<<<<<<<< jpayne@69: * from pickle import PickleError as __pyx_PickleError jpayne@69: * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))" % __pyx_checksum jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":7 jpayne@69: * from pickle import PickleError as __pyx_PickleError jpayne@69: * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))" % __pyx_checksum jpayne@69: * __pyx_result = asVCFRecord.__new__(__pyx_type) # <<<<<<<<<<<<<< jpayne@69: * if __pyx_state is not None: jpayne@69: * __pyx_unpickle_asVCFRecord__set_state( __pyx_result, __pyx_state) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_7libcvcf_asVCFRecord), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_4 = NULL; jpayne@69: __pyx_t_5 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_3))) { jpayne@69: __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); jpayne@69: if (likely(__pyx_t_4)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_t_4); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_3, function); jpayne@69: __pyx_t_5 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: } jpayne@69: __pyx_v___pyx_result = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":8 jpayne@69: * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))" % __pyx_checksum jpayne@69: * __pyx_result = asVCFRecord.__new__(__pyx_type) jpayne@69: * if __pyx_state is not None: # <<<<<<<<<<<<<< jpayne@69: * __pyx_unpickle_asVCFRecord__set_state( __pyx_result, __pyx_state) jpayne@69: * return __pyx_result jpayne@69: */ jpayne@69: __pyx_t_2 = (__pyx_v___pyx_state != Py_None); jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "(tree fragment)":9 jpayne@69: * __pyx_result = asVCFRecord.__new__(__pyx_type) jpayne@69: * if __pyx_state is not None: jpayne@69: * __pyx_unpickle_asVCFRecord__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< jpayne@69: * return __pyx_result jpayne@69: * cdef __pyx_unpickle_asVCFRecord__set_state(asVCFRecord __pyx_result, tuple __pyx_state): jpayne@69: */ jpayne@69: if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error) jpayne@69: __pyx_t_1 = __pyx_f_5pysam_7libcvcf___pyx_unpickle_asVCFRecord__set_state(((struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":8 jpayne@69: * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))" % __pyx_checksum jpayne@69: * __pyx_result = asVCFRecord.__new__(__pyx_type) jpayne@69: * if __pyx_state is not None: # <<<<<<<<<<<<<< jpayne@69: * __pyx_unpickle_asVCFRecord__set_state( __pyx_result, __pyx_state) jpayne@69: * return __pyx_result jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":10 jpayne@69: * if __pyx_state is not None: jpayne@69: * __pyx_unpickle_asVCFRecord__set_state( __pyx_result, __pyx_state) jpayne@69: * return __pyx_result # <<<<<<<<<<<<<< jpayne@69: * cdef __pyx_unpickle_asVCFRecord__set_state(asVCFRecord __pyx_result, tuple __pyx_state): jpayne@69: * __pyx_result.encoding = __pyx_state[0]; __pyx_result.vcffile = __pyx_state[1] jpayne@69: */ jpayne@69: __Pyx_XDECREF(__pyx_r); jpayne@69: __Pyx_INCREF(__pyx_v___pyx_result); jpayne@69: __pyx_r = __pyx_v___pyx_result; jpayne@69: goto __pyx_L0; jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __pyx_unpickle_asVCFRecord(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * cdef object __pyx_PickleError jpayne@69: * cdef object __pyx_result jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.__pyx_unpickle_asVCFRecord", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = NULL; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XDECREF(__pyx_v___pyx_PickleError); jpayne@69: __Pyx_XDECREF(__pyx_v___pyx_result); jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":11 jpayne@69: * __pyx_unpickle_asVCFRecord__set_state( __pyx_result, __pyx_state) jpayne@69: * return __pyx_result jpayne@69: * cdef __pyx_unpickle_asVCFRecord__set_state(asVCFRecord __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * __pyx_result.encoding = __pyx_state[0]; __pyx_result.vcffile = __pyx_state[1] jpayne@69: * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): jpayne@69: */ jpayne@69: jpayne@69: static PyObject *__pyx_f_5pysam_7libcvcf___pyx_unpickle_asVCFRecord__set_state(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { jpayne@69: PyObject *__pyx_r = NULL; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_t_2; jpayne@69: Py_ssize_t __pyx_t_3; jpayne@69: int __pyx_t_4; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: PyObject *__pyx_t_6 = NULL; jpayne@69: PyObject *__pyx_t_7 = NULL; jpayne@69: unsigned int __pyx_t_8; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__pyx_unpickle_asVCFRecord__set_state", 1); jpayne@69: jpayne@69: /* "(tree fragment)":12 jpayne@69: * return __pyx_result jpayne@69: * cdef __pyx_unpickle_asVCFRecord__set_state(asVCFRecord __pyx_result, tuple __pyx_state): jpayne@69: * __pyx_result.encoding = __pyx_state[0]; __pyx_result.vcffile = __pyx_state[1] # <<<<<<<<<<<<<< jpayne@69: * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): jpayne@69: * __pyx_result.__dict__.update(__pyx_state[2]) jpayne@69: */ jpayne@69: if (unlikely(__pyx_v___pyx_state == Py_None)) { jpayne@69: PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); jpayne@69: __PYX_ERR(1, 12, __pyx_L1_error) jpayne@69: } jpayne@69: __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(1, 12, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding); jpayne@69: __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding); jpayne@69: __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: if (unlikely(__pyx_v___pyx_state == Py_None)) { jpayne@69: PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); jpayne@69: __PYX_ERR(1, 12, __pyx_L1_error) jpayne@69: } jpayne@69: __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(1, 12, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_GIVEREF(__pyx_t_1); jpayne@69: __Pyx_GOTREF(__pyx_v___pyx_result->vcffile); jpayne@69: __Pyx_DECREF(__pyx_v___pyx_result->vcffile); jpayne@69: __pyx_v___pyx_result->vcffile = __pyx_t_1; jpayne@69: __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":13 jpayne@69: * cdef __pyx_unpickle_asVCFRecord__set_state(asVCFRecord __pyx_result, tuple __pyx_state): jpayne@69: * __pyx_result.encoding = __pyx_state[0]; __pyx_result.vcffile = __pyx_state[1] jpayne@69: * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< jpayne@69: * __pyx_result.__dict__.update(__pyx_state[2]) jpayne@69: */ jpayne@69: if (unlikely(__pyx_v___pyx_state == Py_None)) { jpayne@69: PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); jpayne@69: __PYX_ERR(1, 13, __pyx_L1_error) jpayne@69: } jpayne@69: __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) jpayne@69: __pyx_t_4 = (__pyx_t_3 > 2); jpayne@69: if (__pyx_t_4) { jpayne@69: } else { jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: goto __pyx_L4_bool_binop_done; jpayne@69: } jpayne@69: __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) jpayne@69: __pyx_t_2 = __pyx_t_4; jpayne@69: __pyx_L4_bool_binop_done:; jpayne@69: if (__pyx_t_2) { jpayne@69: jpayne@69: /* "(tree fragment)":14 jpayne@69: * __pyx_result.encoding = __pyx_state[0]; __pyx_result.vcffile = __pyx_state[1] jpayne@69: * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): jpayne@69: * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_6); jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: if (unlikely(__pyx_v___pyx_state == Py_None)) { jpayne@69: PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); jpayne@69: __PYX_ERR(1, 14, __pyx_L1_error) jpayne@69: } jpayne@69: __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(1, 14, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __pyx_t_7 = NULL; jpayne@69: __pyx_t_8 = 0; jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(PyMethod_Check(__pyx_t_6))) { jpayne@69: __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); jpayne@69: if (likely(__pyx_t_7)) { jpayne@69: PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); jpayne@69: __Pyx_INCREF(__pyx_t_7); jpayne@69: __Pyx_INCREF(function); jpayne@69: __Pyx_DECREF_SET(__pyx_t_6, function); jpayne@69: __pyx_t_8 = 1; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; jpayne@69: __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); jpayne@69: __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; jpayne@69: } jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":13 jpayne@69: * cdef __pyx_unpickle_asVCFRecord__set_state(asVCFRecord __pyx_result, tuple __pyx_state): jpayne@69: * __pyx_result.encoding = __pyx_state[0]; __pyx_result.vcffile = __pyx_state[1] jpayne@69: * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< jpayne@69: * __pyx_result.__dict__.update(__pyx_state[2]) jpayne@69: */ jpayne@69: } jpayne@69: jpayne@69: /* "(tree fragment)":11 jpayne@69: * __pyx_unpickle_asVCFRecord__set_state( __pyx_result, __pyx_state) jpayne@69: * return __pyx_result jpayne@69: * cdef __pyx_unpickle_asVCFRecord__set_state(asVCFRecord __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * __pyx_result.encoding = __pyx_state[0]; __pyx_result.vcffile = __pyx_state[1] jpayne@69: * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): jpayne@69: */ jpayne@69: jpayne@69: /* function exit code */ jpayne@69: __pyx_r = Py_None; __Pyx_INCREF(Py_None); jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: __Pyx_XDECREF(__pyx_t_6); jpayne@69: __Pyx_XDECREF(__pyx_t_7); jpayne@69: __Pyx_AddTraceback("pysam.libcvcf.__pyx_unpickle_asVCFRecord__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: __pyx_r = 0; jpayne@69: __pyx_L0:; jpayne@69: __Pyx_XGIVEREF(__pyx_r); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return __pyx_r; jpayne@69: } jpayne@69: static struct __pyx_vtabstruct_5pysam_7libcvcf_VCFRecord __pyx_vtable_5pysam_7libcvcf_VCFRecord; jpayne@69: jpayne@69: static PyObject *__pyx_tp_new_5pysam_7libcvcf_VCFRecord(PyTypeObject *t, PyObject *a, PyObject *k) { jpayne@69: struct __pyx_obj_5pysam_7libcvcf_VCFRecord *p; jpayne@69: PyObject *o = __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, tp_new, newfunc)(t, a, k); jpayne@69: if (unlikely(!o)) return 0; jpayne@69: p = ((struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)o); jpayne@69: p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy*)__pyx_vtabptr_5pysam_7libcvcf_VCFRecord; jpayne@69: p->vcf = Py_None; Py_INCREF(Py_None); jpayne@69: if (unlikely(__pyx_pw_5pysam_7libcvcf_9VCFRecord_3__cinit__(o, a, k) < 0)) goto bad; jpayne@69: return o; jpayne@69: bad: jpayne@69: Py_DECREF(o); o = 0; jpayne@69: return NULL; jpayne@69: } jpayne@69: jpayne@69: static void __pyx_tp_dealloc_5pysam_7libcvcf_VCFRecord(PyObject *o) { jpayne@69: struct __pyx_obj_5pysam_7libcvcf_VCFRecord *p = (struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)o; jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: 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)) { jpayne@69: if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcvcf_VCFRecord) { jpayne@69: if (PyObject_CallFinalizerFromDealloc(o)) return; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: PyObject_GC_UnTrack(o); jpayne@69: Py_CLEAR(p->vcf); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (!(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy) || PyType_IS_GC(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy)) PyObject_GC_Track(o); jpayne@69: #else jpayne@69: if (PyType_IS_GC(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy)) PyObject_GC_Track(o); jpayne@69: #endif jpayne@69: if (likely(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy)) __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy, tp_dealloc, destructor)(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_5pysam_7libcvcf_VCFRecord); jpayne@69: } jpayne@69: jpayne@69: static int __pyx_tp_traverse_5pysam_7libcvcf_VCFRecord(PyObject *o, visitproc v, void *a) { jpayne@69: int e; jpayne@69: struct __pyx_obj_5pysam_7libcvcf_VCFRecord *p = (struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)o; jpayne@69: e = ((likely(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy)) ? ((__pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_traverse) ? __pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_7libcvcf_VCFRecord)); if (e) return e; jpayne@69: if (p->vcf) { jpayne@69: e = (*v)(p->vcf, a); if (e) return e; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: static int __pyx_tp_clear_5pysam_7libcvcf_VCFRecord(PyObject *o) { jpayne@69: PyObject* tmp; jpayne@69: struct __pyx_obj_5pysam_7libcvcf_VCFRecord *p = (struct __pyx_obj_5pysam_7libcvcf_VCFRecord *)o; jpayne@69: if (likely(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy)) { if (__pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_clear) __pyx_ptype_5pysam_16libctabixproxies_TupleProxy->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_7libcvcf_VCFRecord); jpayne@69: tmp = ((PyObject*)p->vcf); jpayne@69: p->vcf = Py_None; Py_INCREF(Py_None); jpayne@69: Py_XDECREF(tmp); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject *__pyx_sq_item_5pysam_7libcvcf_VCFRecord(PyObject *o, Py_ssize_t i) { jpayne@69: PyObject *r; jpayne@69: PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; jpayne@69: r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); jpayne@69: Py_DECREF(x); jpayne@69: return r; jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_contig(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_6contig_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_pos(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_3pos_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_id(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_2id_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_ref(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_3ref_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_alt(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_3alt_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_qual(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_4qual_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_filter(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_6filter_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_info(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_4info_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_format(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_6format_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyObject *__pyx_getprop_5pysam_7libcvcf_9VCFRecord_samples(PyObject *o, CYTHON_UNUSED void *x) { jpayne@69: return __pyx_pw_5pysam_7libcvcf_9VCFRecord_7samples_1__get__(o); jpayne@69: } jpayne@69: jpayne@69: static PyMethodDef __pyx_methods_5pysam_7libcvcf_VCFRecord[] = { jpayne@69: {"error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_9VCFRecord_5error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_9VCFRecord_4error}, jpayne@69: {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_9VCFRecord_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_9VCFRecord_10__reduce_cython__}, jpayne@69: {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_9VCFRecord_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_9VCFRecord_12__setstate_cython__}, jpayne@69: {0, 0, 0, 0} jpayne@69: }; jpayne@69: jpayne@69: static struct PyGetSetDef __pyx_getsets_5pysam_7libcvcf_VCFRecord[] = { jpayne@69: {(char *)"contig", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_contig, 0, (char *)0, 0}, jpayne@69: {(char *)"pos", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_pos, 0, (char *)0, 0}, jpayne@69: {(char *)"id", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_id, 0, (char *)0, 0}, jpayne@69: {(char *)"ref", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_ref, 0, (char *)0, 0}, jpayne@69: {(char *)"alt", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_alt, 0, (char *)0, 0}, jpayne@69: {(char *)"qual", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_qual, 0, (char *)0, 0}, jpayne@69: {(char *)"filter", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_filter, 0, (char *)0, 0}, jpayne@69: {(char *)"info", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_info, 0, (char *)0, 0}, jpayne@69: {(char *)"format", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_format, 0, (char *)0, 0}, jpayne@69: {(char *)"samples", __pyx_getprop_5pysam_7libcvcf_9VCFRecord_samples, 0, (char *)0, 0}, jpayne@69: {0, 0, 0, 0, 0} jpayne@69: }; jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: static PyType_Slot __pyx_type_5pysam_7libcvcf_VCFRecord_slots[] = { jpayne@69: {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcvcf_VCFRecord}, jpayne@69: {Py_sq_length, (void *)__pyx_pw_5pysam_7libcvcf_9VCFRecord_7__len__}, jpayne@69: {Py_sq_item, (void *)__pyx_sq_item_5pysam_7libcvcf_VCFRecord}, jpayne@69: {Py_mp_length, (void *)__pyx_pw_5pysam_7libcvcf_9VCFRecord_7__len__}, jpayne@69: {Py_mp_subscript, (void *)__pyx_pw_5pysam_7libcvcf_9VCFRecord_9__getitem__}, jpayne@69: {Py_tp_doc, (void *)PyDoc_STR("VCFRecord(vcf)\nvcf record.\n\n initialized from data and vcf meta\n ")}, jpayne@69: {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcvcf_VCFRecord}, jpayne@69: {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcvcf_VCFRecord}, jpayne@69: {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcvcf_VCFRecord}, jpayne@69: {Py_tp_getset, (void *)__pyx_getsets_5pysam_7libcvcf_VCFRecord}, jpayne@69: {Py_tp_init, (void *)__pyx_pw_5pysam_7libcvcf_9VCFRecord_1__init__}, jpayne@69: {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcvcf_VCFRecord}, jpayne@69: {0, 0}, jpayne@69: }; jpayne@69: static PyType_Spec __pyx_type_5pysam_7libcvcf_VCFRecord_spec = { jpayne@69: "pysam.libcvcf.VCFRecord", jpayne@69: sizeof(struct __pyx_obj_5pysam_7libcvcf_VCFRecord), jpayne@69: 0, jpayne@69: 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, jpayne@69: __pyx_type_5pysam_7libcvcf_VCFRecord_slots, jpayne@69: }; jpayne@69: #else jpayne@69: jpayne@69: static PySequenceMethods __pyx_tp_as_sequence_VCFRecord = { jpayne@69: __pyx_pw_5pysam_7libcvcf_9VCFRecord_7__len__, /*sq_length*/ jpayne@69: 0, /*sq_concat*/ jpayne@69: 0, /*sq_repeat*/ jpayne@69: __pyx_sq_item_5pysam_7libcvcf_VCFRecord, /*sq_item*/ jpayne@69: 0, /*sq_slice*/ jpayne@69: 0, /*sq_ass_item*/ jpayne@69: 0, /*sq_ass_slice*/ jpayne@69: 0, /*sq_contains*/ jpayne@69: 0, /*sq_inplace_concat*/ jpayne@69: 0, /*sq_inplace_repeat*/ jpayne@69: }; jpayne@69: jpayne@69: static PyMappingMethods __pyx_tp_as_mapping_VCFRecord = { jpayne@69: __pyx_pw_5pysam_7libcvcf_9VCFRecord_7__len__, /*mp_length*/ jpayne@69: __pyx_pw_5pysam_7libcvcf_9VCFRecord_9__getitem__, /*mp_subscript*/ jpayne@69: 0, /*mp_ass_subscript*/ jpayne@69: }; jpayne@69: jpayne@69: static PyTypeObject __pyx_type_5pysam_7libcvcf_VCFRecord = { jpayne@69: PyVarObject_HEAD_INIT(0, 0) jpayne@69: "pysam.libcvcf.""VCFRecord", /*tp_name*/ jpayne@69: sizeof(struct __pyx_obj_5pysam_7libcvcf_VCFRecord), /*tp_basicsize*/ jpayne@69: 0, /*tp_itemsize*/ jpayne@69: __pyx_tp_dealloc_5pysam_7libcvcf_VCFRecord, /*tp_dealloc*/ jpayne@69: #if PY_VERSION_HEX < 0x030800b4 jpayne@69: 0, /*tp_print*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030800b4 jpayne@69: 0, /*tp_vectorcall_offset*/ jpayne@69: #endif jpayne@69: 0, /*tp_getattr*/ jpayne@69: 0, /*tp_setattr*/ jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: 0, /*tp_compare*/ jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: 0, /*tp_as_async*/ jpayne@69: #endif jpayne@69: 0, /*tp_repr*/ jpayne@69: 0, /*tp_as_number*/ jpayne@69: &__pyx_tp_as_sequence_VCFRecord, /*tp_as_sequence*/ jpayne@69: &__pyx_tp_as_mapping_VCFRecord, /*tp_as_mapping*/ jpayne@69: 0, /*tp_hash*/ jpayne@69: 0, /*tp_call*/ jpayne@69: 0, /*tp_str*/ jpayne@69: 0, /*tp_getattro*/ jpayne@69: 0, /*tp_setattro*/ jpayne@69: 0, /*tp_as_buffer*/ jpayne@69: 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*/ jpayne@69: PyDoc_STR("VCFRecord(vcf)\nvcf record.\n\n initialized from data and vcf meta\n "), /*tp_doc*/ jpayne@69: __pyx_tp_traverse_5pysam_7libcvcf_VCFRecord, /*tp_traverse*/ jpayne@69: __pyx_tp_clear_5pysam_7libcvcf_VCFRecord, /*tp_clear*/ jpayne@69: 0, /*tp_richcompare*/ jpayne@69: 0, /*tp_weaklistoffset*/ jpayne@69: 0, /*tp_iter*/ jpayne@69: 0, /*tp_iternext*/ jpayne@69: __pyx_methods_5pysam_7libcvcf_VCFRecord, /*tp_methods*/ jpayne@69: 0, /*tp_members*/ jpayne@69: __pyx_getsets_5pysam_7libcvcf_VCFRecord, /*tp_getset*/ jpayne@69: 0, /*tp_base*/ jpayne@69: 0, /*tp_dict*/ jpayne@69: 0, /*tp_descr_get*/ jpayne@69: 0, /*tp_descr_set*/ jpayne@69: #if !CYTHON_USE_TYPE_SPECS jpayne@69: 0, /*tp_dictoffset*/ jpayne@69: #endif jpayne@69: __pyx_pw_5pysam_7libcvcf_9VCFRecord_1__init__, /*tp_init*/ jpayne@69: 0, /*tp_alloc*/ jpayne@69: __pyx_tp_new_5pysam_7libcvcf_VCFRecord, /*tp_new*/ jpayne@69: 0, /*tp_free*/ jpayne@69: 0, /*tp_is_gc*/ jpayne@69: 0, /*tp_bases*/ jpayne@69: 0, /*tp_mro*/ jpayne@69: 0, /*tp_cache*/ jpayne@69: 0, /*tp_subclasses*/ jpayne@69: 0, /*tp_weaklist*/ jpayne@69: 0, /*tp_del*/ jpayne@69: 0, /*tp_version_tag*/ jpayne@69: #if PY_VERSION_HEX >= 0x030400a1 jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: 0, /*tp_finalize*/ jpayne@69: #else jpayne@69: NULL, /*tp_finalize*/ jpayne@69: #endif jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) jpayne@69: 0, /*tp_vectorcall*/ jpayne@69: #endif jpayne@69: #if __PYX_NEED_TP_PRINT_SLOT == 1 jpayne@69: 0, /*tp_print*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030C0000 jpayne@69: 0, /*tp_watched*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030d00A4 jpayne@69: 0, /*tp_versions_used*/ jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 jpayne@69: 0, /*tp_pypy_flags*/ jpayne@69: #endif jpayne@69: }; jpayne@69: #endif jpayne@69: static struct __pyx_vtabstruct_5pysam_7libcvcf_asVCFRecord __pyx_vtable_5pysam_7libcvcf_asVCFRecord; jpayne@69: jpayne@69: static PyObject *__pyx_tp_new_5pysam_7libcvcf_asVCFRecord(PyTypeObject *t, PyObject *a, PyObject *k) { jpayne@69: struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *p; jpayne@69: PyObject *o = __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_9libctabix_Parser, tp_new, newfunc)(t, a, k); jpayne@69: if (unlikely(!o)) return 0; jpayne@69: p = ((struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *)o); jpayne@69: p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_7libcvcf_asVCFRecord; jpayne@69: p->vcffile = Py_None; Py_INCREF(Py_None); jpayne@69: return o; jpayne@69: } jpayne@69: jpayne@69: static void __pyx_tp_dealloc_5pysam_7libcvcf_asVCFRecord(PyObject *o) { jpayne@69: struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *)o; jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: 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)) { jpayne@69: if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcvcf_asVCFRecord) { jpayne@69: if (PyObject_CallFinalizerFromDealloc(o)) return; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: PyObject_GC_UnTrack(o); jpayne@69: Py_CLEAR(p->vcffile); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (!(__pyx_ptype_5pysam_9libctabix_Parser) || PyType_IS_GC(__pyx_ptype_5pysam_9libctabix_Parser)) PyObject_GC_Track(o); jpayne@69: #else jpayne@69: if (PyType_IS_GC(__pyx_ptype_5pysam_9libctabix_Parser)) PyObject_GC_Track(o); jpayne@69: #endif jpayne@69: if (likely(__pyx_ptype_5pysam_9libctabix_Parser)) __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_9libctabix_Parser, tp_dealloc, destructor)(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_5pysam_7libcvcf_asVCFRecord); jpayne@69: } jpayne@69: jpayne@69: static int __pyx_tp_traverse_5pysam_7libcvcf_asVCFRecord(PyObject *o, visitproc v, void *a) { jpayne@69: int e; jpayne@69: struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *)o; jpayne@69: e = ((likely(__pyx_ptype_5pysam_9libctabix_Parser)) ? ((__pyx_ptype_5pysam_9libctabix_Parser->tp_traverse) ? __pyx_ptype_5pysam_9libctabix_Parser->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5pysam_7libcvcf_asVCFRecord)); if (e) return e; jpayne@69: if (p->vcffile) { jpayne@69: e = (*v)(p->vcffile, a); if (e) return e; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: static int __pyx_tp_clear_5pysam_7libcvcf_asVCFRecord(PyObject *o) { jpayne@69: PyObject* tmp; jpayne@69: struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *p = (struct __pyx_obj_5pysam_7libcvcf_asVCFRecord *)o; jpayne@69: if (likely(__pyx_ptype_5pysam_9libctabix_Parser)) { if (__pyx_ptype_5pysam_9libctabix_Parser->tp_clear) __pyx_ptype_5pysam_9libctabix_Parser->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5pysam_7libcvcf_asVCFRecord); jpayne@69: tmp = ((PyObject*)p->vcffile); jpayne@69: p->vcffile = Py_None; Py_INCREF(Py_None); jpayne@69: Py_XDECREF(tmp); jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: static PyMethodDef __pyx_methods_5pysam_7libcvcf_asVCFRecord[] = { jpayne@69: {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_11asVCFRecord_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_11asVCFRecord_2__reduce_cython__}, jpayne@69: {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_7libcvcf_11asVCFRecord_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_7libcvcf_11asVCFRecord_4__setstate_cython__}, jpayne@69: {0, 0, 0, 0} jpayne@69: }; jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: static PyType_Slot __pyx_type_5pysam_7libcvcf_asVCFRecord_slots[] = { jpayne@69: {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcvcf_asVCFRecord}, jpayne@69: {Py_tp_doc, (void *)PyDoc_STR("asVCFRecord(vcffile)\nconverts a :term:`tabix row` into a VCF record.")}, jpayne@69: {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcvcf_asVCFRecord}, jpayne@69: {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_7libcvcf_asVCFRecord}, jpayne@69: {Py_tp_methods, (void *)__pyx_methods_5pysam_7libcvcf_asVCFRecord}, jpayne@69: {Py_tp_init, (void *)__pyx_pw_5pysam_7libcvcf_11asVCFRecord_1__init__}, jpayne@69: {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcvcf_asVCFRecord}, jpayne@69: {0, 0}, jpayne@69: }; jpayne@69: static PyType_Spec __pyx_type_5pysam_7libcvcf_asVCFRecord_spec = { jpayne@69: "pysam.libcvcf.asVCFRecord", jpayne@69: sizeof(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord), jpayne@69: 0, jpayne@69: 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, jpayne@69: __pyx_type_5pysam_7libcvcf_asVCFRecord_slots, jpayne@69: }; jpayne@69: #else jpayne@69: jpayne@69: static PyTypeObject __pyx_type_5pysam_7libcvcf_asVCFRecord = { jpayne@69: PyVarObject_HEAD_INIT(0, 0) jpayne@69: "pysam.libcvcf.""asVCFRecord", /*tp_name*/ jpayne@69: sizeof(struct __pyx_obj_5pysam_7libcvcf_asVCFRecord), /*tp_basicsize*/ jpayne@69: 0, /*tp_itemsize*/ jpayne@69: __pyx_tp_dealloc_5pysam_7libcvcf_asVCFRecord, /*tp_dealloc*/ jpayne@69: #if PY_VERSION_HEX < 0x030800b4 jpayne@69: 0, /*tp_print*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030800b4 jpayne@69: 0, /*tp_vectorcall_offset*/ jpayne@69: #endif jpayne@69: 0, /*tp_getattr*/ jpayne@69: 0, /*tp_setattr*/ jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: 0, /*tp_compare*/ jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: 0, /*tp_as_async*/ jpayne@69: #endif jpayne@69: 0, /*tp_repr*/ jpayne@69: 0, /*tp_as_number*/ jpayne@69: 0, /*tp_as_sequence*/ jpayne@69: 0, /*tp_as_mapping*/ jpayne@69: 0, /*tp_hash*/ jpayne@69: 0, /*tp_call*/ jpayne@69: 0, /*tp_str*/ jpayne@69: 0, /*tp_getattro*/ jpayne@69: 0, /*tp_setattro*/ jpayne@69: 0, /*tp_as_buffer*/ jpayne@69: 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*/ jpayne@69: PyDoc_STR("asVCFRecord(vcffile)\nconverts a :term:`tabix row` into a VCF record."), /*tp_doc*/ jpayne@69: __pyx_tp_traverse_5pysam_7libcvcf_asVCFRecord, /*tp_traverse*/ jpayne@69: __pyx_tp_clear_5pysam_7libcvcf_asVCFRecord, /*tp_clear*/ jpayne@69: 0, /*tp_richcompare*/ jpayne@69: 0, /*tp_weaklistoffset*/ jpayne@69: 0, /*tp_iter*/ jpayne@69: 0, /*tp_iternext*/ jpayne@69: __pyx_methods_5pysam_7libcvcf_asVCFRecord, /*tp_methods*/ jpayne@69: 0, /*tp_members*/ jpayne@69: 0, /*tp_getset*/ jpayne@69: 0, /*tp_base*/ jpayne@69: 0, /*tp_dict*/ jpayne@69: 0, /*tp_descr_get*/ jpayne@69: 0, /*tp_descr_set*/ jpayne@69: #if !CYTHON_USE_TYPE_SPECS jpayne@69: 0, /*tp_dictoffset*/ jpayne@69: #endif jpayne@69: __pyx_pw_5pysam_7libcvcf_11asVCFRecord_1__init__, /*tp_init*/ jpayne@69: 0, /*tp_alloc*/ jpayne@69: __pyx_tp_new_5pysam_7libcvcf_asVCFRecord, /*tp_new*/ jpayne@69: 0, /*tp_free*/ jpayne@69: 0, /*tp_is_gc*/ jpayne@69: 0, /*tp_bases*/ jpayne@69: 0, /*tp_mro*/ jpayne@69: 0, /*tp_cache*/ jpayne@69: 0, /*tp_subclasses*/ jpayne@69: 0, /*tp_weaklist*/ jpayne@69: 0, /*tp_del*/ jpayne@69: 0, /*tp_version_tag*/ jpayne@69: #if PY_VERSION_HEX >= 0x030400a1 jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: 0, /*tp_finalize*/ jpayne@69: #else jpayne@69: NULL, /*tp_finalize*/ jpayne@69: #endif jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) jpayne@69: 0, /*tp_vectorcall*/ jpayne@69: #endif jpayne@69: #if __PYX_NEED_TP_PRINT_SLOT == 1 jpayne@69: 0, /*tp_print*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030C0000 jpayne@69: 0, /*tp_watched*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030d00A4 jpayne@69: 0, /*tp_versions_used*/ jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 jpayne@69: 0, /*tp_pypy_flags*/ jpayne@69: #endif jpayne@69: }; jpayne@69: #endif jpayne@69: jpayne@69: #if CYTHON_USE_FREELISTS jpayne@69: static struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *__pyx_freelist_5pysam_7libcvcf___pyx_scope_struct___parse[8]; jpayne@69: static int __pyx_freecount_5pysam_7libcvcf___pyx_scope_struct___parse = 0; jpayne@69: #endif jpayne@69: jpayne@69: static PyObject *__pyx_tp_new_5pysam_7libcvcf___pyx_scope_struct___parse(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { jpayne@69: PyObject *o; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); jpayne@69: o = alloc_func(t, 0); jpayne@69: #else jpayne@69: #if CYTHON_USE_FREELISTS jpayne@69: if (likely((int)(__pyx_freecount_5pysam_7libcvcf___pyx_scope_struct___parse > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse)))) { jpayne@69: o = (PyObject*)__pyx_freelist_5pysam_7libcvcf___pyx_scope_struct___parse[--__pyx_freecount_5pysam_7libcvcf___pyx_scope_struct___parse]; jpayne@69: memset(o, 0, sizeof(struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse)); jpayne@69: (void) PyObject_INIT(o, t); jpayne@69: PyObject_GC_Track(o); jpayne@69: } else jpayne@69: #endif jpayne@69: { jpayne@69: o = (*t->tp_alloc)(t, 0); jpayne@69: if (unlikely(!o)) return 0; jpayne@69: } jpayne@69: #endif jpayne@69: return o; jpayne@69: } jpayne@69: jpayne@69: static void __pyx_tp_dealloc_5pysam_7libcvcf___pyx_scope_struct___parse(PyObject *o) { jpayne@69: struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *p = (struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *)o; jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: 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)) { jpayne@69: if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_7libcvcf___pyx_scope_struct___parse) { jpayne@69: if (PyObject_CallFinalizerFromDealloc(o)) return; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: PyObject_GC_UnTrack(o); jpayne@69: Py_CLEAR(p->__pyx_v_d); jpayne@69: Py_CLEAR(p->__pyx_v_line); jpayne@69: Py_CLEAR(p->__pyx_v_self); jpayne@69: Py_CLEAR(p->__pyx_v_stream); jpayne@69: Py_CLEAR(p->__pyx_t_0); jpayne@69: #if CYTHON_USE_FREELISTS jpayne@69: if (((int)(__pyx_freecount_5pysam_7libcvcf___pyx_scope_struct___parse < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse)))) { jpayne@69: __pyx_freelist_5pysam_7libcvcf___pyx_scope_struct___parse[__pyx_freecount_5pysam_7libcvcf___pyx_scope_struct___parse++] = ((struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *)o); jpayne@69: } else jpayne@69: #endif jpayne@69: { jpayne@69: #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY jpayne@69: (*Py_TYPE(o)->tp_free)(o); jpayne@69: #else jpayne@69: { jpayne@69: freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); jpayne@69: if (tp_free) tp_free(o); jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: static int __pyx_tp_traverse_5pysam_7libcvcf___pyx_scope_struct___parse(PyObject *o, visitproc v, void *a) { jpayne@69: int e; jpayne@69: struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *p = (struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse *)o; jpayne@69: if (p->__pyx_v_d) { jpayne@69: e = (*v)(p->__pyx_v_d, a); if (e) return e; jpayne@69: } jpayne@69: if (p->__pyx_v_line) { jpayne@69: e = (*v)(p->__pyx_v_line, a); if (e) return e; jpayne@69: } jpayne@69: if (p->__pyx_v_self) { jpayne@69: e = (*v)(p->__pyx_v_self, a); if (e) return e; jpayne@69: } jpayne@69: if (p->__pyx_v_stream) { jpayne@69: e = (*v)(p->__pyx_v_stream, a); if (e) return e; jpayne@69: } jpayne@69: if (p->__pyx_t_0) { jpayne@69: e = (*v)(p->__pyx_t_0, a); if (e) return e; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: static PyType_Slot __pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse_slots[] = { jpayne@69: {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_7libcvcf___pyx_scope_struct___parse}, jpayne@69: {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_7libcvcf___pyx_scope_struct___parse}, jpayne@69: {Py_tp_new, (void *)__pyx_tp_new_5pysam_7libcvcf___pyx_scope_struct___parse}, jpayne@69: {0, 0}, jpayne@69: }; jpayne@69: static PyType_Spec __pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse_spec = { jpayne@69: "pysam.libcvcf.__pyx_scope_struct___parse", jpayne@69: sizeof(struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse), jpayne@69: 0, jpayne@69: Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, jpayne@69: __pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse_slots, jpayne@69: }; jpayne@69: #else jpayne@69: jpayne@69: static PyTypeObject __pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse = { jpayne@69: PyVarObject_HEAD_INIT(0, 0) jpayne@69: "pysam.libcvcf.""__pyx_scope_struct___parse", /*tp_name*/ jpayne@69: sizeof(struct __pyx_obj_5pysam_7libcvcf___pyx_scope_struct___parse), /*tp_basicsize*/ jpayne@69: 0, /*tp_itemsize*/ jpayne@69: __pyx_tp_dealloc_5pysam_7libcvcf___pyx_scope_struct___parse, /*tp_dealloc*/ jpayne@69: #if PY_VERSION_HEX < 0x030800b4 jpayne@69: 0, /*tp_print*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030800b4 jpayne@69: 0, /*tp_vectorcall_offset*/ jpayne@69: #endif jpayne@69: 0, /*tp_getattr*/ jpayne@69: 0, /*tp_setattr*/ jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: 0, /*tp_compare*/ jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: 0, /*tp_as_async*/ jpayne@69: #endif jpayne@69: 0, /*tp_repr*/ jpayne@69: 0, /*tp_as_number*/ jpayne@69: 0, /*tp_as_sequence*/ jpayne@69: 0, /*tp_as_mapping*/ jpayne@69: 0, /*tp_hash*/ jpayne@69: 0, /*tp_call*/ jpayne@69: 0, /*tp_str*/ jpayne@69: 0, /*tp_getattro*/ jpayne@69: 0, /*tp_setattro*/ jpayne@69: 0, /*tp_as_buffer*/ jpayne@69: 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*/ jpayne@69: 0, /*tp_doc*/ jpayne@69: __pyx_tp_traverse_5pysam_7libcvcf___pyx_scope_struct___parse, /*tp_traverse*/ jpayne@69: 0, /*tp_clear*/ jpayne@69: 0, /*tp_richcompare*/ jpayne@69: 0, /*tp_weaklistoffset*/ jpayne@69: 0, /*tp_iter*/ jpayne@69: 0, /*tp_iternext*/ jpayne@69: 0, /*tp_methods*/ jpayne@69: 0, /*tp_members*/ jpayne@69: 0, /*tp_getset*/ jpayne@69: 0, /*tp_base*/ jpayne@69: 0, /*tp_dict*/ jpayne@69: 0, /*tp_descr_get*/ jpayne@69: 0, /*tp_descr_set*/ jpayne@69: #if !CYTHON_USE_TYPE_SPECS jpayne@69: 0, /*tp_dictoffset*/ jpayne@69: #endif jpayne@69: 0, /*tp_init*/ jpayne@69: 0, /*tp_alloc*/ jpayne@69: __pyx_tp_new_5pysam_7libcvcf___pyx_scope_struct___parse, /*tp_new*/ jpayne@69: 0, /*tp_free*/ jpayne@69: 0, /*tp_is_gc*/ jpayne@69: 0, /*tp_bases*/ jpayne@69: 0, /*tp_mro*/ jpayne@69: 0, /*tp_cache*/ jpayne@69: 0, /*tp_subclasses*/ jpayne@69: 0, /*tp_weaklist*/ jpayne@69: 0, /*tp_del*/ jpayne@69: 0, /*tp_version_tag*/ jpayne@69: #if PY_VERSION_HEX >= 0x030400a1 jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: 0, /*tp_finalize*/ jpayne@69: #else jpayne@69: NULL, /*tp_finalize*/ jpayne@69: #endif jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) jpayne@69: 0, /*tp_vectorcall*/ jpayne@69: #endif jpayne@69: #if __PYX_NEED_TP_PRINT_SLOT == 1 jpayne@69: 0, /*tp_print*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030C0000 jpayne@69: 0, /*tp_watched*/ jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030d00A4 jpayne@69: 0, /*tp_versions_used*/ jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 jpayne@69: 0, /*tp_pypy_flags*/ jpayne@69: #endif jpayne@69: }; jpayne@69: #endif jpayne@69: jpayne@69: static PyMethodDef __pyx_methods[] = { jpayne@69: {0, 0, 0, 0} jpayne@69: }; jpayne@69: #ifndef CYTHON_SMALL_CODE jpayne@69: #if defined(__clang__) jpayne@69: #define CYTHON_SMALL_CODE jpayne@69: #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) jpayne@69: #define CYTHON_SMALL_CODE __attribute__((cold)) jpayne@69: #else jpayne@69: #define CYTHON_SMALL_CODE jpayne@69: #endif jpayne@69: #endif jpayne@69: /* #### Code section: pystring_table ### */ jpayne@69: jpayne@69: static int __Pyx_CreateStringTabAndInitStrings(void) { jpayne@69: __Pyx_StringTabEntry __pyx_string_tab[] = { jpayne@69: {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_b_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 0, 0}, jpayne@69: {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_ACGTN, __pyx_k_ACGTN, sizeof(__pyx_k_ACGTN), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_ACGTN_2, __pyx_k_ACGTN_2, sizeof(__pyx_k_ACGTN_2), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_ALT, __pyx_k_ALT, sizeof(__pyx_k_ALT), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_BADLY_FORMATTED_FORMAT_STRING, __pyx_k_BADLY_FORMATTED_FORMAT_STRING, sizeof(__pyx_k_BADLY_FORMATTED_FORMAT_STRING), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_BADLY_FORMATTED_FORMAT_STRING_Fo, __pyx_k_BADLY_FORMATTED_FORMAT_STRING_Fo, sizeof(__pyx_k_BADLY_FORMATTED_FORMAT_STRING_Fo), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_BADLY_FORMATTED_HEADING, __pyx_k_BADLY_FORMATTED_HEADING, sizeof(__pyx_k_BADLY_FORMATTED_HEADING), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_BADLY_FORMATTED_HEADING_Did_not, __pyx_k_BADLY_FORMATTED_HEADING_Did_not, sizeof(__pyx_k_BADLY_FORMATTED_HEADING_Did_not), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_BAD_CHR_TAG_Error_calculating_ch, __pyx_k_BAD_CHR_TAG_Error_calculating_ch, sizeof(__pyx_k_BAD_CHR_TAG_Error_calculating_ch), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_BAD_GENOTYPE, __pyx_k_BAD_GENOTYPE, sizeof(__pyx_k_BAD_GENOTYPE), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_BAD_GENOTYPE_Cannot_parse_genoty, __pyx_k_BAD_GENOTYPE_Cannot_parse_genoty, sizeof(__pyx_k_BAD_GENOTYPE_Cannot_parse_genoty), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_BAD_NUMBER_OF_COLUMNS, __pyx_k_BAD_NUMBER_OF_COLUMNS, sizeof(__pyx_k_BAD_NUMBER_OF_COLUMNS), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_BAD_NUMBER_OF_COLUMNS_Wrong_numb, __pyx_k_BAD_NUMBER_OF_COLUMNS_Wrong_numb, sizeof(__pyx_k_BAD_NUMBER_OF_COLUMNS_Wrong_numb), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_BAD_NUMBER_OF_PARAMETERS, __pyx_k_BAD_NUMBER_OF_PARAMETERS, sizeof(__pyx_k_BAD_NUMBER_OF_PARAMETERS), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_BAD_NUMBER_OF_PARAMETERS_Found_u, __pyx_k_BAD_NUMBER_OF_PARAMETERS_Found_u, sizeof(__pyx_k_BAD_NUMBER_OF_PARAMETERS_Found_u), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_BAD_NUMBER_OF_VALUES, __pyx_k_BAD_NUMBER_OF_VALUES, sizeof(__pyx_k_BAD_NUMBER_OF_VALUES), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_BAD_NUMBER_OF_VALUES_Found_too_m, __pyx_k_BAD_NUMBER_OF_VALUES_Found_too_m, sizeof(__pyx_k_BAD_NUMBER_OF_VALUES_Found_too_m), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_CHROM, __pyx_k_CHROM, sizeof(__pyx_k_CHROM), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Can_only_handle_v3_3_and_v4_0_VC, __pyx_k_Can_only_handle_v3_3_and_v4_0_VC, sizeof(__pyx_k_Can_only_handle_v3_3_and_v4_0_VC), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_Character, __pyx_k_Character, sizeof(__pyx_k_Character), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Conditional_genotype_quality, __pyx_k_Conditional_genotype_quality, sizeof(__pyx_k_Conditional_genotype_quality), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_DP, __pyx_k_DP, sizeof(__pyx_k_DP), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Description, __pyx_k_Description, sizeof(__pyx_k_Description), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_Description_2, __pyx_k_Description_2, sizeof(__pyx_k_Description_2), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Don_t_understand_region_string_s, __pyx_k_Don_t_understand_region_string_s, sizeof(__pyx_k_Don_t_understand_region_string_s), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_EC, __pyx_k_EC, sizeof(__pyx_k_EC), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_ERROR_FLAG_HAS_VALUE, __pyx_k_ERROR_FLAG_HAS_VALUE, sizeof(__pyx_k_ERROR_FLAG_HAS_VALUE), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ERROR_FLAG_HAS_VALUE_Flag_fields, __pyx_k_ERROR_FLAG_HAS_VALUE_Flag_fields, sizeof(__pyx_k_ERROR_FLAG_HAS_VALUE_Flag_fields), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_ERROR_FORMAT_NOT_CHAR, __pyx_k_ERROR_FORMAT_NOT_CHAR, sizeof(__pyx_k_ERROR_FORMAT_NOT_CHAR), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ERROR_FORMAT_NOT_CHAR_Eexpected, __pyx_k_ERROR_FORMAT_NOT_CHAR_Eexpected, sizeof(__pyx_k_ERROR_FORMAT_NOT_CHAR_Eexpected), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_ERROR_FORMAT_NOT_INTEGER, __pyx_k_ERROR_FORMAT_NOT_INTEGER, sizeof(__pyx_k_ERROR_FORMAT_NOT_INTEGER), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ERROR_FORMAT_NOT_INTEGER_Expecte, __pyx_k_ERROR_FORMAT_NOT_INTEGER_Expecte, sizeof(__pyx_k_ERROR_FORMAT_NOT_INTEGER_Expecte), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_ERROR_FORMAT_NOT_NUMERICAL, __pyx_k_ERROR_FORMAT_NOT_NUMERICAL, sizeof(__pyx_k_ERROR_FORMAT_NOT_NUMERICAL), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ERROR_FORMAT_NOT_NUMERICAL_Expec, __pyx_k_ERROR_FORMAT_NOT_NUMERICAL_Expec, sizeof(__pyx_k_ERROR_FORMAT_NOT_NUMERICAL_Expec), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_ERROR_INFO_STRING, __pyx_k_ERROR_INFO_STRING, sizeof(__pyx_k_ERROR_INFO_STRING), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ERROR_INFO_STRING_Error_while_pa, __pyx_k_ERROR_INFO_STRING_Error_while_pa, sizeof(__pyx_k_ERROR_INFO_STRING_Error_while_pa), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_ERROR_TRAILING_DATA, __pyx_k_ERROR_TRAILING_DATA, sizeof(__pyx_k_ERROR_TRAILING_DATA), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ERROR_TRAILING_DATA_Numerical_fi, __pyx_k_ERROR_TRAILING_DATA_Numerical_fi, sizeof(__pyx_k_ERROR_TRAILING_DATA_Numerical_fi), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_ERROR_UNKNOWN_KEY, __pyx_k_ERROR_UNKNOWN_KEY, sizeof(__pyx_k_ERROR_UNKNOWN_KEY), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ERROR_UNKNOWN_KEY_Unknown_key_s, __pyx_k_ERROR_UNKNOWN_KEY_Unknown_key_s, sizeof(__pyx_k_ERROR_UNKNOWN_KEY_Unknown_key_s), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Expected_alternate_allel_counts, __pyx_k_Expected_alternate_allel_counts, sizeof(__pyx_k_Expected_alternate_allel_counts), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_FILTER, __pyx_k_FILTER, sizeof(__pyx_k_FILTER), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_FILTER_NOT_DEFINED, __pyx_k_FILTER_NOT_DEFINED, sizeof(__pyx_k_FILTER_NOT_DEFINED), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_FILTER_NOT_DEFINED_Identifier_s, __pyx_k_FILTER_NOT_DEFINED_Identifier_s, sizeof(__pyx_k_FILTER_NOT_DEFINED_Identifier_s), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_FORMAT, __pyx_k_FORMAT, sizeof(__pyx_k_FORMAT), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_FORMAT, __pyx_k_FORMAT, sizeof(__pyx_k_FORMAT), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_FORMAT_MISSING_QUOTES, __pyx_k_FORMAT_MISSING_QUOTES, sizeof(__pyx_k_FORMAT_MISSING_QUOTES), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_FORMAT_MISSING_QUOTES_Descriptio, __pyx_k_FORMAT_MISSING_QUOTES_Descriptio, sizeof(__pyx_k_FORMAT_MISSING_QUOTES_Descriptio), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_FORMAT_NOT_DEFINED, __pyx_k_FORMAT_NOT_DEFINED, sizeof(__pyx_k_FORMAT_NOT_DEFINED), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_FORMAT_NOT_DEFINED_Identifier_s, __pyx_k_FORMAT_NOT_DEFINED_Identifier_s, sizeof(__pyx_k_FORMAT_NOT_DEFINED_Identifier_s), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_FT, __pyx_k_FT, sizeof(__pyx_k_FT), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_Flag, __pyx_k_Flag, sizeof(__pyx_k_Flag), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_Float, __pyx_k_Float, sizeof(__pyx_k_Float), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_GL, __pyx_k_GL, sizeof(__pyx_k_GL), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_GLE, __pyx_k_GLE, sizeof(__pyx_k_GLE), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_GP, __pyx_k_GP, sizeof(__pyx_k_GP), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_GQ, __pyx_k_GQ, sizeof(__pyx_k_GQ), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_GT, __pyx_k_GT, sizeof(__pyx_k_GT), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_GTdata, __pyx_k_GTdata, sizeof(__pyx_k_GTdata), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_GTstring, __pyx_k_GTstring, sizeof(__pyx_k_GTstring), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_Genotype, __pyx_k_Genotype, sizeof(__pyx_k_Genotype), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Genotype_Quality, __pyx_k_Genotype_Quality, sizeof(__pyx_k_Genotype_Quality), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Genotype_likelihoods, __pyx_k_Genotype_likelihoods, sizeof(__pyx_k_Genotype_likelihoods), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Genotype_posterior_probabilities, __pyx_k_Genotype_posterior_probabilities, sizeof(__pyx_k_Genotype_posterior_probabilities), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_HEADING_NOT_SEPARATED_BY_TABS, __pyx_k_HEADING_NOT_SEPARATED_BY_TABS, sizeof(__pyx_k_HEADING_NOT_SEPARATED_BY_TABS), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_HEADING_NOT_SEPARATED_BY_TABS_He, __pyx_k_HEADING_NOT_SEPARATED_BY_TABS_He, sizeof(__pyx_k_HEADING_NOT_SEPARATED_BY_TABS_He), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_HQ, __pyx_k_HQ, sizeof(__pyx_k_HQ), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Haplotype_Quality, __pyx_k_Haplotype_Quality, sizeof(__pyx_k_Haplotype_Quality), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_ID_2, __pyx_k_ID_2, sizeof(__pyx_k_ID_2), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_INFO, __pyx_k_INFO, sizeof(__pyx_k_INFO), 0, 1, 0, 1}, jpayne@69: {&__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}, jpayne@69: {&__pyx_n_u_Integer, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Invalid_error_string_s, __pyx_k_Invalid_error_string_s, sizeof(__pyx_k_Invalid_error_string_s), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_MISSING_INDEL_ALLELE_REF_BASE, __pyx_k_MISSING_INDEL_ALLELE_REF_BASE, sizeof(__pyx_k_MISSING_INDEL_ALLELE_REF_BASE), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_MISSING_INDEL_ALLELE_REF_BASE_In, __pyx_k_MISSING_INDEL_ALLELE_REF_BASE_In, sizeof(__pyx_k_MISSING_INDEL_ALLELE_REF_BASE_In), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_MISSING_REF, __pyx_k_MISSING_REF, sizeof(__pyx_k_MISSING_REF), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_MISSING_REF_Reference_allele_mis, __pyx_k_MISSING_REF_Reference_allele_mis, sizeof(__pyx_k_MISSING_REF_Reference_allele_mis), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_MQ, __pyx_k_MQ, sizeof(__pyx_k_MQ), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_NT_ALLELES, __pyx_k_NT_ALLELES, sizeof(__pyx_k_NT_ALLELES), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_NT_GENOTYPES, __pyx_k_NT_GENOTYPES, sizeof(__pyx_k_NT_GENOTYPES), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_NT_NR_ALLELES, __pyx_k_NT_NR_ALLELES, sizeof(__pyx_k_NT_NR_ALLELES), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_NT_NUMBER, __pyx_k_NT_NUMBER, sizeof(__pyx_k_NT_NUMBER), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_NT_PHASED_GENOTYPES, __pyx_k_NT_PHASED_GENOTYPES, sizeof(__pyx_k_NT_PHASED_GENOTYPES), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_NT_UNKNOWN, __pyx_k_NT_UNKNOWN, sizeof(__pyx_k_NT_UNKNOWN), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_Number, __pyx_k_Number, sizeof(__pyx_k_Number), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_Number_2, __pyx_k_Number_2, sizeof(__pyx_k_Number_2), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_b_PASS, __pyx_k_PASS, sizeof(__pyx_k_PASS), 0, 0, 0, 1}, jpayne@69: {&__pyx_n_u_PASS, __pyx_k_PASS, sizeof(__pyx_k_PASS), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_PL, __pyx_k_PL, sizeof(__pyx_k_PL), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_POS, __pyx_k_POS, sizeof(__pyx_k_POS), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_POS_NOT_NUMERICAL, __pyx_k_POS_NOT_NUMERICAL, sizeof(__pyx_k_POS_NOT_NUMERICAL), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_POS_NOT_NUMERICAL_Position_colum, __pyx_k_POS_NOT_NUMERICAL_Position_colum, sizeof(__pyx_k_POS_NOT_NUMERICAL_Position_colum), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_POS_NOT_POSITIVE, __pyx_k_POS_NOT_POSITIVE, sizeof(__pyx_k_POS_NOT_POSITIVE), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_POS_NOT_POSITIVE_Position_field, __pyx_k_POS_NOT_POSITIVE_Position_field, sizeof(__pyx_k_POS_NOT_POSITIVE_Position_field), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_PQ, __pyx_k_PQ, sizeof(__pyx_k_PQ), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_u_PS, __pyx_k_PS, sizeof(__pyx_k_PS), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_Phase_set, __pyx_k_Phase_set, sizeof(__pyx_k_Phase_set), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Phasing_quality, __pyx_k_Phasing_quality, sizeof(__pyx_k_Phasing_quality), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Phred_scaled_genotype_likelihood, __pyx_k_Phred_scaled_genotype_likelihood, sizeof(__pyx_k_Phred_scaled_genotype_likelihood), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_QUAL, __pyx_k_QUAL, sizeof(__pyx_k_QUAL), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_QUAL_NOT_NUMERICAL, __pyx_k_QUAL_NOT_NUMERICAL, sizeof(__pyx_k_QUAL_NOT_NUMERICAL), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_QUAL_NOT_NUMERICAL_Quality_field, __pyx_k_QUAL_NOT_NUMERICAL_Quality_field, sizeof(__pyx_k_QUAL_NOT_NUMERICAL_Quality_field), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_REF, __pyx_k_REF, sizeof(__pyx_k_REF), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_RMS_mapping_quality, __pyx_k_RMS_mapping_quality, sizeof(__pyx_k_RMS_mapping_quality), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Read_depth_at_this_position_for, __pyx_k_Read_depth_at_this_position_for, sizeof(__pyx_k_Read_depth_at_this_position_for), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Required_key_s_not_found_in_data, __pyx_k_Required_key_s_not_found_in_data, sizeof(__pyx_k_Required_key_s_not_found_in_data), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Sample_Genotype_Filter, __pyx_k_Sample_Genotype_Filter, sizeof(__pyx_k_Sample_Genotype_Filter), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_String, __pyx_k_String, sizeof(__pyx_k_String), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_Tabixfile, __pyx_k_Tabixfile, sizeof(__pyx_k_Tabixfile), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_Type_2, __pyx_k_Type_2, sizeof(__pyx_k_Type_2), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_UNKNOWN_CHAR_IN_REF, __pyx_k_UNKNOWN_CHAR_IN_REF, sizeof(__pyx_k_UNKNOWN_CHAR_IN_REF), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_UNKNOWN_CHAR_IN_REF_Unknown_char, __pyx_k_UNKNOWN_CHAR_IN_REF_Unknown_char, sizeof(__pyx_k_UNKNOWN_CHAR_IN_REF_Unknown_char), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_UNKNOWN_FORMAT_STRING, __pyx_k_UNKNOWN_FORMAT_STRING, sizeof(__pyx_k_UNKNOWN_FORMAT_STRING), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_UNKNOWN_FORMAT_STRING_Unknown_fi, __pyx_k_UNKNOWN_FORMAT_STRING_Unknown_fi, sizeof(__pyx_k_UNKNOWN_FORMAT_STRING_Unknown_fi), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Undefined_tag, __pyx_k_Undefined_tag, sizeof(__pyx_k_Undefined_tag), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_Unknown_number_type_encountered, __pyx_k_Unknown_number_type_encountered, sizeof(__pyx_k_Unknown_number_type_encountered), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_V33_BAD_ALLELE, __pyx_k_V33_BAD_ALLELE, sizeof(__pyx_k_V33_BAD_ALLELE), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_V33_BAD_ALLELE_Cannot_interpret, __pyx_k_V33_BAD_ALLELE_Cannot_interpret, sizeof(__pyx_k_V33_BAD_ALLELE_Cannot_interpret), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_V33_BAD_REF, __pyx_k_V33_BAD_REF, sizeof(__pyx_k_V33_BAD_REF), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_V33_BAD_REF_Reference_should_be, __pyx_k_V33_BAD_REF_Reference_should_be, sizeof(__pyx_k_V33_BAD_REF_Reference_should_be), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_V33_UNMATCHED_DELETION, __pyx_k_V33_UNMATCHED_DELETION, sizeof(__pyx_k_V33_UNMATCHED_DELETION), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_V33_UNMATCHED_DELETION_Deleted_s, __pyx_k_V33_UNMATCHED_DELETION_Deleted_s, sizeof(__pyx_k_V33_UNMATCHED_DELETION_Deleted_s), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_V40_BAD_ALLELE, __pyx_k_V40_BAD_ALLELE, sizeof(__pyx_k_V40_BAD_ALLELE), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_V40_BAD_ALLELE_Bad_allele_found, __pyx_k_V40_BAD_ALLELE_Bad_allele_found, sizeof(__pyx_k_V40_BAD_ALLELE_Bad_allele_found), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_V40_FORMAT_MUST_HAVE_NAMED_FIELD, __pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD, sizeof(__pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2, __pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2, sizeof(__pyx_k_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_V40_MISSING_ANGLE_BRACKETS, __pyx_k_V40_MISSING_ANGLE_BRACKETS, sizeof(__pyx_k_V40_MISSING_ANGLE_BRACKETS), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_V40_MISSING_ANGLE_BRACKETS_Forma, __pyx_k_V40_MISSING_ANGLE_BRACKETS_Forma, sizeof(__pyx_k_V40_MISSING_ANGLE_BRACKETS_Forma), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_VCF, __pyx_k_VCF, sizeof(__pyx_k_VCF), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_VCF, __pyx_k_VCF, sizeof(__pyx_k_VCF), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_VCFRecord, __pyx_k_VCFRecord, sizeof(__pyx_k_VCFRecord), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_VCFRecord, __pyx_k_VCFRecord, sizeof(__pyx_k_VCFRecord), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_VCFRecord___reduce_cython, __pyx_k_VCFRecord___reduce_cython, sizeof(__pyx_k_VCFRecord___reduce_cython), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCFRecord___setstate_cython, __pyx_k_VCFRecord___setstate_cython, sizeof(__pyx_k_VCFRecord___setstate_cython), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCFRecord_error, __pyx_k_VCFRecord_error, sizeof(__pyx_k_VCFRecord_error), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF___del, __pyx_k_VCF___del, sizeof(__pyx_k_VCF___del), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF___init, __pyx_k_VCF___init, sizeof(__pyx_k_VCF___init), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF__add_definition, __pyx_k_VCF__add_definition, sizeof(__pyx_k_VCF__add_definition), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF__parse, __pyx_k_VCF__parse, sizeof(__pyx_k_VCF__parse), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF__parse_header, __pyx_k_VCF__parse_header, sizeof(__pyx_k_VCF__parse_header), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_close, __pyx_k_VCF_close, sizeof(__pyx_k_VCF_close), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_compare_calls, __pyx_k_VCF_compare_calls, sizeof(__pyx_k_VCF_compare_calls), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_connect, __pyx_k_VCF_connect, sizeof(__pyx_k_VCF_connect), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_convertGT, __pyx_k_VCF_convertGT, sizeof(__pyx_k_VCF_convertGT), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_convertGTback, __pyx_k_VCF_convertGTback, sizeof(__pyx_k_VCF_convertGTback), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_enter_default_format, __pyx_k_VCF_enter_default_format, sizeof(__pyx_k_VCF_enter_default_format), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_error, __pyx_k_VCF_error, sizeof(__pyx_k_VCF_error), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_fetch, __pyx_k_VCF_fetch, sizeof(__pyx_k_VCF_fetch), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_format_format, __pyx_k_VCF_format_format, sizeof(__pyx_k_VCF_format_format), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_format_formatdata, __pyx_k_VCF_format_formatdata, sizeof(__pyx_k_VCF_format_formatdata), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_get_expected, __pyx_k_VCF_get_expected, sizeof(__pyx_k_VCF_get_expected), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_getfilter, __pyx_k_VCF_getfilter, sizeof(__pyx_k_VCF_getfilter), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_getformat, __pyx_k_VCF_getformat, sizeof(__pyx_k_VCF_getformat), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_getheader, __pyx_k_VCF_getheader, sizeof(__pyx_k_VCF_getheader), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_getinfo, __pyx_k_VCF_getinfo, sizeof(__pyx_k_VCF_getinfo), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_getsamples, __pyx_k_VCF_getsamples, sizeof(__pyx_k_VCF_getsamples), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_ignoreerror, __pyx_k_VCF_ignoreerror, sizeof(__pyx_k_VCF_ignoreerror), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_inregion, __pyx_k_VCF_inregion, sizeof(__pyx_k_VCF_inregion), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_parse, __pyx_k_VCF_parse, sizeof(__pyx_k_VCF_parse), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_parse_data, __pyx_k_VCF_parse_data, sizeof(__pyx_k_VCF_parse_data), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_parse_format, __pyx_k_VCF_parse_format, sizeof(__pyx_k_VCF_parse_format), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_parse_formatdata, __pyx_k_VCF_parse_formatdata, sizeof(__pyx_k_VCF_parse_formatdata), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_parse_header, __pyx_k_VCF_parse_header, sizeof(__pyx_k_VCF_parse_header), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_parse_heading, __pyx_k_VCF_parse_heading, sizeof(__pyx_k_VCF_parse_heading), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_VCF_says, __pyx_k_VCF_says, sizeof(__pyx_k_VCF_says), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_VCF_setfilter, __pyx_k_VCF_setfilter, sizeof(__pyx_k_VCF_setfilter), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_setformat, __pyx_k_VCF_setformat, sizeof(__pyx_k_VCF_setformat), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_setheader, __pyx_k_VCF_setheader, sizeof(__pyx_k_VCF_setheader), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_setinfo, __pyx_k_VCF_setinfo, sizeof(__pyx_k_VCF_setinfo), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_setreference, __pyx_k_VCF_setreference, sizeof(__pyx_k_VCF_setreference), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_setregions, __pyx_k_VCF_setregions, sizeof(__pyx_k_VCF_setregions), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_setsamples, __pyx_k_VCF_setsamples, sizeof(__pyx_k_VCF_setsamples), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_setversion, __pyx_k_VCF_setversion, sizeof(__pyx_k_VCF_setversion), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_validate, __pyx_k_VCF_validate, sizeof(__pyx_k_VCF_validate), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_warnerror, __pyx_k_VCF_warnerror, sizeof(__pyx_k_VCF_warnerror), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_write, __pyx_k_VCF_write, sizeof(__pyx_k_VCF_write), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_write_data, __pyx_k_VCF_write_data, sizeof(__pyx_k_VCF_write_data), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_write_header, __pyx_k_VCF_write_header, sizeof(__pyx_k_VCF_write_header), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_write_heading, __pyx_k_VCF_write_heading, sizeof(__pyx_k_VCF_write_heading), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_VCF_writeheader, __pyx_k_VCF_writeheader, sizeof(__pyx_k_VCF_writeheader), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_VCFv3_3, __pyx_k_VCFv3_3, sizeof(__pyx_k_VCFv3_3), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_VCFv4_0, __pyx_k_VCFv4_0, sizeof(__pyx_k_VCFv4_0), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_VCFv4_1, __pyx_k_VCFv4_1, sizeof(__pyx_k_VCFv4_1), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_VCFv4_2, __pyx_k_VCFv4_2, sizeof(__pyx_k_VCFv4_2), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_WRONG_REF, __pyx_k_WRONG_REF, sizeof(__pyx_k_WRONG_REF), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_WRONG_REF_Wrong_reference_s, __pyx_k_WRONG_REF_Wrong_reference_s, sizeof(__pyx_k_WRONG_REF_Wrong_reference_s), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_Warning, __pyx_k_Warning, sizeof(__pyx_k_Warning), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_ZERO_FOR_NON_FLAG_FIELD, __pyx_k_ZERO_FOR_NON_FLAG_FIELD, sizeof(__pyx_k_ZERO_FOR_NON_FLAG_FIELD), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ZERO_FOR_NON_FLAG_FIELD_number_s, __pyx_k_ZERO_FOR_NON_FLAG_FIELD_number_s, sizeof(__pyx_k_ZERO_FOR_NON_FLAG_FIELD_number_s), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_ZERO_LENGTH_ALLELE, __pyx_k_ZERO_LENGTH_ALLELE, sizeof(__pyx_k_ZERO_LENGTH_ALLELE), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_ZERO_LENGTH_ALLELE_Found_zero_le, __pyx_k_ZERO_LENGTH_ALLELE_Found_zero_le, sizeof(__pyx_k_ZERO_LENGTH_ALLELE_Found_zero_le), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s__139, __pyx_k__139, sizeof(__pyx_k__139), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_b__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 0, 0}, jpayne@69: {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_add_definition, __pyx_k_add_definition, sizeof(__pyx_k_add_definition), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_addn, __pyx_k_addn, sizeof(__pyx_k_addn), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_addns, __pyx_k_addns, sizeof(__pyx_k_addns), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_allele, __pyx_k_allele, sizeof(__pyx_k_allele), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_alleleRegEx, __pyx_k_alleleRegEx, sizeof(__pyx_k_alleleRegEx), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_alleles, __pyx_k_alleles, sizeof(__pyx_k_alleles), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_alt, __pyx_k_alt, sizeof(__pyx_k_alt), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_alt, __pyx_k_alt, sizeof(__pyx_k_alt), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_alt1, __pyx_k_alt1, sizeof(__pyx_k_alt1), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_alt2, __pyx_k_alt2, sizeof(__pyx_k_alt2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_asVCFRecord, __pyx_k_asVCFRecord, sizeof(__pyx_k_asVCFRecord), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_asVCFRecord___reduce_cython, __pyx_k_asVCFRecord___reduce_cython, sizeof(__pyx_k_asVCFRecord___reduce_cython), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_asVCFRecord___setstate_cython, __pyx_k_asVCFRecord___setstate_cython, sizeof(__pyx_k_asVCFRecord___setstate_cython), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_bisect, __pyx_k_bisect, sizeof(__pyx_k_bisect), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_blurp, __pyx_k_blurp, sizeof(__pyx_k_blurp), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_chrom, __pyx_k_chrom, sizeof(__pyx_k_chrom), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_chrom, __pyx_k_chrom, sizeof(__pyx_k_chrom), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_cols, __pyx_k_cols, sizeof(__pyx_k_cols), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_compare_calls, __pyx_k_compare_calls, sizeof(__pyx_k_compare_calls), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_convertGT, __pyx_k_convertGT, sizeof(__pyx_k_convertGT), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_convertGTback, __pyx_k_convertGTback, sizeof(__pyx_k_convertGTback), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_copy_2, __pyx_k_copy_2, sizeof(__pyx_k_copy_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_datagenerator, __pyx_k_datagenerator, sizeof(__pyx_k_datagenerator), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_defaultdict, __pyx_k_defaultdict, sizeof(__pyx_k_defaultdict), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_del, __pyx_k_del, sizeof(__pyx_k_del), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_deletion_is, __pyx_k_deletion_is, sizeof(__pyx_k_deletion_is), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_u_descr, __pyx_k_descr, sizeof(__pyx_k_descr), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_description, __pyx_k_description, sizeof(__pyx_k_description), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_dict_3, __pyx_k_dict_3, sizeof(__pyx_k_dict_3), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_elts, __pyx_k_elts, sizeof(__pyx_k_elts), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_enter_default_format, __pyx_k_enter_default_format, sizeof(__pyx_k_enter_default_format), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_errorlabel, __pyx_k_errorlabel, sizeof(__pyx_k_errorlabel), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_errorstring, __pyx_k_errorstring, sizeof(__pyx_k_errorstring), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_errwarn, __pyx_k_errwarn, sizeof(__pyx_k_errwarn), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_expected, __pyx_k_expected, sizeof(__pyx_k_expected), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_expected_2, __pyx_k_expected_2, sizeof(__pyx_k_expected_2), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_expected_3, __pyx_k_expected_3, sizeof(__pyx_k_expected_3), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_expected_4, __pyx_k_expected_4, sizeof(__pyx_k_expected_4), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_fa, __pyx_k_fa, sizeof(__pyx_k_fa), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_faref, __pyx_k_faref, sizeof(__pyx_k_faref), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_faref_leftflank, __pyx_k_faref_leftflank, sizeof(__pyx_k_faref_leftflank), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_fileformat, __pyx_k_fileformat, sizeof(__pyx_k_fileformat), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_fileformat_VCFv, __pyx_k_fileformat_VCFv, sizeof(__pyx_k_fileformat_VCFv), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_filter_2, __pyx_k_filter_2, sizeof(__pyx_k_filter_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_filter_2, __pyx_k_filter_2, sizeof(__pyx_k_filter_2), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_for, __pyx_k_for, sizeof(__pyx_k_for), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_format_2, __pyx_k_format_2, sizeof(__pyx_k_format_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_format_format, __pyx_k_format_format, sizeof(__pyx_k_format_format), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_format_formatdata, __pyx_k_format_formatdata, sizeof(__pyx_k_format_formatdata), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_formatdict, __pyx_k_formatdict, sizeof(__pyx_k_formatdict), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_found, __pyx_k_found, sizeof(__pyx_k_found), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_genotypes, __pyx_k_genotypes, sizeof(__pyx_k_genotypes), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_get_expected, __pyx_k_get_expected, sizeof(__pyx_k_get_expected), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_get_sequence, __pyx_k_get_sequence, sizeof(__pyx_k_get_sequence), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_getfilter, __pyx_k_getfilter, sizeof(__pyx_k_getfilter), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_getformat, __pyx_k_getformat, sizeof(__pyx_k_getformat), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_getheader, __pyx_k_getheader, sizeof(__pyx_k_getheader), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_getinfo, __pyx_k_getinfo, sizeof(__pyx_k_getinfo), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_getsamples, __pyx_k_getsamples, sizeof(__pyx_k_getsamples), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_gts, __pyx_k_gts, sizeof(__pyx_k_gts), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_gtsRegEx, __pyx_k_gtsRegEx, sizeof(__pyx_k_gtsRegEx), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_have_deletions, __pyx_k_have_deletions, sizeof(__pyx_k_have_deletions), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_header_2, __pyx_k_header_2, sizeof(__pyx_k_header_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_headings, __pyx_k_headings, sizeof(__pyx_k_headings), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_id_2, __pyx_k_id_2, sizeof(__pyx_k_id_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_id_2, __pyx_k_id_2, sizeof(__pyx_k_id_2), 0, 1, 0, 1}, jpayne@69: {&__pyx_kp_u_id_numbertype_number_type_descri, __pyx_k_id_numbertype_number_type_descri, sizeof(__pyx_k_id_numbertype_number_type_descri), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_ielts, __pyx_k_ielts, sizeof(__pyx_k_ielts), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_ignored_errors, __pyx_k_ignored_errors, sizeof(__pyx_k_ignored_errors), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_ignoreerror, __pyx_k_ignoreerror, sizeof(__pyx_k_ignoreerror), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_in_line, __pyx_k_in_line, sizeof(__pyx_k_in_line), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_info_2, __pyx_k_info_2, sizeof(__pyx_k_info_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_info_2, __pyx_k_info_2, sizeof(__pyx_k_info_2), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_inregion, __pyx_k_inregion, sizeof(__pyx_k_inregion), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_itemgetter, __pyx_k_itemgetter, sizeof(__pyx_k_itemgetter), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_last, __pyx_k_last, sizeof(__pyx_k_last), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_last_line, __pyx_k_last_line, sizeof(__pyx_k_last_line), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_leftalign, __pyx_k_leftalign, sizeof(__pyx_k_leftalign), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_leftalign_2, __pyx_k_leftalign_2, sizeof(__pyx_k_leftalign_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_line_2, __pyx_k_line_2, sizeof(__pyx_k_line_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_lineno, __pyx_k_lineno, sizeof(__pyx_k_lineno), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_lineparse, __pyx_k_lineparse, sizeof(__pyx_k_lineparse), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_lines, __pyx_k_lines, sizeof(__pyx_k_lines), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_lines_2, __pyx_k_lines_2, sizeof(__pyx_k_lines_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_longest, __pyx_k_longest, sizeof(__pyx_k_longest), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_missing, __pyx_k_missing, sizeof(__pyx_k_missing), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_missingvalue, __pyx_k_missingvalue, sizeof(__pyx_k_missingvalue), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_movable, __pyx_k_movable, sizeof(__pyx_k_movable), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_na, __pyx_k_na, sizeof(__pyx_k_na), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_needs_to_be_checked, __pyx_k_needs_to_be_checked, sizeof(__pyx_k_needs_to_be_checked), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_newalts, __pyx_k_newalts, sizeof(__pyx_k_newalts), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_nmb, __pyx_k_nmb, sizeof(__pyx_k_nmb), 0, 0, 1, 1}, jpayne@69: {&__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}, jpayne@69: {&__pyx_kp_u_nonref_alleles, __pyx_k_nonref_alleles, sizeof(__pyx_k_nonref_alleles), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_numbertype, __pyx_k_numbertype, sizeof(__pyx_k_numbertype), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_opt, __pyx_k_opt, sizeof(__pyx_k_opt), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_output_2, __pyx_k_output_2, sizeof(__pyx_k_output_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_parameters_got, __pyx_k_parameters_got, sizeof(__pyx_k_parameters_got), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parse_2, __pyx_k_parse_2, sizeof(__pyx_k_parse_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parse_data, __pyx_k_parse_data, sizeof(__pyx_k_parse_data), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parse_format, __pyx_k_parse_format, sizeof(__pyx_k_parse_format), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parse_formatdata, __pyx_k_parse_formatdata, sizeof(__pyx_k_parse_formatdata), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parse_header, __pyx_k_parse_header, sizeof(__pyx_k_parse_header), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parse_header_2, __pyx_k_parse_header_2, sizeof(__pyx_k_parse_header_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parse_heading, __pyx_k_parse_heading, sizeof(__pyx_k_parse_heading), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parse_regions, __pyx_k_parse_regions, sizeof(__pyx_k_parse_regions), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_phased_genotypes, __pyx_k_phased_genotypes, sizeof(__pyx_k_phased_genotypes), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_pos1, __pyx_k_pos1, sizeof(__pyx_k_pos1), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pos2, __pyx_k_pos2, sizeof(__pyx_k_pos2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pysam, __pyx_k_pysam, sizeof(__pyx_k_pysam), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pysam_libcvcf, __pyx_k_pysam_libcvcf, sizeof(__pyx_k_pysam_libcvcf), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_s_pysam_libcvcf_pyx, __pyx_k_pysam_libcvcf_pyx, sizeof(__pyx_k_pysam_libcvcf_pyx), 0, 0, 1, 0}, jpayne@69: {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pyx_unpickle_asVCFRecord, __pyx_k_pyx_unpickle_asVCFRecord, sizeof(__pyx_k_pyx_unpickle_asVCFRecord), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_qual, __pyx_k_qual, sizeof(__pyx_k_qual), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_qual, __pyx_k_qual, sizeof(__pyx_k_qual), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_ref1, __pyx_k_ref1, sizeof(__pyx_k_ref1), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_ref2, __pyx_k_ref2, sizeof(__pyx_k_ref2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_reference_2, __pyx_k_reference_2, sizeof(__pyx_k_reference_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_reference_is, __pyx_k_reference_is, sizeof(__pyx_k_reference_is), 0, 1, 0, 0}, jpayne@69: {&__pyx_kp_u_reference_is_2, __pyx_k_reference_is_2, sizeof(__pyx_k_reference_is_2), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_regions, __pyx_k_regions, sizeof(__pyx_k_regions), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_regions_2, __pyx_k_regions_2, sizeof(__pyx_k_regions_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_required_2, __pyx_k_required_2, sizeof(__pyx_k_required_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_rest, __pyx_k_rest, sizeof(__pyx_k_rest), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_sample, __pyx_k_sample, sizeof(__pyx_k_sample), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_sample2column, __pyx_k_sample2column, sizeof(__pyx_k_sample2column), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_samples, __pyx_k_samples, sizeof(__pyx_k_samples), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_samples_2, __pyx_k_samples_2, sizeof(__pyx_k_samples_2), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_samples_3, __pyx_k_samples_3, sizeof(__pyx_k_samples_3), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_sdata, __pyx_k_sdata, sizeof(__pyx_k_sdata), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_separator, __pyx_k_separator, sizeof(__pyx_k_separator), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_sequence, __pyx_k_sequence, sizeof(__pyx_k_sequence), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setfilter, __pyx_k_setfilter, sizeof(__pyx_k_setfilter), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setformat, __pyx_k_setformat, sizeof(__pyx_k_setformat), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setheader, __pyx_k_setheader, sizeof(__pyx_k_setheader), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setinfo, __pyx_k_setinfo, sizeof(__pyx_k_setinfo), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setreference, __pyx_k_setreference, sizeof(__pyx_k_setreference), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setregions, __pyx_k_setregions, sizeof(__pyx_k_setregions), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setsamples, __pyx_k_setsamples, sizeof(__pyx_k_setsamples), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_setversion, __pyx_k_setversion, sizeof(__pyx_k_setversion), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_shortest, __pyx_k_shortest, sizeof(__pyx_k_shortest), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_sth_entry_not_found, __pyx_k_sth_entry_not_found, sizeof(__pyx_k_sth_entry_not_found), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, jpayne@69: {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_tabixfile, __pyx_k_tabixfile, sizeof(__pyx_k_tabixfile), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_u_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 1, 0, 1}, jpayne@69: {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_validate, __pyx_k_validate, sizeof(__pyx_k_validate), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, jpayne@69: {&__pyx_kp_u_values_in_element, __pyx_k_values_in_element, sizeof(__pyx_k_values_in_element), 0, 1, 0, 0}, jpayne@69: {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_vcf, __pyx_k_vcf, sizeof(__pyx_k_vcf), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_vcffile, __pyx_k_vcffile, sizeof(__pyx_k_vcffile), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_version_2, __pyx_k_version_2, sizeof(__pyx_k_version_2), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_warn_errors, __pyx_k_warn_errors, sizeof(__pyx_k_warn_errors), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_warnerror, __pyx_k_warnerror, sizeof(__pyx_k_warnerror), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_write_data, __pyx_k_write_data, sizeof(__pyx_k_write_data), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_write_header, __pyx_k_write_header, sizeof(__pyx_k_write_header), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_write_heading, __pyx_k_write_heading, sizeof(__pyx_k_write_heading), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_writeheader, __pyx_k_writeheader, sizeof(__pyx_k_writeheader), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, jpayne@69: {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, jpayne@69: {0, 0, 0, 0, 0, 0, 0} jpayne@69: }; jpayne@69: return __Pyx_InitStrings(__pyx_string_tab); jpayne@69: } jpayne@69: /* #### Code section: cached_builtins ### */ jpayne@69: static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { jpayne@69: __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 87, __pyx_L1_error) jpayne@69: __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 224, __pyx_L1_error) jpayne@69: __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) jpayne@69: __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 493, __pyx_L1_error) jpayne@69: __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 500, __pyx_L1_error) jpayne@69: __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 539, __pyx_L1_error) jpayne@69: __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 837, __pyx_L1_error) jpayne@69: __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 877, __pyx_L1_error) jpayne@69: __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 937, __pyx_L1_error) jpayne@69: __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1000, __pyx_L1_error) jpayne@69: __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 1081, __pyx_L1_error) jpayne@69: __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 120, __pyx_L1_error) jpayne@69: return 0; jpayne@69: __pyx_L1_error:; jpayne@69: return -1; jpayne@69: } jpayne@69: /* #### Code section: cached_constants ### */ jpayne@69: jpayne@69: static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":337 jpayne@69: * if _copy != None: jpayne@69: * self._leftalign = _copy._leftalign jpayne@69: * self._header = _copy._header[:] # <<<<<<<<<<<<<< jpayne@69: * self._version = _copy._version jpayne@69: * self._info = copy.deepcopy(_copy._info) jpayne@69: */ jpayne@69: __pyx_slice__9 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__9)) __PYX_ERR(0, 337, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_slice__9); jpayne@69: __Pyx_GIVEREF(__pyx_slice__9); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":372 jpayne@69: * self.error(line,self.V40_MISSING_ANGLE_BRACKETS) jpayne@69: * format += ">" jpayne@69: * format = format[1:-1] # <<<<<<<<<<<<<< jpayne@69: * data = {'id':None,'number':None,'type':None,'descr':None} jpayne@69: * idx = 0 jpayne@69: */ jpayne@69: __pyx_slice__17 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__17)) __PYX_ERR(0, 372, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_slice__17); jpayne@69: __Pyx_GIVEREF(__pyx_slice__17); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":377 jpayne@69: * while len(format.strip())>0: jpayne@69: * elts = format.strip().split(',') jpayne@69: * first, rest = elts[0], ','.join(elts[1:]) # <<<<<<<<<<<<<< jpayne@69: * if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')): jpayne@69: * if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS) jpayne@69: */ jpayne@69: __pyx_slice__18 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 377, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_slice__18); jpayne@69: __Pyx_GIVEREF(__pyx_slice__18); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":391 jpayne@69: * elts = first.split('=') + [rest] jpayne@69: * data['descr'] = elts[1] jpayne@69: * rest = '"'.join(elts[2:]) # <<<<<<<<<<<<<< jpayne@69: * if rest.startswith(','): rest = rest[1:] jpayne@69: * else: jpayne@69: */ jpayne@69: __pyx_slice__20 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 391, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_slice__20); jpayne@69: __Pyx_GIVEREF(__pyx_slice__20); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":512 jpayne@69: * # snip off trailing missing data jpayne@69: * while len(output) > 1: jpayne@69: * last = output[-1].replace(',','').replace('.','') # <<<<<<<<<<<<<< jpayne@69: * if len(last)>0: break jpayne@69: * output = output[:-1] jpayne@69: */ jpayne@69: __pyx_tuple__21 = PyTuple_Pack(2, __pyx_kp_u__2, __pyx_kp_u_); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 512, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__21); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__21); jpayne@69: __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_u__5, __pyx_kp_u_); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 512, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__22); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__22); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":602 jpayne@69: * self.error(line,self.BADLY_FORMATTED_HEADING,err) jpayne@69: * jpayne@69: * self._samples = headings[9:] # <<<<<<<<<<<<<< jpayne@69: * self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] ) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_slice__26 = PySlice_New(__pyx_int_9, Py_None, Py_None); if (unlikely(!__pyx_slice__26)) __PYX_ERR(0, 602, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_slice__26); jpayne@69: __Pyx_GIVEREF(__pyx_slice__26); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":835 jpayne@69: * if not movable: jpayne@69: * break jpayne@69: * ref = ref[:-1] # <<<<<<<<<<<<<< jpayne@69: * alt = [allele[:-1] for allele in alt] jpayne@69: * if min([len(allele) for allele in alt]) == 0 or len(ref) == 0: jpayne@69: */ jpayne@69: __pyx_slice__28 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__28)) __PYX_ERR(0, 835, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_slice__28); jpayne@69: __Pyx_GIVEREF(__pyx_slice__28); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":988 jpayne@69: * jpayne@69: * def setversion(self, version): jpayne@69: * if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files") # <<<<<<<<<<<<<< jpayne@69: * self._version = version jpayne@69: * jpayne@69: */ jpayne@69: __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_Can_only_handle_v3_3_and_v4_0_VC); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 988, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__30); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__30); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1081 jpayne@69: * ''' jpayne@69: * jpayne@69: * raise NotImplementedError("needs to be checked") # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * chrom, pos = record.chrom, record.pos jpayne@69: */ jpayne@69: __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_needs_to_be_checked); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 1081, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__31); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__31); jpayne@69: jpayne@69: /* "(tree fragment)":4 jpayne@69: * cdef object __pyx_PickleError jpayne@69: * cdef object __pyx_result jpayne@69: * if __pyx_checksum not in (0xe48d6d5, 0xcc3d7cd, 0x1c28f48): # <<<<<<<<<<<<<< jpayne@69: * from pickle import PickleError as __pyx_PickleError jpayne@69: * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe48d6d5, 0xcc3d7cd, 0x1c28f48) = (encoding, vcffile))" % __pyx_checksum jpayne@69: */ jpayne@69: __pyx_tuple__32 = PyTuple_Pack(3, __pyx_int_239654613, __pyx_int_214161357, __pyx_int_29527880); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 4, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__32); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__32); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":64 jpayne@69: * import pysam jpayne@69: * jpayne@69: * gtsRegEx = re.compile("[|/\\\\]") # <<<<<<<<<<<<<< jpayne@69: * alleleRegEx = re.compile('^[ACGTN]+$') jpayne@69: * jpayne@69: */ jpayne@69: __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u__34); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 64, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__35); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__35); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":65 jpayne@69: * jpayne@69: * gtsRegEx = re.compile("[|/\\\\]") jpayne@69: * alleleRegEx = re.compile('^[ACGTN]+$') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # Utility function. Uses 0-based coordinates jpayne@69: */ jpayne@69: __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_ACGTN_2); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 65, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__36); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__36); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":68 jpayne@69: * jpayne@69: * # Utility function. Uses 0-based coordinates jpayne@69: * def get_sequence(chrom, start, end, fa): # <<<<<<<<<<<<<< jpayne@69: * # obtain sequence from .fa file, without truncation jpayne@69: * if end<=start: return "" jpayne@69: */ jpayne@69: __pyx_tuple__37 = PyTuple_Pack(5, __pyx_n_s_chrom, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_fa, __pyx_n_s_sequence); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 68, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__37); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__37); jpayne@69: __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_get_sequence, 68, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 68, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":78 jpayne@69: * jpayne@69: * # Utility function. Parses a region string jpayne@69: * def parse_regions( string ): # <<<<<<<<<<<<<< jpayne@69: * result = [] jpayne@69: * for r in string.split(','): jpayne@69: */ jpayne@69: __pyx_tuple__39 = PyTuple_Pack(8, __pyx_n_s_string, __pyx_n_s_result, __pyx_n_s_r, __pyx_n_s_elts, __pyx_n_s_chrom, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_ielts); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 78, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__39); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__39); jpayne@69: __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse_regions, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 78, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":96 jpayne@69: * jpayne@69: * jpayne@69: * FORMAT = namedtuple('FORMAT','id numbertype number type description missingvalue') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * ########################################################################################################### jpayne@69: */ jpayne@69: __pyx_tuple__41 = PyTuple_Pack(2, __pyx_n_u_FORMAT, __pyx_kp_u_id_numbertype_number_type_descri); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 96, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__41); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__41); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":134 jpayne@69: * self.encoding = vcf.encoding jpayne@69: * jpayne@69: * def error(self, line, error, opt=None): # <<<<<<<<<<<<<< jpayne@69: * '''raise error.''' jpayne@69: * # pass to vcf file for error handling jpayne@69: */ jpayne@69: __pyx_tuple__42 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_error, __pyx_n_s_opt); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 134, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__42); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__42); jpayne@69: __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_error, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 134, __pyx_L1_error) jpayne@69: __pyx_tuple__44 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 134, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__44); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__44); jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __reduce_cython__(self): # <<<<<<<<<<<<<< jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): jpayne@69: */ jpayne@69: __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__45); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__45); jpayne@69: __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: jpayne@69: /* "(tree fragment)":3 jpayne@69: * def __reduce_cython__(self): jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: */ jpayne@69: __pyx_tuple__47 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 3, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__47); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__47); jpayne@69: __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 3, __pyx_L1_error) jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __reduce_cython__(self): # <<<<<<<<<<<<<< jpayne@69: * cdef tuple state jpayne@69: * cdef object _dict jpayne@69: */ jpayne@69: __pyx_tuple__49 = 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__49)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__49); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__49); jpayne@69: __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: jpayne@69: /* "(tree fragment)":16 jpayne@69: * else: jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, state) jpayne@69: * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * __pyx_unpickle_asVCFRecord__set_state(self, __pyx_state) jpayne@69: */ jpayne@69: __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(1, 16, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":253 jpayne@69: * return r jpayne@69: * jpayne@69: * class VCF(object): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # types jpayne@69: */ jpayne@69: __pyx_tuple__52 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__52); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__52); jpayne@69: __pyx_tuple__53 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__53); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__53); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":330 jpayne@69: * _lines = None jpayne@69: * jpayne@69: * def __init__(self, _copy=None, reference=None, regions=None, # <<<<<<<<<<<<<< jpayne@69: * lines=None, leftalign=False): jpayne@69: * # make error identifiers accessible by name jpayne@69: */ jpayne@69: __pyx_tuple__54 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_copy, __pyx_n_s_reference, __pyx_n_s_regions, __pyx_n_s_lines, __pyx_n_s_leftalign, __pyx_n_s_id_2); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 330, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__54); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__54); jpayne@69: __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_init, 330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 330, __pyx_L1_error) jpayne@69: __pyx_tuple__56 = PyTuple_Pack(5, Py_None, Py_None, Py_None, Py_None, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 330, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__56); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__56); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":355 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def error(self,line,error,opt=None): # <<<<<<<<<<<<<< jpayne@69: * if error in self._ignored_errors: return jpayne@69: * errorlabel, errorstring = self._errors[error].split(':') jpayne@69: */ jpayne@69: __pyx_tuple__57 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_error, __pyx_n_s_opt, __pyx_n_s_errorlabel, __pyx_n_s_errorstring, __pyx_n_s_errwarn); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 355, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__57); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__57); jpayne@69: __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_error, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 355, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":364 jpayne@69: * raise ValueError(errorstring) jpayne@69: * jpayne@69: * def parse_format(self,line,format,filter=False): # <<<<<<<<<<<<<< jpayne@69: * if self._version == 40: jpayne@69: * if not format.startswith('<'): jpayne@69: */ jpayne@69: __pyx_tuple__59 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_format, __pyx_n_s_filter_2, __pyx_n_s_data, __pyx_n_s_idx, __pyx_n_s_elts, __pyx_n_s_first, __pyx_n_s_rest, __pyx_n_s_n, __pyx_n_s_t); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 364, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__59); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__59); jpayne@69: __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse_format, 364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 364, __pyx_L1_error) jpayne@69: __pyx_tuple__61 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 364, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__61); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__61); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":436 jpayne@69: * return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing']) jpayne@69: * jpayne@69: * def format_format( self, fmt, filter=False ): # <<<<<<<<<<<<<< jpayne@69: * values = [('ID',fmt.id)] jpayne@69: * if fmt.number != None and not filter: jpayne@69: */ jpayne@69: __pyx_tuple__62 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_fmt, __pyx_n_s_filter_2, __pyx_n_s_values, __pyx_n_s_nmb, __pyx_n_s_format, __pyx_n_s_k, __pyx_n_s_v, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 436, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__62); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__62); jpayne@69: __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_format_format, 436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 436, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":456 jpayne@69: * return format jpayne@69: * jpayne@69: * def get_expected(self, format, formatdict, alt): # <<<<<<<<<<<<<< jpayne@69: * fmt = formatdict[format] jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: return -1 jpayne@69: */ jpayne@69: __pyx_tuple__64 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_format, __pyx_n_s_formatdict, __pyx_n_s_alt, __pyx_n_s_fmt); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 456, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__64); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__64); jpayne@69: __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_get_expected, 456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 456, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":467 jpayne@69: * jpayne@69: * jpayne@69: * def _add_definition(self, formatdict, key, data, line ): # <<<<<<<<<<<<<< jpayne@69: * if key in formatdict: return jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) jpayne@69: */ jpayne@69: __pyx_tuple__66 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_formatdict, __pyx_n_s_key, __pyx_n_s_data, __pyx_n_s_line); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 467, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__66); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__66); jpayne@69: __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_add_definition, 467, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 467, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":484 jpayne@69: * jpayne@69: * # todo: trim trailing missing values jpayne@69: * def format_formatdata( self, data, format, key=True, value=True, separator=":" ): # <<<<<<<<<<<<<< jpayne@69: * output, sdata = [], [] jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values jpayne@69: */ jpayne@69: __pyx_tuple__68 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_format, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_separator, __pyx_n_s_output_2, __pyx_n_s_sdata, __pyx_n_s_d, __pyx_n_s_k, __pyx_n_s_idx, __pyx_n_s_v, __pyx_n_s_last); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 484, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__68); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__68); jpayne@69: __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_format_formatdata, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 484, __pyx_L1_error) jpayne@69: __pyx_tuple__70 = PyTuple_Pack(3, ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject*)__pyx_kp_u__3)); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 484, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__70); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__70); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":518 jpayne@69: * jpayne@69: * jpayne@69: * def enter_default_format(self): # <<<<<<<<<<<<<< jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: */ jpayne@69: __pyx_tuple__71 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_f); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 518, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__71); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__71); jpayne@69: __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_enter_default_format, 518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 518, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":537 jpayne@69: * self._format[f.id] = f jpayne@69: * jpayne@69: * def parse_header(self, line): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * assert line.startswith('##') jpayne@69: */ jpayne@69: __pyx_tuple__73 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_elts, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_f); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 537, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__73); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__73); jpayne@69: __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse_header, 537, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 537, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":570 jpayne@69: * jpayne@69: * jpayne@69: * def write_header( self, stream ): # <<<<<<<<<<<<<< jpayne@69: * stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10)) jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) jpayne@69: */ jpayne@69: __pyx_tuple__75 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_var, __pyx_n_s_label, __pyx_n_s_f); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 570, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__75); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__75); jpayne@69: __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_write_header, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 570, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":577 jpayne@69: * jpayne@69: * jpayne@69: * def parse_heading( self, line ): # <<<<<<<<<<<<<< jpayne@69: * assert line.startswith('#') jpayne@69: * assert not line.startswith('##') jpayne@69: */ jpayne@69: __pyx_tuple__77 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_headings, __pyx_n_s_i, __pyx_n_s_s, __pyx_n_s_err, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 577, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__77); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__77); jpayne@69: __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse_heading, 577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 577, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":605 jpayne@69: * self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] ) jpayne@69: * jpayne@69: * def write_heading( self, stream ): # <<<<<<<<<<<<<< jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") jpayne@69: * jpayne@69: */ jpayne@69: __pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_stream); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 605, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__79); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__79); jpayne@69: __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_write_heading, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 605, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":608 jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") jpayne@69: * jpayne@69: * def convertGT(self, GTstring): # <<<<<<<<<<<<<< jpayne@69: * if GTstring == ".": return ["."] jpayne@69: * try: jpayne@69: */ jpayne@69: __pyx_tuple__81 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_GTstring, __pyx_n_s_gts); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 608, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__81); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__81); jpayne@69: __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_convertGT, 608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 608, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":620 jpayne@69: * return [".","|","."] jpayne@69: * jpayne@69: * def convertGTback(self, GTdata): # <<<<<<<<<<<<<< jpayne@69: * return ''.join(map(str,GTdata)) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_GTdata); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 620, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__83); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__83); jpayne@69: __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_convertGTback, 620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 620, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":623 jpayne@69: * return ''.join(map(str,GTdata)) jpayne@69: * jpayne@69: * def parse_formatdata( self, key, value, formatdict, line ): # <<<<<<<<<<<<<< jpayne@69: * # To do: check that the right number of values is present jpayne@69: * f = formatdict.get(key,None) jpayne@69: */ jpayne@69: __pyx_tuple__85 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_formatdict, __pyx_n_s_line, __pyx_n_s_f, __pyx_n_s_values, __pyx_n_s_idx, __pyx_n_s_v); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 623, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__85); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__85); jpayne@69: __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse_formatdata, 623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 623, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":665 jpayne@69: * self.error(line,self.ERROR_INFO_STRING) jpayne@69: * jpayne@69: * def inregion(self, chrom, pos): # <<<<<<<<<<<<<< jpayne@69: * if not self._regions: return True jpayne@69: * for r in self._regions: jpayne@69: */ jpayne@69: __pyx_tuple__87 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_chrom, __pyx_n_s_pos, __pyx_n_s_r); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 665, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__87); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__87); jpayne@69: __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_inregion, 665, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 665, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":671 jpayne@69: * return False jpayne@69: * jpayne@69: * def parse_data( self, line, lineparse=False ): # <<<<<<<<<<<<<< jpayne@69: * cols = line.split('\t') jpayne@69: * if len(cols) != len(self._samples)+9: jpayne@69: */ jpayne@69: __pyx_tuple__89 = PyTuple_Pack(48, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_lineparse, __pyx_n_s_cols, __pyx_n_s_chrom, __pyx_n_s_pos, __pyx_n_s_id_2, __pyx_n_s_ref, __pyx_n_s_c, __pyx_n_s_left, __pyx_n_s_faref_leftflank, __pyx_n_s_faref, __pyx_n_s_alt, __pyx_n_s_qual, __pyx_n_s_filter_2, __pyx_n_s_info_2, __pyx_n_s_blurp, __pyx_n_s_elts, __pyx_n_s_v, __pyx_n_s_format, __pyx_n_s_f, __pyx_n_s_newalts, __pyx_n_s_have_deletions, __pyx_n_s_a, __pyx_n_s_l, __pyx_n_s_addns, __pyx_n_s_i, __pyx_n_s_na, __pyx_n_s_s, __pyx_n_s_addn, __pyx_n_s_allele, __pyx_n_s_movable, __pyx_n_s_longest, __pyx_n_s_shortest, __pyx_n_s_samples_3, __pyx_n_s_sample, __pyx_n_s_dict_3, __pyx_n_s_values, __pyx_n_s_idx, __pyx_n_s_expected_4, __pyx_n_s_value, __pyx_n_s_d, __pyx_n_s_key, __pyx_n_s_allele, __pyx_n_s_allele, __pyx_n_s_allele, __pyx_n_s_allele, __pyx_n_s_allele); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 671, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__89); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__89); jpayne@69: __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 48, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse_data, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 671, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":883 jpayne@69: * jpayne@69: * jpayne@69: * def write_data(self, stream, data): # <<<<<<<<<<<<<< jpayne@69: * required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples jpayne@69: * for k in required: jpayne@69: */ jpayne@69: __pyx_tuple__91 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_data, __pyx_n_s_required_2, __pyx_n_s_k, __pyx_n_s_alt, __pyx_n_s_filter_2, __pyx_n_s_qual, __pyx_n_s_output_2, __pyx_n_s_s); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 883, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__91); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__91); jpayne@69: __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_write_data, 883, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 883, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":915 jpayne@69: * stream.write( "\t".join(output) + "\n" ) jpayne@69: * jpayne@69: * def _parse_header(self, stream): # <<<<<<<<<<<<<< jpayne@69: * self._lineno = 0 jpayne@69: * for line in stream: jpayne@69: */ jpayne@69: __pyx_tuple__93 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_line); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 915, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__93); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__93); jpayne@69: __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse_header_2, 915, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 915, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":929 jpayne@69: * return line jpayne@69: * jpayne@69: * def _parse(self, line, stream): # <<<<<<<<<<<<<< jpayne@69: * # deal with files with header only jpayne@69: * if line.startswith("##"): return jpayne@69: */ jpayne@69: __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_line, __pyx_n_s_stream, __pyx_n_s_d); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__95); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__95); jpayne@69: __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse, 929, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":947 jpayne@69: * ###################################################################################################### jpayne@69: * jpayne@69: * def getsamples(self): # <<<<<<<<<<<<<< jpayne@69: * """ List of samples in VCF file """ jpayne@69: * return self._samples jpayne@69: */ jpayne@69: __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__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_getsamples, 947, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 947, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":951 jpayne@69: * return self._samples jpayne@69: * jpayne@69: * def setsamples(self,samples): # <<<<<<<<<<<<<< jpayne@69: * """ List of samples in VCF file """ jpayne@69: * self._samples = samples jpayne@69: */ jpayne@69: __pyx_tuple__97 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_samples_3); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 951, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__97); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__97); jpayne@69: __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_setsamples, 951, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 951, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":955 jpayne@69: * self._samples = samples jpayne@69: * jpayne@69: * def getheader(self): # <<<<<<<<<<<<<< jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * return self._header jpayne@69: */ jpayne@69: __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_getheader, 955, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 955, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":959 jpayne@69: * return self._header jpayne@69: * jpayne@69: * def setheader(self,header): # <<<<<<<<<<<<<< jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * self._header = header jpayne@69: */ jpayne@69: __pyx_tuple__100 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_header_2); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 959, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__100); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__100); jpayne@69: __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_setheader, 959, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 959, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":963 jpayne@69: * self._header = header jpayne@69: * jpayne@69: * def getinfo(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * return self._info jpayne@69: */ jpayne@69: __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_getinfo, 963, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 963, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":967 jpayne@69: * return self._info jpayne@69: * jpayne@69: * def setinfo(self,info): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * self._info = info jpayne@69: */ jpayne@69: __pyx_tuple__103 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_info_2); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 967, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__103); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__103); jpayne@69: __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_setinfo, 967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 967, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":971 jpayne@69: * self._info = info jpayne@69: * jpayne@69: * def getformat(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * return self._format jpayne@69: */ jpayne@69: __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_getformat, 971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 971, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":975 jpayne@69: * return self._format jpayne@69: * jpayne@69: * def setformat(self,format): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * self._format = format jpayne@69: */ jpayne@69: __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_format); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 975, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__106); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__106); jpayne@69: __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__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_setformat, 975, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 975, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":979 jpayne@69: * self._format = format jpayne@69: * jpayne@69: * def getfilter(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * return self._filter jpayne@69: */ jpayne@69: __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_getfilter, 979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 979, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":983 jpayne@69: * return self._filter jpayne@69: * jpayne@69: * def setfilter(self,filter): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * self._filter = filter jpayne@69: */ jpayne@69: __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_filter_2); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 983, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__109); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__109); jpayne@69: __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__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_setfilter, 983, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 983, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":987 jpayne@69: * self._filter = filter jpayne@69: * jpayne@69: * def setversion(self, version): # <<<<<<<<<<<<<< jpayne@69: * if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files") jpayne@69: * self._version = version jpayne@69: */ jpayne@69: __pyx_tuple__111 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_version_2); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 987, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__111); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__111); jpayne@69: __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_setversion, 987, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 987, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":991 jpayne@69: * self._version = version jpayne@69: * jpayne@69: * def setregions(self, regions): # <<<<<<<<<<<<<< jpayne@69: * self._regions = regions jpayne@69: * jpayne@69: */ jpayne@69: __pyx_tuple__113 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_regions); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 991, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__113); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__113); jpayne@69: __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_setregions, 991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 991, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":994 jpayne@69: * self._regions = regions jpayne@69: * jpayne@69: * def setreference(self, ref): # <<<<<<<<<<<<<< jpayne@69: * """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """ jpayne@69: * self._reference = ref jpayne@69: */ jpayne@69: __pyx_tuple__115 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ref); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 994, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__115); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__115); jpayne@69: __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_setreference, 994, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 994, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":998 jpayne@69: * self._reference = ref jpayne@69: * jpayne@69: * def ignoreerror(self, errorstring): # <<<<<<<<<<<<<< jpayne@69: * try: self._ignored_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: */ jpayne@69: __pyx_tuple__117 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_errorstring); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 998, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__117); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__117); jpayne@69: __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_ignoreerror, 998, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 998, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1002 jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: * def warnerror(self, errorstring): # <<<<<<<<<<<<<< jpayne@69: * try: self._warn_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: */ jpayne@69: __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_warnerror, 1002, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1002, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1006 jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: * def parse(self, stream): # <<<<<<<<<<<<<< jpayne@69: * """ Parse a stream of VCF-formatted lines. Initializes class instance and return generator """ jpayne@69: * last_line = self._parse_header(stream) jpayne@69: */ jpayne@69: __pyx_tuple__120 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_last_line); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 1006, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__120); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__120); jpayne@69: __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_parse_2, 1006, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1006, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1013 jpayne@69: * return self._parse(last_line, stream) jpayne@69: * jpayne@69: * def write(self, stream, datagenerator): # <<<<<<<<<<<<<< jpayne@69: * """ Writes a VCF file to a stream, using a data generator (or list) """ jpayne@69: * self.write_header(stream) jpayne@69: */ jpayne@69: __pyx_tuple__122 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_datagenerator, __pyx_n_s_data); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 1013, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__122); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__122); jpayne@69: __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_write, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1013, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1019 jpayne@69: * for data in datagenerator: self.write_data(stream,data) jpayne@69: * jpayne@69: * def writeheader(self, stream): # <<<<<<<<<<<<<< jpayne@69: * """ Writes a VCF header """ jpayne@69: * self.write_header(stream) jpayne@69: */ jpayne@69: __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_writeheader, 1019, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1019, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1024 jpayne@69: * self.write_heading(stream) jpayne@69: * jpayne@69: * def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2): # <<<<<<<<<<<<<< jpayne@69: * """ Utility function: compares two calls for equality """ jpayne@69: * # a variant should always be assigned to a unique position, one base before jpayne@69: */ jpayne@69: __pyx_tuple__125 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_pos1, __pyx_n_s_ref1, __pyx_n_s_alt1, __pyx_n_s_pos2, __pyx_n_s_ref2, __pyx_n_s_alt2); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 1024, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__125); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__125); jpayne@69: __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_compare_calls, 1024, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 1024, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1046 jpayne@69: * ########################################################################################################### jpayne@69: * jpayne@69: * def connect(self, filename, encoding="ascii"): # <<<<<<<<<<<<<< jpayne@69: * '''connect to tabix file.''' jpayne@69: * self.encoding=encoding jpayne@69: */ jpayne@69: __pyx_tuple__127 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_encoding); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 1046, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__127); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__127); jpayne@69: __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_connect, 1046, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1046, __pyx_L1_error) jpayne@69: __pyx_tuple__129 = PyTuple_Pack(1, ((PyObject*)__pyx_n_u_ascii)); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1046, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__129); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__129); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1052 jpayne@69: * self._parse_header(self.tabixfile.header) jpayne@69: * jpayne@69: * def __del__(self): # <<<<<<<<<<<<<< jpayne@69: * self.close() jpayne@69: * self.tabixfile = None jpayne@69: */ jpayne@69: __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__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_del, 1052, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1052, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1056 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def close(self): # <<<<<<<<<<<<<< jpayne@69: * if self.tabixfile: jpayne@69: * self.tabixfile.close() jpayne@69: */ jpayne@69: __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__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_close, 1056, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 1056, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1061 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def fetch(self, # <<<<<<<<<<<<<< jpayne@69: * reference=None, jpayne@69: * start=None, jpayne@69: */ jpayne@69: __pyx_tuple__132 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_reference, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_region); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 1061, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__132); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__132); jpayne@69: __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_fetch, 1061, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 1061, __pyx_L1_error) jpayne@69: __pyx_tuple__134 = PyTuple_Pack(4, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 1061, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__134); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__134); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1075 jpayne@69: * parser = asVCFRecord(self)) jpayne@69: * jpayne@69: * def validate(self, record): # <<<<<<<<<<<<<< jpayne@69: * '''validate vcf record. jpayne@69: * jpayne@69: */ jpayne@69: __pyx_tuple__135 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_record); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 1075, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__135); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__135); jpayne@69: __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcvcf_pyx, __pyx_n_s_validate, 1075, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 1075, __pyx_L1_error) jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __pyx_unpickle_asVCFRecord(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * cdef object __pyx_PickleError jpayne@69: * cdef object __pyx_result jpayne@69: */ jpayne@69: __pyx_tuple__137 = 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__137)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_tuple__137); jpayne@69: __Pyx_GIVEREF(__pyx_tuple__137); jpayne@69: __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_asVCFRecord, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return 0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return -1; jpayne@69: } jpayne@69: /* #### Code section: init_constants ### */ jpayne@69: jpayne@69: static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { jpayne@69: if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); jpayne@69: __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_23 = PyInt_FromLong(23); if (unlikely(!__pyx_int_23)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_29 = PyInt_FromLong(29); if (unlikely(!__pyx_int_29)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_29527880 = PyInt_FromLong(29527880L); if (unlikely(!__pyx_int_29527880)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_214161357 = PyInt_FromLong(214161357L); if (unlikely(!__pyx_int_214161357)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_239654613 = PyInt_FromLong(239654613L); if (unlikely(!__pyx_int_239654613)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_3000000000 = PyInt_FromString((char *)"3000000000", 0, 0); if (unlikely(!__pyx_int_3000000000)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: return 0; jpayne@69: __pyx_L1_error:; jpayne@69: return -1; jpayne@69: } jpayne@69: /* #### Code section: init_globals ### */ jpayne@69: jpayne@69: static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { jpayne@69: /* AssertionsEnabled.init */ jpayne@69: if (likely(__Pyx_init_assertions_enabled() == 0)); else jpayne@69: jpayne@69: if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: jpayne@69: return 0; jpayne@69: __pyx_L1_error:; jpayne@69: return -1; jpayne@69: } jpayne@69: /* #### Code section: init_module ### */ jpayne@69: jpayne@69: static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ jpayne@69: static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ jpayne@69: static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ jpayne@69: static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ jpayne@69: static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ jpayne@69: static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ jpayne@69: static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ jpayne@69: jpayne@69: static int __Pyx_modinit_global_init_code(void) { jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); jpayne@69: /*--- Global init code ---*/ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: static int __Pyx_modinit_variable_export_code(void) { jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); jpayne@69: /*--- Variable export code ---*/ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: static int __Pyx_modinit_function_export_code(void) { jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); jpayne@69: /*--- Function export code ---*/ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: static int __Pyx_modinit_type_init_code(void) { jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); jpayne@69: /*--- Type init code ---*/ jpayne@69: __pyx_t_1 = PyImport_ImportModule("pysam.libctabixproxies"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_ptype_5pysam_16libctabixproxies_TupleProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "TupleProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_TupleProxy) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_7libcvcf_VCFRecord = &__pyx_vtable_5pysam_7libcvcf_VCFRecord; jpayne@69: __pyx_vtable_5pysam_7libcvcf_VCFRecord.__pyx_base = *__pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy; jpayne@69: __pyx_vtable_5pysam_7libcvcf_VCFRecord.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t))__pyx_f_5pysam_7libcvcf_9VCFRecord_update; jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_16libctabixproxies_TupleProxy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_ptype_5pysam_7libcvcf_VCFRecord = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcvcf_VCFRecord_spec, __pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (unlikely(!__pyx_ptype_5pysam_7libcvcf_VCFRecord)) __PYX_ERR(0, 104, __pyx_L1_error) jpayne@69: if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcvcf_VCFRecord_spec, __pyx_ptype_5pysam_7libcvcf_VCFRecord) < 0) __PYX_ERR(0, 104, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_ptype_5pysam_7libcvcf_VCFRecord = &__pyx_type_5pysam_7libcvcf_VCFRecord; jpayne@69: #endif jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: __pyx_ptype_5pysam_7libcvcf_VCFRecord->tp_base = __pyx_ptype_5pysam_16libctabixproxies_TupleProxy; jpayne@69: #endif jpayne@69: #if !CYTHON_USE_TYPE_SPECS jpayne@69: if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcvcf_VCFRecord) < 0) __PYX_ERR(0, 104, __pyx_L1_error) jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: __pyx_ptype_5pysam_7libcvcf_VCFRecord->tp_print = 0; jpayne@69: #endif jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcvcf_VCFRecord->tp_dictoffset && __pyx_ptype_5pysam_7libcvcf_VCFRecord->tp_getattro == PyObject_GenericGetAttr)) { jpayne@69: __pyx_ptype_5pysam_7libcvcf_VCFRecord->tp_getattro = __Pyx_PyObject_GenericGetAttr; jpayne@69: } jpayne@69: #endif jpayne@69: if (__Pyx_SetVtable(__pyx_ptype_5pysam_7libcvcf_VCFRecord, __pyx_vtabptr_5pysam_7libcvcf_VCFRecord) < 0) __PYX_ERR(0, 104, __pyx_L1_error) jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if (__Pyx_MergeVtables(__pyx_ptype_5pysam_7libcvcf_VCFRecord) < 0) __PYX_ERR(0, 104, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VCFRecord, (PyObject *) __pyx_ptype_5pysam_7libcvcf_VCFRecord) < 0) __PYX_ERR(0, 104, __pyx_L1_error) jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcvcf_VCFRecord) < 0) __PYX_ERR(0, 104, __pyx_L1_error) jpayne@69: #endif jpayne@69: __pyx_t_2 = PyImport_ImportModule("pysam.libctabix"); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_ptype_5pysam_9libctabix_Parser = __Pyx_ImportType_3_0_11(__pyx_t_2, "pysam.libctabix", "Parser", sizeof(struct __pyx_obj_5pysam_9libctabix_Parser), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_Parser),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_Parser) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_Parser = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_Parser); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_Parser)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_7libcvcf_asVCFRecord = &__pyx_vtable_5pysam_7libcvcf_asVCFRecord; jpayne@69: __pyx_vtable_5pysam_7libcvcf_asVCFRecord.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser; jpayne@69: __pyx_vtable_5pysam_7libcvcf_asVCFRecord.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int))__pyx_f_5pysam_7libcvcf_11asVCFRecord_parse; jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: __pyx_t_3 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libctabix_Parser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_ptype_5pysam_7libcvcf_asVCFRecord = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcvcf_asVCFRecord_spec, __pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (unlikely(!__pyx_ptype_5pysam_7libcvcf_asVCFRecord)) __PYX_ERR(0, 241, __pyx_L1_error) jpayne@69: if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcvcf_asVCFRecord_spec, __pyx_ptype_5pysam_7libcvcf_asVCFRecord) < 0) __PYX_ERR(0, 241, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_ptype_5pysam_7libcvcf_asVCFRecord = &__pyx_type_5pysam_7libcvcf_asVCFRecord; jpayne@69: #endif jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: __pyx_ptype_5pysam_7libcvcf_asVCFRecord->tp_base = __pyx_ptype_5pysam_9libctabix_Parser; jpayne@69: #endif jpayne@69: #if !CYTHON_USE_TYPE_SPECS jpayne@69: if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcvcf_asVCFRecord) < 0) __PYX_ERR(0, 241, __pyx_L1_error) jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: __pyx_ptype_5pysam_7libcvcf_asVCFRecord->tp_print = 0; jpayne@69: #endif jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcvcf_asVCFRecord->tp_dictoffset && __pyx_ptype_5pysam_7libcvcf_asVCFRecord->tp_getattro == PyObject_GenericGetAttr)) { jpayne@69: __pyx_ptype_5pysam_7libcvcf_asVCFRecord->tp_getattro = __Pyx_PyObject_GenericGetAttr; jpayne@69: } jpayne@69: #endif jpayne@69: if (__Pyx_SetVtable(__pyx_ptype_5pysam_7libcvcf_asVCFRecord, __pyx_vtabptr_5pysam_7libcvcf_asVCFRecord) < 0) __PYX_ERR(0, 241, __pyx_L1_error) jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if (__Pyx_MergeVtables(__pyx_ptype_5pysam_7libcvcf_asVCFRecord) < 0) __PYX_ERR(0, 241, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (PyObject_SetAttr(__pyx_m, __pyx_n_s_asVCFRecord, (PyObject *) __pyx_ptype_5pysam_7libcvcf_asVCFRecord) < 0) __PYX_ERR(0, 241, __pyx_L1_error) jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_7libcvcf_asVCFRecord) < 0) __PYX_ERR(0, 241, __pyx_L1_error) jpayne@69: #endif jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: __pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse)) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse_spec, __pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse) < 0) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: #else jpayne@69: __pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse = &__pyx_type_5pysam_7libcvcf___pyx_scope_struct___parse; jpayne@69: #endif jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #endif jpayne@69: #if !CYTHON_USE_TYPE_SPECS jpayne@69: if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse) < 0) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: __pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse->tp_print = 0; jpayne@69: #endif jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse->tp_dictoffset && __pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse->tp_getattro == PyObject_GenericGetAttr)) { jpayne@69: __pyx_ptype_5pysam_7libcvcf___pyx_scope_struct___parse->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; jpayne@69: } jpayne@69: #endif jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return 0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return -1; jpayne@69: } jpayne@69: jpayne@69: static int __Pyx_modinit_type_import_code(void) { jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); jpayne@69: /*--- Type import code ---*/ jpayne@69: __pyx_t_1 = PyImport_ImportModule("pysam.libchtslib"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 2706, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __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(4, 2706, __pyx_L1_error) jpayne@69: __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(4, 2706, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyImport_ImportModule("pysam.libctabix"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 48, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_ptype_5pysam_9libctabix_tabix_file_iterator = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "tabix_file_iterator", sizeof(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_tabix_file_iterator) __PYX_ERR(5, 48, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator = (struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_tabix_file_iterator); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator)) __PYX_ERR(5, 48, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_TabixFile = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "TabixFile", sizeof(struct __pyx_obj_5pysam_9libctabix_TabixFile), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_TabixFile),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_TabixFile) __PYX_ERR(5, 61, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_TabixFile = (struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_TabixFile); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_TabixFile)) __PYX_ERR(5, 61, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_asTuple = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "asTuple", sizeof(struct __pyx_obj_5pysam_9libctabix_asTuple), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_asTuple),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_asTuple) __PYX_ERR(5, 77, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_asTuple = (struct __pyx_vtabstruct_5pysam_9libctabix_asTuple*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_asTuple); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_asTuple)) __PYX_ERR(5, 77, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_asGTF = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "asGTF", sizeof(struct __pyx_obj_5pysam_9libctabix_asGTF), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_asGTF),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_asGTF) __PYX_ERR(5, 81, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_asGTF = (struct __pyx_vtabstruct_5pysam_9libctabix_asGTF*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_asGTF); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_asGTF)) __PYX_ERR(5, 81, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_asGFF3 = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "asGFF3", sizeof(struct __pyx_obj_5pysam_9libctabix_asGFF3), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_asGFF3),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_asGFF3) __PYX_ERR(5, 85, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_asGFF3 = (struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_asGFF3); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_asGFF3)) __PYX_ERR(5, 85, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_asBed = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "asBed", sizeof(struct __pyx_obj_5pysam_9libctabix_asBed), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_asBed),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_asBed) __PYX_ERR(5, 89, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_asBed = (struct __pyx_vtabstruct_5pysam_9libctabix_asBed*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_asBed); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_asBed)) __PYX_ERR(5, 89, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_asVCF = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "asVCF", sizeof(struct __pyx_obj_5pysam_9libctabix_asVCF), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_asVCF),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_asVCF) __PYX_ERR(5, 93, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_asVCF = (struct __pyx_vtabstruct_5pysam_9libctabix_asVCF*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_asVCF); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_asVCF)) __PYX_ERR(5, 93, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_TabixIterator = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "TabixIterator", sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_TabixIterator),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_TabixIterator) __PYX_ERR(5, 97, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_TabixIterator = (struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_TabixIterator); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_TabixIterator)) __PYX_ERR(5, 97, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "TabixIteratorParsed", sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) __PYX_ERR(5, 105, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed = (struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed)) __PYX_ERR(5, 105, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_GZIterator = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "GZIterator", sizeof(struct __pyx_obj_5pysam_9libctabix_GZIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_GZIterator),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_GZIterator) __PYX_ERR(5, 109, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_GZIterator = (struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_GZIterator); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_GZIterator)) __PYX_ERR(5, 109, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_GZIteratorHead = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "GZIteratorHead", sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_GZIteratorHead) __PYX_ERR(5, 118, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_GZIteratorHead = (struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_GZIteratorHead); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_GZIteratorHead)) __PYX_ERR(5, 118, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_GZIteratorParsed = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "GZIteratorParsed", sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_GZIteratorParsed) __PYX_ERR(5, 122, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed = (struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_GZIteratorParsed); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed)) __PYX_ERR(5, 122, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_9libctabix_Tabixfile = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabix", "Tabixfile", sizeof(struct __pyx_obj_5pysam_9libctabix_Tabixfile), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_9libctabix_Tabixfile),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_9libctabix_Tabixfile) __PYX_ERR(5, 127, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_9libctabix_Tabixfile = (struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile*)__Pyx_GetVtable(__pyx_ptype_5pysam_9libctabix_Tabixfile); if (unlikely(!__pyx_vtabptr_5pysam_9libctabix_Tabixfile)) __PYX_ERR(5, 127, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyImport_ImportModule("pysam.libctabixproxies"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 27, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "TupleProxyIterator", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator) __PYX_ERR(6, 27, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "NamedTupleProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy) __PYX_ERR(6, 32, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy)) __PYX_ERR(6, 32, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_16libctabixproxies_GTFProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "GTFProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_GTFProxy) __PYX_ERR(6, 36, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_GTFProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy)) __PYX_ERR(6, 36, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "GFF3Proxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy) __PYX_ERR(6, 42, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy)) __PYX_ERR(6, 42, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_16libctabixproxies_BedProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "BedProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_BedProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_BedProxy) __PYX_ERR(6, 46, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_16libctabixproxies_BedProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_BedProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_BedProxy)) __PYX_ERR(6, 46, __pyx_L1_error) jpayne@69: __pyx_ptype_5pysam_16libctabixproxies_VCFProxy = __Pyx_ImportType_3_0_11(__pyx_t_1, "pysam.libctabixproxies", "VCFProxy", sizeof(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5pysam_16libctabixproxies_VCFProxy) __PYX_ERR(6, 58, __pyx_L1_error) jpayne@69: __pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy = (struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy*)__Pyx_GetVtable(__pyx_ptype_5pysam_16libctabixproxies_VCFProxy); if (unlikely(!__pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy)) __PYX_ERR(6, 58, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 9, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", jpayne@69: #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 jpayne@69: sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), jpayne@69: #elif CYTHON_COMPILING_IN_LIMITED_API jpayne@69: sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), jpayne@69: #else jpayne@69: sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject), jpayne@69: #endif jpayne@69: __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(7, 9, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 8, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __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(8, 8, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 15, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __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(9, 15, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 69, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: __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(3, 69, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return 0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return -1; jpayne@69: } jpayne@69: jpayne@69: static int __Pyx_modinit_variable_import_code(void) { jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); jpayne@69: /*--- Variable import code ---*/ jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: static int __Pyx_modinit_function_import_code(void) { jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); jpayne@69: /*--- Function import code ---*/ jpayne@69: __pyx_t_1 = PyImport_ImportModule("pysam.libcutils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_1); jpayne@69: 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) jpayne@69: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return 0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_1); jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: return -1; jpayne@69: } jpayne@69: jpayne@69: jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: #if CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ jpayne@69: static int __pyx_pymod_exec_libcvcf(PyObject* module); /*proto*/ jpayne@69: static PyModuleDef_Slot __pyx_moduledef_slots[] = { jpayne@69: {Py_mod_create, (void*)__pyx_pymod_create}, jpayne@69: {Py_mod_exec, (void*)__pyx_pymod_exec_libcvcf}, jpayne@69: {0, NULL} jpayne@69: }; jpayne@69: #endif jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: namespace { jpayne@69: struct PyModuleDef __pyx_moduledef = jpayne@69: #else jpayne@69: static struct PyModuleDef __pyx_moduledef = jpayne@69: #endif jpayne@69: { jpayne@69: PyModuleDef_HEAD_INIT, jpayne@69: "libcvcf", jpayne@69: 0, /* m_doc */ jpayne@69: #if CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: 0, /* m_size */ jpayne@69: #elif CYTHON_USE_MODULE_STATE jpayne@69: sizeof(__pyx_mstate), /* m_size */ jpayne@69: #else jpayne@69: -1, /* m_size */ jpayne@69: #endif jpayne@69: __pyx_methods /* m_methods */, jpayne@69: #if CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: __pyx_moduledef_slots, /* m_slots */ jpayne@69: #else jpayne@69: NULL, /* m_reload */ jpayne@69: #endif jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: __pyx_m_traverse, /* m_traverse */ jpayne@69: __pyx_m_clear, /* m_clear */ jpayne@69: NULL /* m_free */ jpayne@69: #else jpayne@69: NULL, /* m_traverse */ jpayne@69: NULL, /* m_clear */ jpayne@69: NULL /* m_free */ jpayne@69: #endif jpayne@69: }; jpayne@69: #ifdef __cplusplus jpayne@69: } /* anonymous namespace */ jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: #ifndef CYTHON_NO_PYINIT_EXPORT jpayne@69: #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC jpayne@69: #elif PY_MAJOR_VERSION < 3 jpayne@69: #ifdef __cplusplus jpayne@69: #define __Pyx_PyMODINIT_FUNC extern "C" void jpayne@69: #else jpayne@69: #define __Pyx_PyMODINIT_FUNC void jpayne@69: #endif jpayne@69: #else jpayne@69: #ifdef __cplusplus jpayne@69: #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * jpayne@69: #else jpayne@69: #define __Pyx_PyMODINIT_FUNC PyObject * jpayne@69: #endif jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: __Pyx_PyMODINIT_FUNC initlibcvcf(void) CYTHON_SMALL_CODE; /*proto*/ jpayne@69: __Pyx_PyMODINIT_FUNC initlibcvcf(void) jpayne@69: #else jpayne@69: __Pyx_PyMODINIT_FUNC PyInit_libcvcf(void) CYTHON_SMALL_CODE; /*proto*/ jpayne@69: __Pyx_PyMODINIT_FUNC PyInit_libcvcf(void) jpayne@69: #if CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: { jpayne@69: return PyModuleDef_Init(&__pyx_moduledef); jpayne@69: } jpayne@69: static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { jpayne@69: #if PY_VERSION_HEX >= 0x030700A1 jpayne@69: static PY_INT64_T main_interpreter_id = -1; jpayne@69: PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); jpayne@69: if (main_interpreter_id == -1) { jpayne@69: main_interpreter_id = current_id; jpayne@69: return (unlikely(current_id == -1)) ? -1 : 0; jpayne@69: } else if (unlikely(main_interpreter_id != current_id)) jpayne@69: #else jpayne@69: static PyInterpreterState *main_interpreter = NULL; jpayne@69: PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; jpayne@69: if (!main_interpreter) { jpayne@69: main_interpreter = current_interpreter; jpayne@69: } else if (unlikely(main_interpreter != current_interpreter)) jpayne@69: #endif jpayne@69: { jpayne@69: PyErr_SetString( jpayne@69: PyExc_ImportError, jpayne@69: "Interpreter change detected - this module can only be loaded into one interpreter per process."); jpayne@69: return -1; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: 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) jpayne@69: #else jpayne@69: 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) jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *value = PyObject_GetAttrString(spec, from_name); jpayne@69: int result = 0; jpayne@69: if (likely(value)) { jpayne@69: if (allow_none || value != Py_None) { jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: result = PyModule_AddObject(module, to_name, value); jpayne@69: #else jpayne@69: result = PyDict_SetItemString(moddict, to_name, value); jpayne@69: #endif jpayne@69: } jpayne@69: Py_DECREF(value); jpayne@69: } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { jpayne@69: PyErr_Clear(); jpayne@69: } else { jpayne@69: result = -1; jpayne@69: } jpayne@69: return result; jpayne@69: } jpayne@69: static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { jpayne@69: PyObject *module = NULL, *moddict, *modname; jpayne@69: CYTHON_UNUSED_VAR(def); jpayne@69: if (__Pyx_check_single_interpreter()) jpayne@69: return NULL; jpayne@69: if (__pyx_m) jpayne@69: return __Pyx_NewRef(__pyx_m); jpayne@69: modname = PyObject_GetAttrString(spec, "name"); jpayne@69: if (unlikely(!modname)) goto bad; jpayne@69: module = PyModule_NewObject(modname); jpayne@69: Py_DECREF(modname); jpayne@69: if (unlikely(!module)) goto bad; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: moddict = module; jpayne@69: #else jpayne@69: moddict = PyModule_GetDict(module); jpayne@69: if (unlikely(!moddict)) goto bad; jpayne@69: #endif jpayne@69: if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; jpayne@69: if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; jpayne@69: if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; jpayne@69: if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; jpayne@69: return module; jpayne@69: bad: jpayne@69: Py_XDECREF(module); jpayne@69: return NULL; jpayne@69: } jpayne@69: jpayne@69: jpayne@69: static CYTHON_SMALL_CODE int __pyx_pymod_exec_libcvcf(PyObject *__pyx_pyinit_module) jpayne@69: #endif jpayne@69: #endif jpayne@69: { jpayne@69: int stringtab_initialized = 0; jpayne@69: #if CYTHON_USE_MODULE_STATE jpayne@69: int pystate_addmodule_run = 0; jpayne@69: #endif jpayne@69: PyObject *__pyx_t_1 = NULL; jpayne@69: PyObject *__pyx_t_2 = NULL; jpayne@69: PyObject *__pyx_t_3 = NULL; jpayne@69: PyObject *__pyx_t_4 = NULL; jpayne@69: PyObject *__pyx_t_5 = NULL; jpayne@69: int __pyx_lineno = 0; jpayne@69: const char *__pyx_filename = NULL; jpayne@69: int __pyx_clineno = 0; jpayne@69: __Pyx_RefNannyDeclarations jpayne@69: #if CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: if (__pyx_m) { jpayne@69: if (__pyx_m == __pyx_pyinit_module) return 0; jpayne@69: PyErr_SetString(PyExc_RuntimeError, "Module 'libcvcf' has already been imported. Re-initialisation is not supported."); jpayne@69: return -1; jpayne@69: } jpayne@69: #elif PY_MAJOR_VERSION >= 3 jpayne@69: if (__pyx_m) return __Pyx_NewRef(__pyx_m); jpayne@69: #endif jpayne@69: /*--- Module creation code ---*/ jpayne@69: #if CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: __pyx_m = __pyx_pyinit_module; jpayne@69: Py_INCREF(__pyx_m); jpayne@69: #else jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: __pyx_m = Py_InitModule4("libcvcf", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); jpayne@69: if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #elif CYTHON_USE_MODULE_STATE jpayne@69: __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: { jpayne@69: int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); jpayne@69: __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "libcvcf" pseudovariable */ jpayne@69: if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: pystate_addmodule_run = 1; jpayne@69: } jpayne@69: #else jpayne@69: __pyx_m = PyModule_Create(&__pyx_moduledef); jpayne@69: if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: #endif jpayne@69: CYTHON_UNUSED_VAR(__pyx_t_1); jpayne@69: __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: Py_INCREF(__pyx_d); jpayne@69: __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #if CYTHON_REFNANNY jpayne@69: __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); jpayne@69: if (!__Pyx_RefNanny) { jpayne@69: PyErr_Clear(); jpayne@69: __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); jpayne@69: if (!__Pyx_RefNanny) jpayne@69: Py_FatalError("failed to import 'refnanny' module"); jpayne@69: } jpayne@69: #endif jpayne@69: __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_libcvcf(void)", 0); jpayne@69: 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) jpayne@69: #ifdef __Pxy_PyFrame_Initialize_Offsets jpayne@69: __Pxy_PyFrame_Initialize_Offsets(); jpayne@69: #endif jpayne@69: __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #ifdef __Pyx_CyFunction_USED jpayne@69: if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: #ifdef __Pyx_FusedFunction_USED jpayne@69: if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: #ifdef __Pyx_StopAsyncIteration_USED jpayne@69: if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: /*--- Library function declarations ---*/ jpayne@69: /*--- Threads initialization code ---*/ jpayne@69: #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS jpayne@69: PyEval_InitThreads(); jpayne@69: #endif jpayne@69: /*--- Initialize various global constants etc. ---*/ jpayne@69: if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: stringtab_initialized = 1; jpayne@69: if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) jpayne@69: if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: if (__pyx_module_is_main_pysam__libcvcf) { jpayne@69: if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: } jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: { jpayne@69: PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: if (!PyDict_GetItemString(modules, "pysam.libcvcf")) { jpayne@69: if (unlikely((PyDict_SetItemString(modules, "pysam.libcvcf", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: /*--- Builtin init code ---*/ jpayne@69: if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: /*--- Constants init code ---*/ jpayne@69: if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: /*--- Global type/function init code ---*/ jpayne@69: (void)__Pyx_modinit_global_init_code(); jpayne@69: (void)__Pyx_modinit_variable_export_code(); jpayne@69: (void)__Pyx_modinit_function_export_code(); jpayne@69: if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: (void)__Pyx_modinit_variable_import_code(); jpayne@69: if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: /*--- Execution code ---*/ jpayne@69: #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) jpayne@69: if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: #endif jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":49 jpayne@69: * # jpayne@69: * jpayne@69: * from collections import namedtuple, defaultdict # <<<<<<<<<<<<<< jpayne@69: * from operator import itemgetter jpayne@69: * import sys, re, copy, bisect jpayne@69: */ jpayne@69: __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_INCREF(__pyx_n_s_namedtuple); jpayne@69: __Pyx_GIVEREF(__pyx_n_s_namedtuple); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_namedtuple)) __PYX_ERR(0, 49, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_s_defaultdict); jpayne@69: __Pyx_GIVEREF(__pyx_n_s_defaultdict); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_defaultdict)) __PYX_ERR(0, 49, __pyx_L1_error); jpayne@69: __pyx_t_3 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_defaultdict, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":50 jpayne@69: * jpayne@69: * from collections import namedtuple, defaultdict jpayne@69: * from operator import itemgetter # <<<<<<<<<<<<<< jpayne@69: * import sys, re, copy, bisect jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_n_s_itemgetter); jpayne@69: __Pyx_GIVEREF(__pyx_n_s_itemgetter); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_itemgetter)) __PYX_ERR(0, 50, __pyx_L1_error); jpayne@69: __pyx_t_2 = __Pyx_Import(__pyx_n_s_operator, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_itemgetter, __pyx_t_3) < 0) __PYX_ERR(0, 50, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":51 jpayne@69: * from collections import namedtuple, defaultdict jpayne@69: * from operator import itemgetter jpayne@69: * import sys, re, copy, bisect # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * from libc.stdlib cimport atoi jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_re, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_copy_2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy_2, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_bisect, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_bisect, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":62 jpayne@69: * from pysam.libcutils cimport force_str jpayne@69: * jpayne@69: * import pysam # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * gtsRegEx = re.compile("[|/\\\\]") jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_pysam, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_pysam, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":64 jpayne@69: * import pysam jpayne@69: * jpayne@69: * gtsRegEx = re.compile("[|/\\\\]") # <<<<<<<<<<<<<< jpayne@69: * alleleRegEx = re.compile('^[ACGTN]+$') jpayne@69: * jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_gtsRegEx, __pyx_t_2) < 0) __PYX_ERR(0, 64, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":65 jpayne@69: * jpayne@69: * gtsRegEx = re.compile("[|/\\\\]") jpayne@69: * alleleRegEx = re.compile('^[ACGTN]+$') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # Utility function. Uses 0-based coordinates jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_alleleRegEx, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":68 jpayne@69: * jpayne@69: * # Utility function. Uses 0-based coordinates jpayne@69: * def get_sequence(chrom, start, end, fa): # <<<<<<<<<<<<<< jpayne@69: * # obtain sequence from .fa file, without truncation jpayne@69: * if end<=start: return "" jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_1get_sequence, 0, __pyx_n_s_get_sequence, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_sequence, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":78 jpayne@69: * jpayne@69: * # Utility function. Parses a region string jpayne@69: * def parse_regions( string ): # <<<<<<<<<<<<<< jpayne@69: * result = [] jpayne@69: * for r in string.split(','): jpayne@69: */ jpayne@69: __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3parse_regions, 0, __pyx_n_s_parse_regions, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_regions, __pyx_t_2) < 0) __PYX_ERR(0, 78, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":96 jpayne@69: * jpayne@69: * jpayne@69: * FORMAT = namedtuple('FORMAT','id numbertype number type description missingvalue') # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * ########################################################################################################### jpayne@69: */ jpayne@69: __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT, __pyx_t_3) < 0) __PYX_ERR(0, 96, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":134 jpayne@69: * self.encoding = vcf.encoding jpayne@69: * jpayne@69: * def error(self, line, error, opt=None): # <<<<<<<<<<<<<< jpayne@69: * '''raise error.''' jpayne@69: * # pass to vcf file for error handling jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_9VCFRecord_5error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VCFRecord_error, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__44); jpayne@69: if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcvcf_VCFRecord, __pyx_n_s_error, __pyx_t_3) < 0) __PYX_ERR(0, 134, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: PyType_Modified(__pyx_ptype_5pysam_7libcvcf_VCFRecord); jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __reduce_cython__(self): # <<<<<<<<<<<<<< jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_9VCFRecord_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VCFRecord___reduce_cython, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":3 jpayne@69: * def __reduce_cython__(self): jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_9VCFRecord_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VCFRecord___setstate_cython, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __reduce_cython__(self): # <<<<<<<<<<<<<< jpayne@69: * cdef tuple state jpayne@69: * cdef object _dict jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_11asVCFRecord_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asVCFRecord___reduce_cython, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcvcf_asVCFRecord, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: PyType_Modified(__pyx_ptype_5pysam_7libcvcf_asVCFRecord); jpayne@69: jpayne@69: /* "(tree fragment)":16 jpayne@69: * else: jpayne@69: * return __pyx_unpickle_asVCFRecord, (type(self), 0xe48d6d5, state) jpayne@69: * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * __pyx_unpickle_asVCFRecord__set_state(self, __pyx_state) jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_11asVCFRecord_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_asVCFRecord___setstate_cython, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 16, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_7libcvcf_asVCFRecord, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 16, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: PyType_Modified(__pyx_ptype_5pysam_7libcvcf_asVCFRecord); jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":253 jpayne@69: * return r jpayne@69: * jpayne@69: * class VCF(object): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # types jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_tuple__53); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_2); jpayne@69: __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_VCF, __pyx_n_s_VCF, (PyObject *) NULL, __pyx_n_s_pysam_libcvcf, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_4); jpayne@69: if (__pyx_t_3 != __pyx_tuple__53) { jpayne@69: if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_tuple__53) < 0))) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: } jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":256 jpayne@69: * jpayne@69: * # types jpayne@69: * NT_UNKNOWN = 0 # <<<<<<<<<<<<<< jpayne@69: * NT_NUMBER = 1 jpayne@69: * NT_ALLELES = 2 jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_NT_UNKNOWN, __pyx_int_0) < 0) __PYX_ERR(0, 256, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":257 jpayne@69: * # types jpayne@69: * NT_UNKNOWN = 0 jpayne@69: * NT_NUMBER = 1 # <<<<<<<<<<<<<< jpayne@69: * NT_ALLELES = 2 jpayne@69: * NT_NR_ALLELES = 3 jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_NT_NUMBER, __pyx_int_1) < 0) __PYX_ERR(0, 257, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":258 jpayne@69: * NT_UNKNOWN = 0 jpayne@69: * NT_NUMBER = 1 jpayne@69: * NT_ALLELES = 2 # <<<<<<<<<<<<<< jpayne@69: * NT_NR_ALLELES = 3 jpayne@69: * NT_GENOTYPES = 4 jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_NT_ALLELES, __pyx_int_2) < 0) __PYX_ERR(0, 258, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":259 jpayne@69: * NT_NUMBER = 1 jpayne@69: * NT_ALLELES = 2 jpayne@69: * NT_NR_ALLELES = 3 # <<<<<<<<<<<<<< jpayne@69: * NT_GENOTYPES = 4 jpayne@69: * NT_PHASED_GENOTYPES = 5 jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_NT_NR_ALLELES, __pyx_int_3) < 0) __PYX_ERR(0, 259, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":260 jpayne@69: * NT_ALLELES = 2 jpayne@69: * NT_NR_ALLELES = 3 jpayne@69: * NT_GENOTYPES = 4 # <<<<<<<<<<<<<< jpayne@69: * NT_PHASED_GENOTYPES = 5 jpayne@69: * jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_NT_GENOTYPES, __pyx_int_4) < 0) __PYX_ERR(0, 260, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":261 jpayne@69: * NT_NR_ALLELES = 3 jpayne@69: * NT_GENOTYPES = 4 jpayne@69: * NT_PHASED_GENOTYPES = 5 # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * _errors = { 0:"UNKNOWN_FORMAT_STRING:Unknown file format identifier", jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_NT_PHASED_GENOTYPES, __pyx_int_5) < 0) __PYX_ERR(0, 261, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":263 jpayne@69: * NT_PHASED_GENOTYPES = 5 jpayne@69: * jpayne@69: * _errors = { 0:"UNKNOWN_FORMAT_STRING:Unknown file format identifier", # <<<<<<<<<<<<<< jpayne@69: * 1:"BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string", jpayne@69: * 2:"BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s", jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyDict_NewPresized(34); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_0, __pyx_kp_u_UNKNOWN_FORMAT_STRING_Unknown_fi) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_1, __pyx_kp_u_BADLY_FORMATTED_FORMAT_STRING_Fo) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_2, __pyx_kp_u_BADLY_FORMATTED_HEADING_Did_not) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_3, __pyx_kp_u_BAD_NUMBER_OF_COLUMNS_Wrong_numb) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_4, __pyx_kp_u_POS_NOT_NUMERICAL_Position_colum) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_5, __pyx_kp_u_UNKNOWN_CHAR_IN_REF_Unknown_char) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_6, __pyx_kp_u_V33_BAD_REF_Reference_should_be) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_7, __pyx_kp_u_V33_BAD_ALLELE_Cannot_interpret) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_8, __pyx_kp_u_POS_NOT_POSITIVE_Position_field) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_9, __pyx_kp_u_QUAL_NOT_NUMERICAL_Quality_field) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_10, __pyx_kp_u_ERROR_INFO_STRING_Error_while_pa) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_11, __pyx_kp_u_ERROR_UNKNOWN_KEY_Unknown_key_s) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_12, __pyx_kp_u_ERROR_FORMAT_NOT_NUMERICAL_Expec) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_13, __pyx_kp_u_ERROR_FORMAT_NOT_CHAR_Eexpected) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_14, __pyx_kp_u_FILTER_NOT_DEFINED_Identifier_s) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_15, __pyx_kp_u_FORMAT_NOT_DEFINED_Identifier_s) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_16, __pyx_kp_u_BAD_NUMBER_OF_VALUES_Found_too_m) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_17, __pyx_kp_u_BAD_NUMBER_OF_PARAMETERS_Found_u) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_18, __pyx_kp_u_BAD_GENOTYPE_Cannot_parse_genoty) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_19, __pyx_kp_u_V40_BAD_ALLELE_Bad_allele_found) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_20, __pyx_kp_u_MISSING_REF_Reference_allele_mis) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_21, __pyx_kp_u_V33_UNMATCHED_DELETION_Deleted_s) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_22, __pyx_kp_u_V40_MISSING_ANGLE_BRACKETS_Forma) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_23, __pyx_kp_u_FORMAT_MISSING_QUOTES_Descriptio) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_24, __pyx_kp_u_V40_FORMAT_MUST_HAVE_NAMED_FIELD_2) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_25, __pyx_kp_u_HEADING_NOT_SEPARATED_BY_TABS_He) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_26, __pyx_kp_u_WRONG_REF_Wrong_reference_s) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_27, __pyx_kp_u_ERROR_TRAILING_DATA_Numerical_fi) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_28, __pyx_kp_u_BAD_CHR_TAG_Error_calculating_ch) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_29, __pyx_kp_u_ZERO_LENGTH_ALLELE_Found_zero_le) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_30, __pyx_kp_u_MISSING_INDEL_ALLELE_REF_BASE_In) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_31, __pyx_kp_u_ZERO_FOR_NON_FLAG_FIELD_number_s) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_32, __pyx_kp_u_ERROR_FORMAT_NOT_INTEGER_Expecte) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (PyDict_SetItem(__pyx_t_5, __pyx_int_33, __pyx_kp_u_ERROR_FLAG_HAS_VALUE_Flag_fields) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_errors, __pyx_t_5) < 0) __PYX_ERR(0, 263, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":300 jpayne@69: * jpayne@69: * # tag-value pairs; tags are not unique; does not include fileformat, INFO, FILTER or FORMAT fields jpayne@69: * _header = [] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # version number; 33=v3.3; 40=v4.0 jpayne@69: */ jpayne@69: __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 300, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_header, __pyx_t_5) < 0) __PYX_ERR(0, 300, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":303 jpayne@69: * jpayne@69: * # version number; 33=v3.3; 40=v4.0 jpayne@69: * _version = 40 # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # info, filter and format data jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_version, __pyx_int_40) < 0) __PYX_ERR(0, 303, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":306 jpayne@69: * jpayne@69: * # info, filter and format data jpayne@69: * _info = {} # <<<<<<<<<<<<<< jpayne@69: * _filter = {} jpayne@69: * _format = {} jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_info, __pyx_t_5) < 0) __PYX_ERR(0, 306, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":307 jpayne@69: * # info, filter and format data jpayne@69: * _info = {} jpayne@69: * _filter = {} # <<<<<<<<<<<<<< jpayne@69: * _format = {} jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 307, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_filter, __pyx_t_5) < 0) __PYX_ERR(0, 307, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":308 jpayne@69: * _info = {} jpayne@69: * _filter = {} jpayne@69: * _format = {} # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # header; and required columns jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_format_2, __pyx_t_5) < 0) __PYX_ERR(0, 308, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":311 jpayne@69: * jpayne@69: * # header; and required columns jpayne@69: * _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"] # <<<<<<<<<<<<<< jpayne@69: * _samples = [] jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_5 = PyList_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_INCREF(__pyx_n_u_CHROM); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_CHROM); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_u_CHROM)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_POS); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_POS); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_POS)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_ID_2); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_ID_2); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_u_ID_2)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_REF); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_REF); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_n_u_REF)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_ALT); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_ALT); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 4, __pyx_n_u_ALT)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_QUAL); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_QUAL); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 5, __pyx_n_u_QUAL)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_FILTER); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_FILTER); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 6, __pyx_n_u_FILTER)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_INFO); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_INFO); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 7, __pyx_n_u_INFO)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_FORMAT); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_FORMAT); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 8, __pyx_n_u_FORMAT)) __PYX_ERR(0, 311, __pyx_L1_error); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_required, __pyx_t_5) < 0) __PYX_ERR(0, 311, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":312 jpayne@69: * # header; and required columns jpayne@69: * _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"] jpayne@69: * _samples = [] # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # control behaviour jpayne@69: */ jpayne@69: __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_samples, __pyx_t_5) < 0) __PYX_ERR(0, 312, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":315 jpayne@69: * jpayne@69: * # control behaviour jpayne@69: * _ignored_errors = set([11,31]) # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD # <<<<<<<<<<<<<< jpayne@69: * _warn_errors = set([]) jpayne@69: * _leftalign = False jpayne@69: */ jpayne@69: __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (PySet_Add(__pyx_t_5, __pyx_int_11) < 0) __PYX_ERR(0, 315, __pyx_L1_error) jpayne@69: if (PySet_Add(__pyx_t_5, __pyx_int_31) < 0) __PYX_ERR(0, 315, __pyx_L1_error) jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_ignored_errors, __pyx_t_5) < 0) __PYX_ERR(0, 315, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":316 jpayne@69: * # control behaviour jpayne@69: * _ignored_errors = set([11,31]) # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD jpayne@69: * _warn_errors = set([]) # <<<<<<<<<<<<<< jpayne@69: * _leftalign = False jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_warn_errors, __pyx_t_5) < 0) __PYX_ERR(0, 316, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":317 jpayne@69: * _ignored_errors = set([11,31]) # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD jpayne@69: * _warn_errors = set([]) jpayne@69: * _leftalign = False # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # reference sequence jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_leftalign_2, Py_False) < 0) __PYX_ERR(0, 317, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":320 jpayne@69: * jpayne@69: * # reference sequence jpayne@69: * _reference = None # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # regions to include; None includes everything jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_reference_2, Py_None) < 0) __PYX_ERR(0, 320, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":323 jpayne@69: * jpayne@69: * # regions to include; None includes everything jpayne@69: * _regions = None # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # statefull stuff jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_regions_2, Py_None) < 0) __PYX_ERR(0, 323, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":326 jpayne@69: * jpayne@69: * # statefull stuff jpayne@69: * _lineno = -1 # <<<<<<<<<<<<<< jpayne@69: * _line = None jpayne@69: * _lines = None jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_lineno, __pyx_int_neg_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":327 jpayne@69: * # statefull stuff jpayne@69: * _lineno = -1 jpayne@69: * _line = None # <<<<<<<<<<<<<< jpayne@69: * _lines = None jpayne@69: * jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_line_2, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":328 jpayne@69: * _lineno = -1 jpayne@69: * _line = None jpayne@69: * _lines = None # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * def __init__(self, _copy=None, reference=None, regions=None, jpayne@69: */ jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_lines_2, Py_None) < 0) __PYX_ERR(0, 328, __pyx_L1_error) jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":330 jpayne@69: * _lines = None jpayne@69: * jpayne@69: * def __init__(self, _copy=None, reference=None, regions=None, # <<<<<<<<<<<<<< jpayne@69: * lines=None, leftalign=False): jpayne@69: * # make error identifiers accessible by name jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_1__init__, 0, __pyx_n_s_VCF___init, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 330, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__56); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 330, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":355 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def error(self,line,error,opt=None): # <<<<<<<<<<<<<< jpayne@69: * if error in self._ignored_errors: return jpayne@69: * errorlabel, errorstring = self._errors[error].split(':') jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_3error, 0, __pyx_n_s_VCF_error, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 355, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__44); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_error, __pyx_t_5) < 0) __PYX_ERR(0, 355, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":364 jpayne@69: * raise ValueError(errorstring) jpayne@69: * jpayne@69: * def parse_format(self,line,format,filter=False): # <<<<<<<<<<<<<< jpayne@69: * if self._version == 40: jpayne@69: * if not format.startswith('<'): jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_5parse_format, 0, __pyx_n_s_VCF_parse_format, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 364, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__61); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_parse_format, __pyx_t_5) < 0) __PYX_ERR(0, 364, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":436 jpayne@69: * return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing']) jpayne@69: * jpayne@69: * def format_format( self, fmt, filter=False ): # <<<<<<<<<<<<<< jpayne@69: * values = [('ID',fmt.id)] jpayne@69: * if fmt.number != None and not filter: jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_7format_format, 0, __pyx_n_s_VCF_format_format, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 436, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__61); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_format_format, __pyx_t_5) < 0) __PYX_ERR(0, 436, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":456 jpayne@69: * return format jpayne@69: * jpayne@69: * def get_expected(self, format, formatdict, alt): # <<<<<<<<<<<<<< jpayne@69: * fmt = formatdict[format] jpayne@69: * if fmt.numbertype == self.NT_UNKNOWN: return -1 jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_9get_expected, 0, __pyx_n_s_VCF_get_expected, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_get_expected, __pyx_t_5) < 0) __PYX_ERR(0, 456, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":467 jpayne@69: * jpayne@69: * jpayne@69: * def _add_definition(self, formatdict, key, data, line ): # <<<<<<<<<<<<<< jpayne@69: * if key in formatdict: return jpayne@69: * self.error(line,self.ERROR_UNKNOWN_KEY,key) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_11_add_definition, 0, __pyx_n_s_VCF__add_definition, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 467, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_add_definition, __pyx_t_5) < 0) __PYX_ERR(0, 467, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":484 jpayne@69: * jpayne@69: * # todo: trim trailing missing values jpayne@69: * def format_formatdata( self, data, format, key=True, value=True, separator=":" ): # <<<<<<<<<<<<<< jpayne@69: * output, sdata = [], [] jpayne@69: * if type(data) == type([]): # for FORMAT field, make data with dummy values jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_13format_formatdata, 0, __pyx_n_s_VCF_format_formatdata, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 484, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__70); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_format_formatdata, __pyx_t_5) < 0) __PYX_ERR(0, 484, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":518 jpayne@69: * jpayne@69: * jpayne@69: * def enter_default_format(self): # <<<<<<<<<<<<<< jpayne@69: * for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'), jpayne@69: * FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1), jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_15enter_default_format, 0, __pyx_n_s_VCF_enter_default_format, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_enter_default_format, __pyx_t_5) < 0) __PYX_ERR(0, 518, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":537 jpayne@69: * self._format[f.id] = f jpayne@69: * jpayne@69: * def parse_header(self, line): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * assert line.startswith('##') jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_17parse_header, 0, __pyx_n_s_VCF_parse_header, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 537, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_parse_header, __pyx_t_5) < 0) __PYX_ERR(0, 537, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":570 jpayne@69: * jpayne@69: * jpayne@69: * def write_header( self, stream ): # <<<<<<<<<<<<<< jpayne@69: * stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10)) jpayne@69: * for key,value in self._header: stream.write("##%s=%s\n" % (key,value)) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_19write_header, 0, __pyx_n_s_VCF_write_header, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_write_header, __pyx_t_5) < 0) __PYX_ERR(0, 570, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":577 jpayne@69: * jpayne@69: * jpayne@69: * def parse_heading( self, line ): # <<<<<<<<<<<<<< jpayne@69: * assert line.startswith('#') jpayne@69: * assert not line.startswith('##') jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_21parse_heading, 0, __pyx_n_s_VCF_parse_heading, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 577, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_parse_heading, __pyx_t_5) < 0) __PYX_ERR(0, 577, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":605 jpayne@69: * self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] ) jpayne@69: * jpayne@69: * def write_heading( self, stream ): # <<<<<<<<<<<<<< jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_23write_heading, 0, __pyx_n_s_VCF_write_heading, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 605, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_write_heading, __pyx_t_5) < 0) __PYX_ERR(0, 605, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":608 jpayne@69: * stream.write("#" + "\t".join(self._required + self._samples) + "\n") jpayne@69: * jpayne@69: * def convertGT(self, GTstring): # <<<<<<<<<<<<<< jpayne@69: * if GTstring == ".": return ["."] jpayne@69: * try: jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_25convertGT, 0, __pyx_n_s_VCF_convertGT, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_convertGT, __pyx_t_5) < 0) __PYX_ERR(0, 608, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":620 jpayne@69: * return [".","|","."] jpayne@69: * jpayne@69: * def convertGTback(self, GTdata): # <<<<<<<<<<<<<< jpayne@69: * return ''.join(map(str,GTdata)) jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_27convertGTback, 0, __pyx_n_s_VCF_convertGTback, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 620, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_convertGTback, __pyx_t_5) < 0) __PYX_ERR(0, 620, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":623 jpayne@69: * return ''.join(map(str,GTdata)) jpayne@69: * jpayne@69: * def parse_formatdata( self, key, value, formatdict, line ): # <<<<<<<<<<<<<< jpayne@69: * # To do: check that the right number of values is present jpayne@69: * f = formatdict.get(key,None) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_29parse_formatdata, 0, __pyx_n_s_VCF_parse_formatdata, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_parse_formatdata, __pyx_t_5) < 0) __PYX_ERR(0, 623, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":665 jpayne@69: * self.error(line,self.ERROR_INFO_STRING) jpayne@69: * jpayne@69: * def inregion(self, chrom, pos): # <<<<<<<<<<<<<< jpayne@69: * if not self._regions: return True jpayne@69: * for r in self._regions: jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_31inregion, 0, __pyx_n_s_VCF_inregion, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 665, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_inregion, __pyx_t_5) < 0) __PYX_ERR(0, 665, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":671 jpayne@69: * return False jpayne@69: * jpayne@69: * def parse_data( self, line, lineparse=False ): # <<<<<<<<<<<<<< jpayne@69: * cols = line.split('\t') jpayne@69: * if len(cols) != len(self._samples)+9: jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_33parse_data, 0, __pyx_n_s_VCF_parse_data, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 671, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__61); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_parse_data, __pyx_t_5) < 0) __PYX_ERR(0, 671, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":883 jpayne@69: * jpayne@69: * jpayne@69: * def write_data(self, stream, data): # <<<<<<<<<<<<<< jpayne@69: * required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples jpayne@69: * for k in required: jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_35write_data, 0, __pyx_n_s_VCF_write_data, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 883, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_write_data, __pyx_t_5) < 0) __PYX_ERR(0, 883, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":915 jpayne@69: * stream.write( "\t".join(output) + "\n" ) jpayne@69: * jpayne@69: * def _parse_header(self, stream): # <<<<<<<<<<<<<< jpayne@69: * self._lineno = 0 jpayne@69: * for line in stream: jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_37_parse_header, 0, __pyx_n_s_VCF__parse_header, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_parse_header_2, __pyx_t_5) < 0) __PYX_ERR(0, 915, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":929 jpayne@69: * return line jpayne@69: * jpayne@69: * def _parse(self, line, stream): # <<<<<<<<<<<<<< jpayne@69: * # deal with files with header only jpayne@69: * if line.startswith("##"): return jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_39_parse, 0, __pyx_n_s_VCF__parse, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_parse, __pyx_t_5) < 0) __PYX_ERR(0, 929, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":947 jpayne@69: * ###################################################################################################### jpayne@69: * jpayne@69: * def getsamples(self): # <<<<<<<<<<<<<< jpayne@69: * """ List of samples in VCF file """ jpayne@69: * return self._samples jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_42getsamples, 0, __pyx_n_s_VCF_getsamples, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 947, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getsamples, __pyx_t_5) < 0) __PYX_ERR(0, 947, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":951 jpayne@69: * return self._samples jpayne@69: * jpayne@69: * def setsamples(self,samples): # <<<<<<<<<<<<<< jpayne@69: * """ List of samples in VCF file """ jpayne@69: * self._samples = samples jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_44setsamples, 0, __pyx_n_s_VCF_setsamples, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setsamples, __pyx_t_5) < 0) __PYX_ERR(0, 951, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":955 jpayne@69: * self._samples = samples jpayne@69: * jpayne@69: * def getheader(self): # <<<<<<<<<<<<<< jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * return self._header jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_46getheader, 0, __pyx_n_s_VCF_getheader, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getheader, __pyx_t_5) < 0) __PYX_ERR(0, 955, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":959 jpayne@69: * return self._header jpayne@69: * jpayne@69: * def setheader(self,header): # <<<<<<<<<<<<<< jpayne@69: * """ List of header key-value pairs (strings) """ jpayne@69: * self._header = header jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_48setheader, 0, __pyx_n_s_VCF_setheader, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setheader, __pyx_t_5) < 0) __PYX_ERR(0, 959, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":963 jpayne@69: * self._header = header jpayne@69: * jpayne@69: * def getinfo(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * return self._info jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_50getinfo, 0, __pyx_n_s_VCF_getinfo, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getinfo, __pyx_t_5) < 0) __PYX_ERR(0, 963, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":967 jpayne@69: * return self._info jpayne@69: * jpayne@69: * def setinfo(self,info): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##INFO tags, as VCF.FORMAT values """ jpayne@69: * self._info = info jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_52setinfo, 0, __pyx_n_s_VCF_setinfo, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setinfo, __pyx_t_5) < 0) __PYX_ERR(0, 967, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":971 jpayne@69: * self._info = info jpayne@69: * jpayne@69: * def getformat(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * return self._format jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_54getformat, 0, __pyx_n_s_VCF_getformat, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 971, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getformat, __pyx_t_5) < 0) __PYX_ERR(0, 971, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":975 jpayne@69: * return self._format jpayne@69: * jpayne@69: * def setformat(self,format): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """ jpayne@69: * self._format = format jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_56setformat, 0, __pyx_n_s_VCF_setformat, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 975, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setformat, __pyx_t_5) < 0) __PYX_ERR(0, 975, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":979 jpayne@69: * self._format = format jpayne@69: * jpayne@69: * def getfilter(self): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * return self._filter jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_58getfilter, 0, __pyx_n_s_VCF_getfilter, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 979, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getfilter, __pyx_t_5) < 0) __PYX_ERR(0, 979, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":983 jpayne@69: * return self._filter jpayne@69: * jpayne@69: * def setfilter(self,filter): # <<<<<<<<<<<<<< jpayne@69: * """ Dictionary of ##FILTER tags, as VCF.FORMAT values """ jpayne@69: * self._filter = filter jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_60setfilter, 0, __pyx_n_s_VCF_setfilter, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setfilter, __pyx_t_5) < 0) __PYX_ERR(0, 983, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":987 jpayne@69: * self._filter = filter jpayne@69: * jpayne@69: * def setversion(self, version): # <<<<<<<<<<<<<< jpayne@69: * if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files") jpayne@69: * self._version = version jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_62setversion, 0, __pyx_n_s_VCF_setversion, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setversion, __pyx_t_5) < 0) __PYX_ERR(0, 987, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":991 jpayne@69: * self._version = version jpayne@69: * jpayne@69: * def setregions(self, regions): # <<<<<<<<<<<<<< jpayne@69: * self._regions = regions jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_64setregions, 0, __pyx_n_s_VCF_setregions, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 991, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setregions, __pyx_t_5) < 0) __PYX_ERR(0, 991, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":994 jpayne@69: * self._regions = regions jpayne@69: * jpayne@69: * def setreference(self, ref): # <<<<<<<<<<<<<< jpayne@69: * """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """ jpayne@69: * self._reference = ref jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_66setreference, 0, __pyx_n_s_VCF_setreference, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setreference, __pyx_t_5) < 0) __PYX_ERR(0, 994, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":998 jpayne@69: * self._reference = ref jpayne@69: * jpayne@69: * def ignoreerror(self, errorstring): # <<<<<<<<<<<<<< jpayne@69: * try: self._ignored_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_68ignoreerror, 0, __pyx_n_s_VCF_ignoreerror, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 998, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_ignoreerror, __pyx_t_5) < 0) __PYX_ERR(0, 998, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1002 jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: * def warnerror(self, errorstring): # <<<<<<<<<<<<<< jpayne@69: * try: self._warn_errors.add(self.__dict__[errorstring]) jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_70warnerror, 0, __pyx_n_s_VCF_warnerror, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1002, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_warnerror, __pyx_t_5) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1006 jpayne@69: * except KeyError: raise ValueError("Invalid error string: %s" % errorstring) jpayne@69: * jpayne@69: * def parse(self, stream): # <<<<<<<<<<<<<< jpayne@69: * """ Parse a stream of VCF-formatted lines. Initializes class instance and return generator """ jpayne@69: * last_line = self._parse_header(stream) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_72parse, 0, __pyx_n_s_VCF_parse, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1006, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_parse_2, __pyx_t_5) < 0) __PYX_ERR(0, 1006, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1013 jpayne@69: * return self._parse(last_line, stream) jpayne@69: * jpayne@69: * def write(self, stream, datagenerator): # <<<<<<<<<<<<<< jpayne@69: * """ Writes a VCF file to a stream, using a data generator (or list) """ jpayne@69: * self.write_header(stream) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_74write, 0, __pyx_n_s_VCF_write, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1013, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_write, __pyx_t_5) < 0) __PYX_ERR(0, 1013, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1019 jpayne@69: * for data in datagenerator: self.write_data(stream,data) jpayne@69: * jpayne@69: * def writeheader(self, stream): # <<<<<<<<<<<<<< jpayne@69: * """ Writes a VCF header """ jpayne@69: * self.write_header(stream) jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_76writeheader, 0, __pyx_n_s_VCF_writeheader, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1019, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_writeheader, __pyx_t_5) < 0) __PYX_ERR(0, 1019, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1024 jpayne@69: * self.write_heading(stream) jpayne@69: * jpayne@69: * def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2): # <<<<<<<<<<<<<< jpayne@69: * """ Utility function: compares two calls for equality """ jpayne@69: * # a variant should always be assigned to a unique position, one base before jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_78compare_calls, 0, __pyx_n_s_VCF_compare_calls, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_compare_calls, __pyx_t_5) < 0) __PYX_ERR(0, 1024, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1046 jpayne@69: * ########################################################################################################### jpayne@69: * jpayne@69: * def connect(self, filename, encoding="ascii"): # <<<<<<<<<<<<<< jpayne@69: * '''connect to tabix file.''' jpayne@69: * self.encoding=encoding jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_80connect, 0, __pyx_n_s_VCF_connect, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1046, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__129); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_connect, __pyx_t_5) < 0) __PYX_ERR(0, 1046, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1052 jpayne@69: * self._parse_header(self.tabixfile.header) jpayne@69: * jpayne@69: * def __del__(self): # <<<<<<<<<<<<<< jpayne@69: * self.close() jpayne@69: * self.tabixfile = None jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_82__del__, 0, __pyx_n_s_VCF___del, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_del, __pyx_t_5) < 0) __PYX_ERR(0, 1052, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1056 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def close(self): # <<<<<<<<<<<<<< jpayne@69: * if self.tabixfile: jpayne@69: * self.tabixfile.close() jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_84close, 0, __pyx_n_s_VCF_close, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1056, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_close, __pyx_t_5) < 0) __PYX_ERR(0, 1056, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1061 jpayne@69: * self.tabixfile = None jpayne@69: * jpayne@69: * def fetch(self, # <<<<<<<<<<<<<< jpayne@69: * reference=None, jpayne@69: * start=None, jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_86fetch, 0, __pyx_n_s_VCF_fetch, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__134); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_fetch, __pyx_t_5) < 0) __PYX_ERR(0, 1061, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1075 jpayne@69: * parser = asVCFRecord(self)) jpayne@69: * jpayne@69: * def validate(self, record): # <<<<<<<<<<<<<< jpayne@69: * '''validate vcf record. jpayne@69: * jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_3VCF_88validate, 0, __pyx_n_s_VCF_validate, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1075, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_validate, __pyx_t_5) < 0) __PYX_ERR(0, 1075, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":253 jpayne@69: * return r jpayne@69: * jpayne@69: * class VCF(object): # <<<<<<<<<<<<<< jpayne@69: * jpayne@69: * # types jpayne@69: */ jpayne@69: __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_VCF, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_5); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_VCF, __pyx_t_5) < 0) __PYX_ERR(0, 253, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1202 jpayne@69: * pos -= 1 jpayne@69: * jpayne@69: * __all__ = [ # <<<<<<<<<<<<<< jpayne@69: * "VCF", "VCFRecord", ] jpayne@69: */ jpayne@69: __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: __Pyx_INCREF(__pyx_n_u_VCF); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_VCF); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_VCF)) __PYX_ERR(0, 1202, __pyx_L1_error); jpayne@69: __Pyx_INCREF(__pyx_n_u_VCFRecord); jpayne@69: __Pyx_GIVEREF(__pyx_n_u_VCFRecord); jpayne@69: if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_VCFRecord)) __PYX_ERR(0, 1202, __pyx_L1_error); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_3) < 0) __PYX_ERR(0, 1202, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "(tree fragment)":1 jpayne@69: * def __pyx_unpickle_asVCFRecord(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< jpayne@69: * cdef object __pyx_PickleError jpayne@69: * cdef object __pyx_result jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_7libcvcf_5__pyx_unpickle_asVCFRecord, 0, __pyx_n_s_pyx_unpickle_asVCFRecord, NULL, __pyx_n_s_pysam_libcvcf, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asVCFRecord, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /* "pysam/libcvcf.pyx":1 jpayne@69: * # cython: embedsignature=True # <<<<<<<<<<<<<< jpayne@69: * # jpayne@69: * # Code to read, write and edit VCF files jpayne@69: */ jpayne@69: __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __Pyx_GOTREF(__pyx_t_3); jpayne@69: if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error) jpayne@69: __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; jpayne@69: jpayne@69: /*--- Wrapped vars code ---*/ jpayne@69: jpayne@69: goto __pyx_L0; jpayne@69: __pyx_L1_error:; jpayne@69: __Pyx_XDECREF(__pyx_t_2); jpayne@69: __Pyx_XDECREF(__pyx_t_3); jpayne@69: __Pyx_XDECREF(__pyx_t_4); jpayne@69: __Pyx_XDECREF(__pyx_t_5); jpayne@69: if (__pyx_m) { jpayne@69: if (__pyx_d && stringtab_initialized) { jpayne@69: __Pyx_AddTraceback("init pysam.libcvcf", __pyx_clineno, __pyx_lineno, __pyx_filename); jpayne@69: } jpayne@69: #if !CYTHON_USE_MODULE_STATE jpayne@69: Py_CLEAR(__pyx_m); jpayne@69: #else jpayne@69: Py_DECREF(__pyx_m); jpayne@69: if (pystate_addmodule_run) { jpayne@69: PyObject *tp, *value, *tb; jpayne@69: PyErr_Fetch(&tp, &value, &tb); jpayne@69: PyState_RemoveModule(&__pyx_moduledef); jpayne@69: PyErr_Restore(tp, value, tb); jpayne@69: } jpayne@69: #endif jpayne@69: } else if (!PyErr_Occurred()) { jpayne@69: PyErr_SetString(PyExc_ImportError, "init pysam.libcvcf"); jpayne@69: } jpayne@69: __pyx_L0:; jpayne@69: __Pyx_RefNannyFinishContext(); jpayne@69: #if CYTHON_PEP489_MULTI_PHASE_INIT jpayne@69: return (__pyx_m != NULL) ? 0 : -1; jpayne@69: #elif PY_MAJOR_VERSION >= 3 jpayne@69: return __pyx_m; jpayne@69: #else jpayne@69: return; jpayne@69: #endif jpayne@69: } jpayne@69: /* #### Code section: cleanup_globals ### */ jpayne@69: /* #### Code section: cleanup_module ### */ jpayne@69: /* #### Code section: main_method ### */ jpayne@69: /* #### Code section: utility_code_pragmas ### */ jpayne@69: #ifdef _MSC_VER jpayne@69: #pragma warning( push ) jpayne@69: /* Warning 4127: conditional expression is constant jpayne@69: * Cython uses constant conditional expressions to allow in inline functions to be optimized at jpayne@69: * compile-time, so this warning is not useful jpayne@69: */ jpayne@69: #pragma warning( disable : 4127 ) jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: jpayne@69: /* #### Code section: utility_code_def ### */ jpayne@69: jpayne@69: /* --- Runtime support code --- */ jpayne@69: /* Refnanny */ jpayne@69: #if CYTHON_REFNANNY jpayne@69: static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { jpayne@69: PyObject *m = NULL, *p = NULL; jpayne@69: void *r = NULL; jpayne@69: m = PyImport_ImportModule(modname); jpayne@69: if (!m) goto end; jpayne@69: p = PyObject_GetAttrString(m, "RefNannyAPI"); jpayne@69: if (!p) goto end; jpayne@69: r = PyLong_AsVoidPtr(p); jpayne@69: end: jpayne@69: Py_XDECREF(p); jpayne@69: Py_XDECREF(m); jpayne@69: return (__Pyx_RefNannyAPIStruct *)r; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyErrExceptionMatches */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { jpayne@69: Py_ssize_t i, n; jpayne@69: n = PyTuple_GET_SIZE(tuple); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: for (i=0; i= 0x030C00A6 jpayne@69: PyObject *current_exception = tstate->current_exception; jpayne@69: if (unlikely(!current_exception)) return 0; jpayne@69: exc_type = (PyObject*) Py_TYPE(current_exception); jpayne@69: if (exc_type == err) return 1; jpayne@69: #else jpayne@69: exc_type = tstate->curexc_type; jpayne@69: if (exc_type == err) return 1; jpayne@69: if (unlikely(!exc_type)) return 0; jpayne@69: #endif jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_INCREF(exc_type); jpayne@69: #endif jpayne@69: if (unlikely(PyTuple_Check(err))) { jpayne@69: result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); jpayne@69: } else { jpayne@69: result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); jpayne@69: } jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_DECREF(exc_type); jpayne@69: #endif jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyErrFetchRestore */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { jpayne@69: #if PY_VERSION_HEX >= 0x030C00A6 jpayne@69: PyObject *tmp_value; jpayne@69: assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); jpayne@69: if (value) { jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) jpayne@69: #endif jpayne@69: PyException_SetTraceback(value, tb); jpayne@69: } jpayne@69: tmp_value = tstate->current_exception; jpayne@69: tstate->current_exception = value; jpayne@69: Py_XDECREF(tmp_value); jpayne@69: Py_XDECREF(type); jpayne@69: Py_XDECREF(tb); jpayne@69: #else jpayne@69: PyObject *tmp_type, *tmp_value, *tmp_tb; jpayne@69: tmp_type = tstate->curexc_type; jpayne@69: tmp_value = tstate->curexc_value; jpayne@69: tmp_tb = tstate->curexc_traceback; jpayne@69: tstate->curexc_type = type; jpayne@69: tstate->curexc_value = value; jpayne@69: tstate->curexc_traceback = tb; jpayne@69: Py_XDECREF(tmp_type); jpayne@69: Py_XDECREF(tmp_value); jpayne@69: Py_XDECREF(tmp_tb); jpayne@69: #endif jpayne@69: } jpayne@69: static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { jpayne@69: #if PY_VERSION_HEX >= 0x030C00A6 jpayne@69: PyObject* exc_value; jpayne@69: exc_value = tstate->current_exception; jpayne@69: tstate->current_exception = 0; jpayne@69: *value = exc_value; jpayne@69: *type = NULL; jpayne@69: *tb = NULL; jpayne@69: if (exc_value) { jpayne@69: *type = (PyObject*) Py_TYPE(exc_value); jpayne@69: Py_INCREF(*type); jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: *tb = ((PyBaseExceptionObject*) exc_value)->traceback; jpayne@69: Py_XINCREF(*tb); jpayne@69: #else jpayne@69: *tb = PyException_GetTraceback(exc_value); jpayne@69: #endif jpayne@69: } jpayne@69: #else jpayne@69: *type = tstate->curexc_type; jpayne@69: *value = tstate->curexc_value; jpayne@69: *tb = tstate->curexc_traceback; jpayne@69: tstate->curexc_type = 0; jpayne@69: tstate->curexc_value = 0; jpayne@69: tstate->curexc_traceback = 0; jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectGetAttrStr */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { jpayne@69: PyTypeObject* tp = Py_TYPE(obj); jpayne@69: if (likely(tp->tp_getattro)) jpayne@69: return tp->tp_getattro(obj, attr_name); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(tp->tp_getattr)) jpayne@69: return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); jpayne@69: #endif jpayne@69: return PyObject_GetAttr(obj, attr_name); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectGetAttrStrNoError */ jpayne@69: #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 jpayne@69: static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) jpayne@69: __Pyx_PyErr_Clear(); jpayne@69: } jpayne@69: #endif jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { jpayne@69: PyObject *result; jpayne@69: #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 jpayne@69: (void) PyObject_GetOptionalAttr(obj, attr_name, &result); jpayne@69: return result; jpayne@69: #else jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 jpayne@69: PyTypeObject* tp = Py_TYPE(obj); jpayne@69: if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { jpayne@69: return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); jpayne@69: } jpayne@69: #endif jpayne@69: result = __Pyx_PyObject_GetAttrStr(obj, attr_name); jpayne@69: if (unlikely(!result)) { jpayne@69: __Pyx_PyObject_GetAttrStr_ClearAttributeError(); jpayne@69: } jpayne@69: return result; jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* GetBuiltinName */ jpayne@69: static PyObject *__Pyx_GetBuiltinName(PyObject *name) { jpayne@69: PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); jpayne@69: if (unlikely(!result) && !PyErr_Occurred()) { jpayne@69: PyErr_Format(PyExc_NameError, jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: "name '%U' is not defined", name); jpayne@69: #else jpayne@69: "name '%.200s' is not defined", PyString_AS_STRING(name)); jpayne@69: #endif jpayne@69: } jpayne@69: return result; jpayne@69: } jpayne@69: jpayne@69: /* TupleAndListFromArray */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { jpayne@69: PyObject *v; jpayne@69: Py_ssize_t i; jpayne@69: for (i = 0; i < length; i++) { jpayne@69: v = dest[i] = src[i]; jpayne@69: Py_INCREF(v); jpayne@69: } jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject * jpayne@69: __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) jpayne@69: { jpayne@69: PyObject *res; jpayne@69: if (n <= 0) { jpayne@69: Py_INCREF(__pyx_empty_tuple); jpayne@69: return __pyx_empty_tuple; jpayne@69: } jpayne@69: res = PyTuple_New(n); jpayne@69: if (unlikely(res == NULL)) return NULL; jpayne@69: __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); jpayne@69: return res; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject * jpayne@69: __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) jpayne@69: { jpayne@69: PyObject *res; jpayne@69: if (n <= 0) { jpayne@69: return PyList_New(0); jpayne@69: } jpayne@69: res = PyList_New(n); jpayne@69: if (unlikely(res == NULL)) return NULL; jpayne@69: __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); jpayne@69: return res; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* BytesEquals */ jpayne@69: static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { jpayne@69: #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: return PyObject_RichCompareBool(s1, s2, equals); jpayne@69: #else jpayne@69: if (s1 == s2) { jpayne@69: return (equals == Py_EQ); jpayne@69: } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { jpayne@69: const char *ps1, *ps2; jpayne@69: Py_ssize_t length = PyBytes_GET_SIZE(s1); jpayne@69: if (length != PyBytes_GET_SIZE(s2)) jpayne@69: return (equals == Py_NE); jpayne@69: ps1 = PyBytes_AS_STRING(s1); jpayne@69: ps2 = PyBytes_AS_STRING(s2); jpayne@69: if (ps1[0] != ps2[0]) { jpayne@69: return (equals == Py_NE); jpayne@69: } else if (length == 1) { jpayne@69: return (equals == Py_EQ); jpayne@69: } else { jpayne@69: int result; jpayne@69: #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) jpayne@69: Py_hash_t hash1, hash2; jpayne@69: hash1 = ((PyBytesObject*)s1)->ob_shash; jpayne@69: hash2 = ((PyBytesObject*)s2)->ob_shash; jpayne@69: if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { jpayne@69: return (equals == Py_NE); jpayne@69: } jpayne@69: #endif jpayne@69: result = memcmp(ps1, ps2, (size_t)length); jpayne@69: return (equals == Py_EQ) ? (result == 0) : (result != 0); jpayne@69: } jpayne@69: } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { jpayne@69: return (equals == Py_NE); jpayne@69: } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { jpayne@69: return (equals == Py_NE); jpayne@69: } else { jpayne@69: int result; jpayne@69: PyObject* py_result = PyObject_RichCompare(s1, s2, equals); jpayne@69: if (!py_result) jpayne@69: return -1; jpayne@69: result = __Pyx_PyObject_IsTrue(py_result); jpayne@69: Py_DECREF(py_result); jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* UnicodeEquals */ jpayne@69: static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { jpayne@69: #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: return PyObject_RichCompareBool(s1, s2, equals); jpayne@69: #else jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PyObject* owned_ref = NULL; jpayne@69: #endif jpayne@69: int s1_is_unicode, s2_is_unicode; jpayne@69: if (s1 == s2) { jpayne@69: goto return_eq; jpayne@69: } jpayne@69: s1_is_unicode = PyUnicode_CheckExact(s1); jpayne@69: s2_is_unicode = PyUnicode_CheckExact(s2); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { jpayne@69: owned_ref = PyUnicode_FromObject(s2); jpayne@69: if (unlikely(!owned_ref)) jpayne@69: return -1; jpayne@69: s2 = owned_ref; jpayne@69: s2_is_unicode = 1; jpayne@69: } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { jpayne@69: owned_ref = PyUnicode_FromObject(s1); jpayne@69: if (unlikely(!owned_ref)) jpayne@69: return -1; jpayne@69: s1 = owned_ref; jpayne@69: s1_is_unicode = 1; jpayne@69: } else if (((!s2_is_unicode) & (!s1_is_unicode))) { jpayne@69: return __Pyx_PyBytes_Equals(s1, s2, equals); jpayne@69: } jpayne@69: #endif jpayne@69: if (s1_is_unicode & s2_is_unicode) { jpayne@69: Py_ssize_t length; jpayne@69: int kind; jpayne@69: void *data1, *data2; jpayne@69: if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) jpayne@69: return -1; jpayne@69: length = __Pyx_PyUnicode_GET_LENGTH(s1); jpayne@69: if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { jpayne@69: goto return_ne; jpayne@69: } jpayne@69: #if CYTHON_USE_UNICODE_INTERNALS jpayne@69: { jpayne@69: Py_hash_t hash1, hash2; jpayne@69: #if CYTHON_PEP393_ENABLED jpayne@69: hash1 = ((PyASCIIObject*)s1)->hash; jpayne@69: hash2 = ((PyASCIIObject*)s2)->hash; jpayne@69: #else jpayne@69: hash1 = ((PyUnicodeObject*)s1)->hash; jpayne@69: hash2 = ((PyUnicodeObject*)s2)->hash; jpayne@69: #endif jpayne@69: if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { jpayne@69: goto return_ne; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: kind = __Pyx_PyUnicode_KIND(s1); jpayne@69: if (kind != __Pyx_PyUnicode_KIND(s2)) { jpayne@69: goto return_ne; jpayne@69: } jpayne@69: data1 = __Pyx_PyUnicode_DATA(s1); jpayne@69: data2 = __Pyx_PyUnicode_DATA(s2); jpayne@69: if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { jpayne@69: goto return_ne; jpayne@69: } else if (length == 1) { jpayne@69: goto return_eq; jpayne@69: } else { jpayne@69: int result = memcmp(data1, data2, (size_t)(length * kind)); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: Py_XDECREF(owned_ref); jpayne@69: #endif jpayne@69: return (equals == Py_EQ) ? (result == 0) : (result != 0); jpayne@69: } jpayne@69: } else if ((s1 == Py_None) & s2_is_unicode) { jpayne@69: goto return_ne; jpayne@69: } else if ((s2 == Py_None) & s1_is_unicode) { jpayne@69: goto return_ne; jpayne@69: } else { jpayne@69: int result; jpayne@69: PyObject* py_result = PyObject_RichCompare(s1, s2, equals); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: Py_XDECREF(owned_ref); jpayne@69: #endif jpayne@69: if (!py_result) jpayne@69: return -1; jpayne@69: result = __Pyx_PyObject_IsTrue(py_result); jpayne@69: Py_DECREF(py_result); jpayne@69: return result; jpayne@69: } jpayne@69: return_eq: jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: Py_XDECREF(owned_ref); jpayne@69: #endif jpayne@69: return (equals == Py_EQ); jpayne@69: return_ne: jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: Py_XDECREF(owned_ref); jpayne@69: #endif jpayne@69: return (equals == Py_NE); jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* fastcall */ jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) jpayne@69: { jpayne@69: Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); jpayne@69: for (i = 0; i < n; i++) jpayne@69: { jpayne@69: if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; jpayne@69: } jpayne@69: for (i = 0; i < n; i++) jpayne@69: { jpayne@69: int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); jpayne@69: if (unlikely(eq != 0)) { jpayne@69: if (unlikely(eq < 0)) return NULL; jpayne@69: return kwvalues[i]; jpayne@69: } jpayne@69: } jpayne@69: return NULL; jpayne@69: } jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 jpayne@69: CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { jpayne@69: Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); jpayne@69: PyObject *dict; jpayne@69: dict = PyDict_New(); jpayne@69: if (unlikely(!dict)) jpayne@69: return NULL; jpayne@69: for (i=0; i= 3 jpayne@69: "%s() got multiple values for keyword argument '%U'", func_name, kw_name); jpayne@69: #else jpayne@69: "%s() got multiple values for keyword argument '%s'", func_name, jpayne@69: PyString_AsString(kw_name)); jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* ParseKeywords */ jpayne@69: static int __Pyx_ParseOptionalKeywords( jpayne@69: PyObject *kwds, jpayne@69: PyObject *const *kwvalues, jpayne@69: PyObject **argnames[], jpayne@69: PyObject *kwds2, jpayne@69: PyObject *values[], jpayne@69: Py_ssize_t num_pos_args, jpayne@69: const char* function_name) jpayne@69: { jpayne@69: PyObject *key = 0, *value = 0; jpayne@69: Py_ssize_t pos = 0; jpayne@69: PyObject*** name; jpayne@69: PyObject*** first_kw_arg = argnames + num_pos_args; jpayne@69: int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); jpayne@69: while (1) { jpayne@69: Py_XDECREF(key); key = NULL; jpayne@69: Py_XDECREF(value); value = NULL; jpayne@69: if (kwds_is_tuple) { jpayne@69: Py_ssize_t size; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: size = PyTuple_GET_SIZE(kwds); jpayne@69: #else jpayne@69: size = PyTuple_Size(kwds); jpayne@69: if (size < 0) goto bad; jpayne@69: #endif jpayne@69: if (pos >= size) break; jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: key = __Pyx_PySequence_ITEM(kwds, pos); jpayne@69: if (!key) goto bad; jpayne@69: #elif CYTHON_ASSUME_SAFE_MACROS jpayne@69: key = PyTuple_GET_ITEM(kwds, pos); jpayne@69: #else jpayne@69: key = PyTuple_GetItem(kwds, pos); jpayne@69: if (!key) goto bad; jpayne@69: #endif jpayne@69: value = kwvalues[pos]; jpayne@69: pos++; jpayne@69: } jpayne@69: else jpayne@69: { jpayne@69: if (!PyDict_Next(kwds, &pos, &key, &value)) break; jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_INCREF(key); jpayne@69: #endif jpayne@69: } jpayne@69: name = first_kw_arg; jpayne@69: while (*name && (**name != key)) name++; jpayne@69: if (*name) { jpayne@69: values[name-argnames] = value; jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_INCREF(value); jpayne@69: Py_DECREF(key); jpayne@69: #endif jpayne@69: key = NULL; jpayne@69: value = NULL; jpayne@69: continue; jpayne@69: } jpayne@69: #if !CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_INCREF(key); jpayne@69: #endif jpayne@69: Py_INCREF(value); jpayne@69: name = first_kw_arg; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyString_Check(key))) { jpayne@69: while (*name) { jpayne@69: if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) jpayne@69: && _PyString_Eq(**name, key)) { jpayne@69: values[name-argnames] = value; jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: value = NULL; jpayne@69: #endif jpayne@69: break; jpayne@69: } jpayne@69: name++; jpayne@69: } jpayne@69: if (*name) continue; jpayne@69: else { jpayne@69: PyObject*** argname = argnames; jpayne@69: while (argname != first_kw_arg) { jpayne@69: if ((**argname == key) || ( jpayne@69: (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) jpayne@69: && _PyString_Eq(**argname, key))) { jpayne@69: goto arg_passed_twice; jpayne@69: } jpayne@69: argname++; jpayne@69: } jpayne@69: } jpayne@69: } else jpayne@69: #endif jpayne@69: if (likely(PyUnicode_Check(key))) { jpayne@69: while (*name) { jpayne@69: int cmp = ( jpayne@69: #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 jpayne@69: (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : jpayne@69: #endif jpayne@69: PyUnicode_Compare(**name, key) jpayne@69: ); jpayne@69: if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; jpayne@69: if (cmp == 0) { jpayne@69: values[name-argnames] = value; jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: value = NULL; jpayne@69: #endif jpayne@69: break; jpayne@69: } jpayne@69: name++; jpayne@69: } jpayne@69: if (*name) continue; jpayne@69: else { jpayne@69: PyObject*** argname = argnames; jpayne@69: while (argname != first_kw_arg) { jpayne@69: int cmp = (**argname == key) ? 0 : jpayne@69: #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 jpayne@69: (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : jpayne@69: #endif jpayne@69: PyUnicode_Compare(**argname, key); jpayne@69: if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; jpayne@69: if (cmp == 0) goto arg_passed_twice; jpayne@69: argname++; jpayne@69: } jpayne@69: } jpayne@69: } else jpayne@69: goto invalid_keyword_type; jpayne@69: if (kwds2) { jpayne@69: if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; jpayne@69: } else { jpayne@69: goto invalid_keyword; jpayne@69: } jpayne@69: } jpayne@69: Py_XDECREF(key); jpayne@69: Py_XDECREF(value); jpayne@69: return 0; jpayne@69: arg_passed_twice: jpayne@69: __Pyx_RaiseDoubleKeywordsError(function_name, key); jpayne@69: goto bad; jpayne@69: invalid_keyword_type: jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() keywords must be strings", function_name); jpayne@69: goto bad; jpayne@69: invalid_keyword: jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() got an unexpected keyword argument '%.200s'", jpayne@69: function_name, PyString_AsString(key)); jpayne@69: #else jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%s() got an unexpected keyword argument '%U'", jpayne@69: function_name, key); jpayne@69: #endif jpayne@69: bad: jpayne@69: Py_XDECREF(key); jpayne@69: Py_XDECREF(value); jpayne@69: return -1; jpayne@69: } jpayne@69: jpayne@69: /* PyDictVersioning */ jpayne@69: #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS jpayne@69: static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { jpayne@69: PyObject *dict = Py_TYPE(obj)->tp_dict; jpayne@69: return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; jpayne@69: } jpayne@69: static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { jpayne@69: PyObject **dictptr = NULL; jpayne@69: Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; jpayne@69: if (offset) { jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); jpayne@69: #else jpayne@69: dictptr = _PyObject_GetDictPtr(obj); jpayne@69: #endif jpayne@69: } jpayne@69: return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { jpayne@69: PyObject *dict = Py_TYPE(obj)->tp_dict; jpayne@69: if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) jpayne@69: return 0; jpayne@69: return obj_dict_version == __Pyx_get_object_dict_version(obj); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* GetModuleGlobalName */ jpayne@69: #if CYTHON_USE_DICT_VERSIONS jpayne@69: static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) jpayne@69: #else jpayne@69: static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *result; jpayne@69: #if !CYTHON_AVOID_BORROWED_REFS jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 jpayne@69: result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); jpayne@69: __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) jpayne@69: if (likely(result)) { jpayne@69: return __Pyx_NewRef(result); jpayne@69: } else if (unlikely(PyErr_Occurred())) { jpayne@69: return NULL; jpayne@69: } jpayne@69: #elif CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if (unlikely(!__pyx_m)) { jpayne@69: return NULL; jpayne@69: } jpayne@69: result = PyObject_GetAttr(__pyx_m, name); jpayne@69: if (likely(result)) { jpayne@69: return result; jpayne@69: } jpayne@69: #else jpayne@69: result = PyDict_GetItem(__pyx_d, name); jpayne@69: __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) jpayne@69: if (likely(result)) { jpayne@69: return __Pyx_NewRef(result); jpayne@69: } jpayne@69: #endif jpayne@69: #else jpayne@69: result = PyObject_GetItem(__pyx_d, name); jpayne@69: __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) jpayne@69: if (likely(result)) { jpayne@69: return __Pyx_NewRef(result); jpayne@69: } jpayne@69: PyErr_Clear(); jpayne@69: #endif jpayne@69: return __Pyx_GetBuiltinName(name); jpayne@69: } jpayne@69: jpayne@69: /* PyFunctionFastCall */ jpayne@69: #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL jpayne@69: static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, jpayne@69: PyObject *globals) { jpayne@69: PyFrameObject *f; jpayne@69: PyThreadState *tstate = __Pyx_PyThreadState_Current; jpayne@69: PyObject **fastlocals; jpayne@69: Py_ssize_t i; jpayne@69: PyObject *result; jpayne@69: assert(globals != NULL); jpayne@69: /* XXX Perhaps we should create a specialized jpayne@69: PyFrame_New() that doesn't take locals, but does jpayne@69: take builtins without sanity checking them. jpayne@69: */ jpayne@69: assert(tstate != NULL); jpayne@69: f = PyFrame_New(tstate, co, globals, NULL); jpayne@69: if (f == NULL) { jpayne@69: return NULL; jpayne@69: } jpayne@69: fastlocals = __Pyx_PyFrame_GetLocalsplus(f); jpayne@69: for (i = 0; i < na; i++) { jpayne@69: Py_INCREF(*args); jpayne@69: fastlocals[i] = *args++; jpayne@69: } jpayne@69: result = PyEval_EvalFrameEx(f,0); jpayne@69: ++tstate->recursion_depth; jpayne@69: Py_DECREF(f); jpayne@69: --tstate->recursion_depth; jpayne@69: return result; jpayne@69: } jpayne@69: static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { jpayne@69: PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); jpayne@69: PyObject *globals = PyFunction_GET_GLOBALS(func); jpayne@69: PyObject *argdefs = PyFunction_GET_DEFAULTS(func); jpayne@69: PyObject *closure; jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: PyObject *kwdefs; jpayne@69: #endif jpayne@69: PyObject *kwtuple, **k; jpayne@69: PyObject **d; jpayne@69: Py_ssize_t nd; jpayne@69: Py_ssize_t nk; jpayne@69: PyObject *result; jpayne@69: assert(kwargs == NULL || PyDict_Check(kwargs)); jpayne@69: nk = kwargs ? PyDict_Size(kwargs) : 0; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { jpayne@69: return NULL; jpayne@69: } jpayne@69: #else jpayne@69: if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { jpayne@69: return NULL; jpayne@69: } jpayne@69: #endif jpayne@69: if ( jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: co->co_kwonlyargcount == 0 && jpayne@69: #endif jpayne@69: likely(kwargs == NULL || nk == 0) && jpayne@69: co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { jpayne@69: if (argdefs == NULL && co->co_argcount == nargs) { jpayne@69: result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); jpayne@69: goto done; jpayne@69: } jpayne@69: else if (nargs == 0 && argdefs != NULL jpayne@69: && co->co_argcount == Py_SIZE(argdefs)) { jpayne@69: /* function called with no arguments, but all parameters have jpayne@69: a default value: use default values as arguments .*/ jpayne@69: args = &PyTuple_GET_ITEM(argdefs, 0); jpayne@69: result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); jpayne@69: goto done; jpayne@69: } jpayne@69: } jpayne@69: if (kwargs != NULL) { jpayne@69: Py_ssize_t pos, i; jpayne@69: kwtuple = PyTuple_New(2 * nk); jpayne@69: if (kwtuple == NULL) { jpayne@69: result = NULL; jpayne@69: goto done; jpayne@69: } jpayne@69: k = &PyTuple_GET_ITEM(kwtuple, 0); jpayne@69: pos = i = 0; jpayne@69: while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { jpayne@69: Py_INCREF(k[i]); jpayne@69: Py_INCREF(k[i+1]); jpayne@69: i += 2; jpayne@69: } jpayne@69: nk = i / 2; jpayne@69: } jpayne@69: else { jpayne@69: kwtuple = NULL; jpayne@69: k = NULL; jpayne@69: } jpayne@69: closure = PyFunction_GET_CLOSURE(func); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: kwdefs = PyFunction_GET_KW_DEFAULTS(func); jpayne@69: #endif jpayne@69: if (argdefs != NULL) { jpayne@69: d = &PyTuple_GET_ITEM(argdefs, 0); jpayne@69: nd = Py_SIZE(argdefs); jpayne@69: } jpayne@69: else { jpayne@69: d = NULL; jpayne@69: nd = 0; jpayne@69: } jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, jpayne@69: args, (int)nargs, jpayne@69: k, (int)nk, jpayne@69: d, (int)nd, kwdefs, closure); jpayne@69: #else jpayne@69: result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, jpayne@69: args, (int)nargs, jpayne@69: k, (int)nk, jpayne@69: d, (int)nd, closure); jpayne@69: #endif jpayne@69: Py_XDECREF(kwtuple); jpayne@69: done: jpayne@69: Py_LeaveRecursiveCall(); jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectCall */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { jpayne@69: PyObject *result; jpayne@69: ternaryfunc call = Py_TYPE(func)->tp_call; jpayne@69: if (unlikely(!call)) jpayne@69: return PyObject_Call(func, arg, kw); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) jpayne@69: return NULL; jpayne@69: #else jpayne@69: if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) jpayne@69: return NULL; jpayne@69: #endif jpayne@69: result = (*call)(func, arg, kw); jpayne@69: Py_LeaveRecursiveCall(); jpayne@69: if (unlikely(!result) && unlikely(!PyErr_Occurred())) { jpayne@69: PyErr_SetString( jpayne@69: PyExc_SystemError, jpayne@69: "NULL result without error in PyObject_Call"); jpayne@69: } jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectCallMethO */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { jpayne@69: PyObject *self, *result; jpayne@69: PyCFunction cfunc; jpayne@69: cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); jpayne@69: self = __Pyx_CyOrPyCFunction_GET_SELF(func); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) jpayne@69: return NULL; jpayne@69: #else jpayne@69: if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) jpayne@69: return NULL; jpayne@69: #endif jpayne@69: result = cfunc(self, arg); jpayne@69: Py_LeaveRecursiveCall(); jpayne@69: if (unlikely(!result) && unlikely(!PyErr_Occurred())) { jpayne@69: PyErr_SetString( jpayne@69: PyExc_SystemError, jpayne@69: "NULL result without error in PyObject_Call"); jpayne@69: } jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectFastCall */ jpayne@69: #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { jpayne@69: PyObject *argstuple; jpayne@69: PyObject *result = 0; jpayne@69: size_t i; jpayne@69: argstuple = PyTuple_New((Py_ssize_t)nargs); jpayne@69: if (unlikely(!argstuple)) return NULL; jpayne@69: for (i = 0; i < nargs; i++) { jpayne@69: Py_INCREF(args[i]); jpayne@69: if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; jpayne@69: } jpayne@69: result = __Pyx_PyObject_Call(func, argstuple, kwargs); jpayne@69: bad: jpayne@69: Py_DECREF(argstuple); jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { jpayne@69: Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: if (nargs == 0 && kwargs == NULL) { jpayne@69: if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) jpayne@69: return __Pyx_PyObject_CallMethO(func, NULL); jpayne@69: } jpayne@69: else if (nargs == 1 && kwargs == NULL) { jpayne@69: if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) jpayne@69: return __Pyx_PyObject_CallMethO(func, args[0]); jpayne@69: } jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030800B1 jpayne@69: #if CYTHON_FAST_PYCCALL jpayne@69: if (PyCFunction_Check(func)) { jpayne@69: if (kwargs) { jpayne@69: return _PyCFunction_FastCallDict(func, args, nargs, kwargs); jpayne@69: } else { jpayne@69: return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); jpayne@69: } jpayne@69: } jpayne@69: #if PY_VERSION_HEX >= 0x030700A1 jpayne@69: if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { jpayne@69: return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); jpayne@69: } jpayne@69: #endif jpayne@69: #endif jpayne@69: #if CYTHON_FAST_PYCALL jpayne@69: if (PyFunction_Check(func)) { jpayne@69: return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); jpayne@69: } jpayne@69: #endif jpayne@69: #endif jpayne@69: if (kwargs == NULL) { jpayne@69: #if CYTHON_VECTORCALL jpayne@69: #if PY_VERSION_HEX < 0x03090000 jpayne@69: vectorcallfunc f = _PyVectorcall_Function(func); jpayne@69: #else jpayne@69: vectorcallfunc f = PyVectorcall_Function(func); jpayne@69: #endif jpayne@69: if (f) { jpayne@69: return f(func, args, (size_t)nargs, NULL); jpayne@69: } jpayne@69: #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL jpayne@69: if (__Pyx_CyFunction_CheckExact(func)) { jpayne@69: __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); jpayne@69: if (f) return f(func, args, (size_t)nargs, NULL); jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: if (nargs == 0) { jpayne@69: return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); jpayne@69: } jpayne@69: #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); jpayne@69: #else jpayne@69: return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* GetItemInt */ jpayne@69: static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { jpayne@69: PyObject *r; jpayne@69: if (unlikely(!j)) return NULL; jpayne@69: r = PyObject_GetItem(o, j); jpayne@69: Py_DECREF(j); jpayne@69: return r; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, jpayne@69: CYTHON_NCP_UNUSED int wraparound, jpayne@69: CYTHON_NCP_UNUSED int boundscheck) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_ssize_t wrapped_i = i; jpayne@69: if (wraparound & unlikely(i < 0)) { jpayne@69: wrapped_i += PyList_GET_SIZE(o); jpayne@69: } jpayne@69: if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { jpayne@69: PyObject *r = PyList_GET_ITEM(o, wrapped_i); jpayne@69: Py_INCREF(r); jpayne@69: return r; jpayne@69: } jpayne@69: return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); jpayne@69: #else jpayne@69: return PySequence_GetItem(o, i); jpayne@69: #endif jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, jpayne@69: CYTHON_NCP_UNUSED int wraparound, jpayne@69: CYTHON_NCP_UNUSED int boundscheck) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_ssize_t wrapped_i = i; jpayne@69: if (wraparound & unlikely(i < 0)) { jpayne@69: wrapped_i += PyTuple_GET_SIZE(o); jpayne@69: } jpayne@69: if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { jpayne@69: PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); jpayne@69: Py_INCREF(r); jpayne@69: return r; jpayne@69: } jpayne@69: return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); jpayne@69: #else jpayne@69: return PySequence_GetItem(o, i); jpayne@69: #endif jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, jpayne@69: CYTHON_NCP_UNUSED int wraparound, jpayne@69: CYTHON_NCP_UNUSED int boundscheck) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS jpayne@69: if (is_list || PyList_CheckExact(o)) { jpayne@69: Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); jpayne@69: if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { jpayne@69: PyObject *r = PyList_GET_ITEM(o, n); jpayne@69: Py_INCREF(r); jpayne@69: return r; jpayne@69: } jpayne@69: } jpayne@69: else if (PyTuple_CheckExact(o)) { jpayne@69: Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); jpayne@69: if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { jpayne@69: PyObject *r = PyTuple_GET_ITEM(o, n); jpayne@69: Py_INCREF(r); jpayne@69: return r; jpayne@69: } jpayne@69: } else { jpayne@69: PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; jpayne@69: PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; jpayne@69: if (mm && mm->mp_subscript) { jpayne@69: PyObject *r, *key = PyInt_FromSsize_t(i); jpayne@69: if (unlikely(!key)) return NULL; jpayne@69: r = mm->mp_subscript(o, key); jpayne@69: Py_DECREF(key); jpayne@69: return r; jpayne@69: } jpayne@69: if (likely(sm && sm->sq_item)) { jpayne@69: if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { jpayne@69: Py_ssize_t l = sm->sq_length(o); jpayne@69: if (likely(l >= 0)) { jpayne@69: i += l; jpayne@69: } else { jpayne@69: if (!PyErr_ExceptionMatches(PyExc_OverflowError)) jpayne@69: return NULL; jpayne@69: PyErr_Clear(); jpayne@69: } jpayne@69: } jpayne@69: return sm->sq_item(o, i); jpayne@69: } jpayne@69: } jpayne@69: #else jpayne@69: if (is_list || !PyMapping_Check(o)) { jpayne@69: return PySequence_GetItem(o, i); jpayne@69: } jpayne@69: #endif jpayne@69: return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); jpayne@69: } jpayne@69: jpayne@69: /* PyObjectCallOneArg */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { jpayne@69: PyObject *args[2] = {NULL, arg}; jpayne@69: return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); jpayne@69: } jpayne@69: jpayne@69: /* PyIntBinop */ jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { jpayne@69: CYTHON_MAYBE_UNUSED_VAR(intval); jpayne@69: CYTHON_MAYBE_UNUSED_VAR(inplace); jpayne@69: CYTHON_UNUSED_VAR(zerodivision_check); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long x; jpayne@69: long a = PyInt_AS_LONG(op1); jpayne@69: jpayne@69: x = (long)((unsigned long)a - (unsigned long)b); jpayne@69: if (likely((x^a) >= 0 || (x^~b) >= 0)) jpayne@69: return PyInt_FromLong(x); jpayne@69: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (likely(PyLong_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long a, x; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: const PY_LONG_LONG llb = intval; jpayne@69: PY_LONG_LONG lla, llx; jpayne@69: #endif jpayne@69: if (unlikely(__Pyx_PyLong_IsZero(op1))) { jpayne@69: return PyLong_FromLong(-intval); jpayne@69: } jpayne@69: if (likely(__Pyx_PyLong_IsCompact(op1))) { jpayne@69: a = __Pyx_PyLong_CompactValue(op1); jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(op1); jpayne@69: const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); jpayne@69: switch (size) { jpayne@69: case -2: jpayne@69: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { jpayne@69: lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { jpayne@69: a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { jpayne@69: lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case -3: jpayne@69: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { jpayne@69: a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case -4: jpayne@69: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { jpayne@69: a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); jpayne@69: } jpayne@69: } jpayne@69: x = a - b; jpayne@69: return PyLong_FromLong(x); jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: long_long: jpayne@69: llx = lla - llb; jpayne@69: return PyLong_FromLongLong(llx); jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: } jpayne@69: #endif jpayne@69: if (PyFloat_CheckExact(op1)) { jpayne@69: const long b = intval; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: double a = __pyx_PyFloat_AsDouble(op1); jpayne@69: #else jpayne@69: double a = PyFloat_AS_DOUBLE(op1); jpayne@69: #endif jpayne@69: double result; jpayne@69: jpayne@69: PyFPE_START_PROTECT("subtract", return NULL) jpayne@69: result = ((double)a) - (double)b; jpayne@69: PyFPE_END_PROTECT(result) jpayne@69: return PyFloat_FromDouble(result); jpayne@69: } jpayne@69: return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* GetTopmostException */ jpayne@69: #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE jpayne@69: static _PyErr_StackItem * jpayne@69: __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) jpayne@69: { jpayne@69: _PyErr_StackItem *exc_info = tstate->exc_info; jpayne@69: while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && jpayne@69: exc_info->previous_item != NULL) jpayne@69: { jpayne@69: exc_info = exc_info->previous_item; jpayne@69: } jpayne@69: return exc_info; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* SaveResetException */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { jpayne@69: #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 jpayne@69: _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); jpayne@69: PyObject *exc_value = exc_info->exc_value; jpayne@69: if (exc_value == NULL || exc_value == Py_None) { jpayne@69: *value = NULL; jpayne@69: *type = NULL; jpayne@69: *tb = NULL; jpayne@69: } else { jpayne@69: *value = exc_value; jpayne@69: Py_INCREF(*value); jpayne@69: *type = (PyObject*) Py_TYPE(exc_value); jpayne@69: Py_INCREF(*type); jpayne@69: *tb = PyException_GetTraceback(exc_value); jpayne@69: } jpayne@69: #elif CYTHON_USE_EXC_INFO_STACK jpayne@69: _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); jpayne@69: *type = exc_info->exc_type; jpayne@69: *value = exc_info->exc_value; jpayne@69: *tb = exc_info->exc_traceback; jpayne@69: Py_XINCREF(*type); jpayne@69: Py_XINCREF(*value); jpayne@69: Py_XINCREF(*tb); jpayne@69: #else jpayne@69: *type = tstate->exc_type; jpayne@69: *value = tstate->exc_value; jpayne@69: *tb = tstate->exc_traceback; jpayne@69: Py_XINCREF(*type); jpayne@69: Py_XINCREF(*value); jpayne@69: Py_XINCREF(*tb); jpayne@69: #endif jpayne@69: } jpayne@69: static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { jpayne@69: #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 jpayne@69: _PyErr_StackItem *exc_info = tstate->exc_info; jpayne@69: PyObject *tmp_value = exc_info->exc_value; jpayne@69: exc_info->exc_value = value; jpayne@69: Py_XDECREF(tmp_value); jpayne@69: Py_XDECREF(type); jpayne@69: Py_XDECREF(tb); jpayne@69: #else jpayne@69: PyObject *tmp_type, *tmp_value, *tmp_tb; jpayne@69: #if CYTHON_USE_EXC_INFO_STACK jpayne@69: _PyErr_StackItem *exc_info = tstate->exc_info; jpayne@69: tmp_type = exc_info->exc_type; jpayne@69: tmp_value = exc_info->exc_value; jpayne@69: tmp_tb = exc_info->exc_traceback; jpayne@69: exc_info->exc_type = type; jpayne@69: exc_info->exc_value = value; jpayne@69: exc_info->exc_traceback = tb; jpayne@69: #else jpayne@69: tmp_type = tstate->exc_type; jpayne@69: tmp_value = tstate->exc_value; jpayne@69: tmp_tb = tstate->exc_traceback; jpayne@69: tstate->exc_type = type; jpayne@69: tstate->exc_value = value; jpayne@69: tstate->exc_traceback = tb; jpayne@69: #endif jpayne@69: Py_XDECREF(tmp_type); jpayne@69: Py_XDECREF(tmp_value); jpayne@69: Py_XDECREF(tmp_tb); jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* GetException */ jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) jpayne@69: #else jpayne@69: static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *local_type = NULL, *local_value, *local_tb = NULL; jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: PyObject *tmp_type, *tmp_value, *tmp_tb; jpayne@69: #if PY_VERSION_HEX >= 0x030C00A6 jpayne@69: local_value = tstate->current_exception; jpayne@69: tstate->current_exception = 0; jpayne@69: if (likely(local_value)) { jpayne@69: local_type = (PyObject*) Py_TYPE(local_value); jpayne@69: Py_INCREF(local_type); jpayne@69: local_tb = PyException_GetTraceback(local_value); jpayne@69: } jpayne@69: #else jpayne@69: local_type = tstate->curexc_type; jpayne@69: local_value = tstate->curexc_value; jpayne@69: local_tb = tstate->curexc_traceback; jpayne@69: tstate->curexc_type = 0; jpayne@69: tstate->curexc_value = 0; jpayne@69: tstate->curexc_traceback = 0; jpayne@69: #endif jpayne@69: #else jpayne@69: PyErr_Fetch(&local_type, &local_value, &local_tb); jpayne@69: #endif jpayne@69: PyErr_NormalizeException(&local_type, &local_value, &local_tb); jpayne@69: #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 jpayne@69: if (unlikely(tstate->current_exception)) jpayne@69: #elif CYTHON_FAST_THREAD_STATE jpayne@69: if (unlikely(tstate->curexc_type)) jpayne@69: #else jpayne@69: if (unlikely(PyErr_Occurred())) jpayne@69: #endif jpayne@69: goto bad; jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: if (local_tb) { jpayne@69: if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) jpayne@69: goto bad; jpayne@69: } jpayne@69: #endif jpayne@69: Py_XINCREF(local_tb); jpayne@69: Py_XINCREF(local_type); jpayne@69: Py_XINCREF(local_value); jpayne@69: *type = local_type; jpayne@69: *value = local_value; jpayne@69: *tb = local_tb; jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: #if CYTHON_USE_EXC_INFO_STACK jpayne@69: { jpayne@69: _PyErr_StackItem *exc_info = tstate->exc_info; jpayne@69: #if PY_VERSION_HEX >= 0x030B00a4 jpayne@69: tmp_value = exc_info->exc_value; jpayne@69: exc_info->exc_value = local_value; jpayne@69: tmp_type = NULL; jpayne@69: tmp_tb = NULL; jpayne@69: Py_XDECREF(local_type); jpayne@69: Py_XDECREF(local_tb); jpayne@69: #else jpayne@69: tmp_type = exc_info->exc_type; jpayne@69: tmp_value = exc_info->exc_value; jpayne@69: tmp_tb = exc_info->exc_traceback; jpayne@69: exc_info->exc_type = local_type; jpayne@69: exc_info->exc_value = local_value; jpayne@69: exc_info->exc_traceback = local_tb; jpayne@69: #endif jpayne@69: } jpayne@69: #else jpayne@69: tmp_type = tstate->exc_type; jpayne@69: tmp_value = tstate->exc_value; jpayne@69: tmp_tb = tstate->exc_traceback; jpayne@69: tstate->exc_type = local_type; jpayne@69: tstate->exc_value = local_value; jpayne@69: tstate->exc_traceback = local_tb; jpayne@69: #endif jpayne@69: Py_XDECREF(tmp_type); jpayne@69: Py_XDECREF(tmp_value); jpayne@69: Py_XDECREF(tmp_tb); jpayne@69: #else jpayne@69: PyErr_SetExcInfo(local_type, local_value, local_tb); jpayne@69: #endif jpayne@69: return 0; jpayne@69: bad: jpayne@69: *type = 0; jpayne@69: *value = 0; jpayne@69: *tb = 0; jpayne@69: Py_XDECREF(local_type); jpayne@69: Py_XDECREF(local_value); jpayne@69: Py_XDECREF(local_tb); jpayne@69: return -1; jpayne@69: } jpayne@69: jpayne@69: /* RaiseException */ jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: CYTHON_UNUSED_VAR(cause); jpayne@69: Py_XINCREF(type); jpayne@69: if (!value || value == Py_None) jpayne@69: value = NULL; jpayne@69: else jpayne@69: Py_INCREF(value); jpayne@69: if (!tb || tb == Py_None) jpayne@69: tb = NULL; jpayne@69: else { jpayne@69: Py_INCREF(tb); jpayne@69: if (!PyTraceBack_Check(tb)) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "raise: arg 3 must be a traceback or None"); jpayne@69: goto raise_error; jpayne@69: } jpayne@69: } jpayne@69: if (PyType_Check(type)) { jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: if (!value) { jpayne@69: Py_INCREF(Py_None); jpayne@69: value = Py_None; jpayne@69: } jpayne@69: #endif jpayne@69: PyErr_NormalizeException(&type, &value, &tb); jpayne@69: } else { jpayne@69: if (value) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "instance exception may not have a separate value"); jpayne@69: goto raise_error; jpayne@69: } jpayne@69: value = type; jpayne@69: type = (PyObject*) Py_TYPE(type); jpayne@69: Py_INCREF(type); jpayne@69: if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "raise: exception class must be a subclass of BaseException"); jpayne@69: goto raise_error; jpayne@69: } jpayne@69: } jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ErrRestore(type, value, tb); jpayne@69: return; jpayne@69: raise_error: jpayne@69: Py_XDECREF(value); jpayne@69: Py_XDECREF(type); jpayne@69: Py_XDECREF(tb); jpayne@69: return; jpayne@69: } jpayne@69: #else jpayne@69: static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { jpayne@69: PyObject* owned_instance = NULL; jpayne@69: if (tb == Py_None) { jpayne@69: tb = 0; jpayne@69: } else if (tb && !PyTraceBack_Check(tb)) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "raise: arg 3 must be a traceback or None"); jpayne@69: goto bad; jpayne@69: } jpayne@69: if (value == Py_None) jpayne@69: value = 0; jpayne@69: if (PyExceptionInstance_Check(type)) { jpayne@69: if (value) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "instance exception may not have a separate value"); jpayne@69: goto bad; jpayne@69: } jpayne@69: value = type; jpayne@69: type = (PyObject*) Py_TYPE(value); jpayne@69: } else if (PyExceptionClass_Check(type)) { jpayne@69: PyObject *instance_class = NULL; jpayne@69: if (value && PyExceptionInstance_Check(value)) { jpayne@69: instance_class = (PyObject*) Py_TYPE(value); jpayne@69: if (instance_class != type) { jpayne@69: int is_subclass = PyObject_IsSubclass(instance_class, type); jpayne@69: if (!is_subclass) { jpayne@69: instance_class = NULL; jpayne@69: } else if (unlikely(is_subclass == -1)) { jpayne@69: goto bad; jpayne@69: } else { jpayne@69: type = instance_class; jpayne@69: } jpayne@69: } jpayne@69: } jpayne@69: if (!instance_class) { jpayne@69: PyObject *args; jpayne@69: if (!value) jpayne@69: args = PyTuple_New(0); jpayne@69: else if (PyTuple_Check(value)) { jpayne@69: Py_INCREF(value); jpayne@69: args = value; jpayne@69: } else jpayne@69: args = PyTuple_Pack(1, value); jpayne@69: if (!args) jpayne@69: goto bad; jpayne@69: owned_instance = PyObject_Call(type, args, NULL); jpayne@69: Py_DECREF(args); jpayne@69: if (!owned_instance) jpayne@69: goto bad; jpayne@69: value = owned_instance; jpayne@69: if (!PyExceptionInstance_Check(value)) { jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "calling %R should have returned an instance of " jpayne@69: "BaseException, not %R", jpayne@69: type, Py_TYPE(value)); jpayne@69: goto bad; jpayne@69: } jpayne@69: } jpayne@69: } else { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "raise: exception class must be a subclass of BaseException"); jpayne@69: goto bad; jpayne@69: } jpayne@69: if (cause) { jpayne@69: PyObject *fixed_cause; jpayne@69: if (cause == Py_None) { jpayne@69: fixed_cause = NULL; jpayne@69: } else if (PyExceptionClass_Check(cause)) { jpayne@69: fixed_cause = PyObject_CallObject(cause, NULL); jpayne@69: if (fixed_cause == NULL) jpayne@69: goto bad; jpayne@69: } else if (PyExceptionInstance_Check(cause)) { jpayne@69: fixed_cause = cause; jpayne@69: Py_INCREF(fixed_cause); jpayne@69: } else { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "exception causes must derive from " jpayne@69: "BaseException"); jpayne@69: goto bad; jpayne@69: } jpayne@69: PyException_SetCause(value, fixed_cause); jpayne@69: } jpayne@69: PyErr_SetObject(type, value); jpayne@69: if (tb) { jpayne@69: #if PY_VERSION_HEX >= 0x030C00A6 jpayne@69: PyException_SetTraceback(value, tb); jpayne@69: #elif CYTHON_FAST_THREAD_STATE jpayne@69: PyThreadState *tstate = __Pyx_PyThreadState_Current; jpayne@69: PyObject* tmp_tb = tstate->curexc_traceback; jpayne@69: if (tb != tmp_tb) { jpayne@69: Py_INCREF(tb); jpayne@69: tstate->curexc_traceback = tb; jpayne@69: Py_XDECREF(tmp_tb); jpayne@69: } jpayne@69: #else jpayne@69: PyObject *tmp_type, *tmp_value, *tmp_tb; jpayne@69: PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); jpayne@69: Py_INCREF(tb); jpayne@69: PyErr_Restore(tmp_type, tmp_value, tb); jpayne@69: Py_XDECREF(tmp_tb); jpayne@69: #endif jpayne@69: } jpayne@69: bad: jpayne@69: Py_XDECREF(owned_instance); jpayne@69: return; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* pybytes_as_double */ jpayne@69: static double __Pyx_SlowPyString_AsDouble(PyObject *obj) { jpayne@69: PyObject *float_value; jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: float_value = PyFloat_FromString(obj); jpayne@69: #else jpayne@69: float_value = PyFloat_FromString(obj, 0); jpayne@69: #endif jpayne@69: if (likely(float_value)) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: double value = PyFloat_AS_DOUBLE(float_value); jpayne@69: #else jpayne@69: double value = PyFloat_AsDouble(float_value); jpayne@69: #endif jpayne@69: Py_DECREF(float_value); jpayne@69: return value; jpayne@69: } jpayne@69: return (double)-1; jpayne@69: } jpayne@69: static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) { jpayne@69: int last_was_punctuation = 1; jpayne@69: Py_ssize_t i; jpayne@69: for (i=0; i < length; i++) { jpayne@69: char chr = start[i]; jpayne@69: int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E'); jpayne@69: *buffer = chr; jpayne@69: buffer += (chr != '_'); jpayne@69: if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure; jpayne@69: last_was_punctuation = is_punctuation; jpayne@69: } jpayne@69: if (unlikely(last_was_punctuation)) goto parse_failure; jpayne@69: *buffer = '\0'; jpayne@69: return buffer; jpayne@69: parse_failure: jpayne@69: return NULL; jpayne@69: } jpayne@69: static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) { jpayne@69: int matches = 1; jpayne@69: char sign = start[0]; jpayne@69: int is_signed = (sign == '+') | (sign == '-'); jpayne@69: start += is_signed; jpayne@69: length -= is_signed; jpayne@69: switch (start[0]) { jpayne@69: #ifdef Py_NAN jpayne@69: case 'n': jpayne@69: case 'N': jpayne@69: if (unlikely(length != 3)) goto parse_failure; jpayne@69: matches &= (start[1] == 'a' || start[1] == 'A'); jpayne@69: matches &= (start[2] == 'n' || start[2] == 'N'); jpayne@69: if (unlikely(!matches)) goto parse_failure; jpayne@69: return (sign == '-') ? -Py_NAN : Py_NAN; jpayne@69: #endif jpayne@69: case 'i': jpayne@69: case 'I': jpayne@69: if (unlikely(length < 3)) goto parse_failure; jpayne@69: matches &= (start[1] == 'n' || start[1] == 'N'); jpayne@69: matches &= (start[2] == 'f' || start[2] == 'F'); jpayne@69: if (likely(length == 3 && matches)) jpayne@69: return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; jpayne@69: if (unlikely(length != 8)) goto parse_failure; jpayne@69: matches &= (start[3] == 'i' || start[3] == 'I'); jpayne@69: matches &= (start[4] == 'n' || start[4] == 'N'); jpayne@69: matches &= (start[5] == 'i' || start[5] == 'I'); jpayne@69: matches &= (start[6] == 't' || start[6] == 'T'); jpayne@69: matches &= (start[7] == 'y' || start[7] == 'Y'); jpayne@69: if (unlikely(!matches)) goto parse_failure; jpayne@69: return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; jpayne@69: case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': jpayne@69: break; jpayne@69: default: jpayne@69: goto parse_failure; jpayne@69: } jpayne@69: return 0.0; jpayne@69: parse_failure: jpayne@69: return -1.0; jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) { jpayne@69: return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd)); jpayne@69: } jpayne@69: CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) { jpayne@69: double value; jpayne@69: Py_ssize_t i, digits; jpayne@69: const char *last = start + length; jpayne@69: char *end; jpayne@69: while (__Pyx__PyBytes_AsDouble_IsSpace(*start)) jpayne@69: start++; jpayne@69: while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1])) jpayne@69: last--; jpayne@69: length = last - start; jpayne@69: if (unlikely(length <= 0)) goto fallback; jpayne@69: value = __Pyx__PyBytes_AsDouble_inf_nan(start, length); jpayne@69: if (unlikely(value == -1.0)) goto fallback; jpayne@69: if (value != 0.0) return value; jpayne@69: digits = 0; jpayne@69: for (i=0; i < length; digits += start[i++] != '_'); jpayne@69: if (likely(digits == length)) { jpayne@69: value = PyOS_string_to_double(start, &end, NULL); jpayne@69: } else if (digits < 40) { jpayne@69: char number[40]; jpayne@69: last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); jpayne@69: if (unlikely(!last)) goto fallback; jpayne@69: value = PyOS_string_to_double(number, &end, NULL); jpayne@69: } else { jpayne@69: char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char)); jpayne@69: if (unlikely(!number)) goto fallback; jpayne@69: last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); jpayne@69: if (unlikely(!last)) { jpayne@69: PyMem_Free(number); jpayne@69: goto fallback; jpayne@69: } jpayne@69: value = PyOS_string_to_double(number, &end, NULL); jpayne@69: PyMem_Free(number); jpayne@69: } jpayne@69: if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { jpayne@69: return value; jpayne@69: } jpayne@69: fallback: jpayne@69: return __Pyx_SlowPyString_AsDouble(obj); jpayne@69: } jpayne@69: jpayne@69: /* pynumber_float */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) { jpayne@69: double val; jpayne@69: if (PyLong_CheckExact(obj)) { jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (likely(__Pyx_PyLong_IsCompact(obj))) { jpayne@69: val = (double) __Pyx_PyLong_CompactValue(obj); jpayne@69: goto no_error; jpayne@69: } jpayne@69: #endif jpayne@69: val = PyLong_AsDouble(obj); jpayne@69: } else if (PyUnicode_CheckExact(obj)) { jpayne@69: val = __Pyx_PyUnicode_AsDouble(obj); jpayne@69: } else if (PyBytes_CheckExact(obj)) { jpayne@69: val = __Pyx_PyBytes_AsDouble(obj); jpayne@69: } else if (PyByteArray_CheckExact(obj)) { jpayne@69: val = __Pyx_PyByteArray_AsDouble(obj); jpayne@69: } else { jpayne@69: return PyNumber_Float(obj); jpayne@69: } jpayne@69: if (unlikely(val == -1 && PyErr_Occurred())) { jpayne@69: return NULL; jpayne@69: } jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: no_error: jpayne@69: #endif jpayne@69: return PyFloat_FromDouble(val); jpayne@69: } jpayne@69: jpayne@69: /* RaiseUnboundLocalError */ jpayne@69: static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { jpayne@69: PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); jpayne@69: } jpayne@69: jpayne@69: /* ObjectGetItem */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { jpayne@69: PyObject *runerr = NULL; jpayne@69: Py_ssize_t key_value; jpayne@69: key_value = __Pyx_PyIndex_AsSsize_t(index); jpayne@69: if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { jpayne@69: return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); jpayne@69: } jpayne@69: if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { jpayne@69: __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index)); jpayne@69: PyErr_Clear(); jpayne@69: PyErr_Format(PyExc_IndexError, jpayne@69: "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); jpayne@69: __Pyx_DECREF_TypeName(index_type_name); jpayne@69: } jpayne@69: return NULL; jpayne@69: } jpayne@69: static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { jpayne@69: __Pyx_TypeName obj_type_name; jpayne@69: if (likely(PyType_Check(obj))) { jpayne@69: PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); jpayne@69: if (!meth) { jpayne@69: PyErr_Clear(); jpayne@69: } else { jpayne@69: PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); jpayne@69: Py_DECREF(meth); jpayne@69: return result; jpayne@69: } jpayne@69: } jpayne@69: obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); jpayne@69: __Pyx_DECREF_TypeName(obj_type_name); jpayne@69: return NULL; jpayne@69: } jpayne@69: static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { jpayne@69: PyTypeObject *tp = Py_TYPE(obj); jpayne@69: PyMappingMethods *mm = tp->tp_as_mapping; jpayne@69: PySequenceMethods *sm = tp->tp_as_sequence; jpayne@69: if (likely(mm && mm->mp_subscript)) { jpayne@69: return mm->mp_subscript(obj, key); jpayne@69: } jpayne@69: if (likely(sm && sm->sq_item)) { jpayne@69: return __Pyx_PyObject_GetIndex(obj, key); jpayne@69: } jpayne@69: return __Pyx_PyObject_GetItem_Slow(obj, key); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* CIntToDigits */ jpayne@69: static const char DIGIT_PAIRS_10[2*10*10+1] = { jpayne@69: "00010203040506070809" jpayne@69: "10111213141516171819" jpayne@69: "20212223242526272829" jpayne@69: "30313233343536373839" jpayne@69: "40414243444546474849" jpayne@69: "50515253545556575859" jpayne@69: "60616263646566676869" jpayne@69: "70717273747576777879" jpayne@69: "80818283848586878889" jpayne@69: "90919293949596979899" jpayne@69: }; jpayne@69: static const char DIGIT_PAIRS_8[2*8*8+1] = { jpayne@69: "0001020304050607" jpayne@69: "1011121314151617" jpayne@69: "2021222324252627" jpayne@69: "3031323334353637" jpayne@69: "4041424344454647" jpayne@69: "5051525354555657" jpayne@69: "6061626364656667" jpayne@69: "7071727374757677" jpayne@69: }; jpayne@69: static const char DIGITS_HEX[2*16+1] = { jpayne@69: "0123456789abcdef" jpayne@69: "0123456789ABCDEF" jpayne@69: }; jpayne@69: jpayne@69: /* BuildPyUnicode */ jpayne@69: static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, jpayne@69: int prepend_sign, char padding_char) { jpayne@69: PyObject *uval; jpayne@69: Py_ssize_t uoffset = ulength - clength; jpayne@69: #if CYTHON_USE_UNICODE_INTERNALS jpayne@69: Py_ssize_t i; jpayne@69: #if CYTHON_PEP393_ENABLED jpayne@69: void *udata; jpayne@69: uval = PyUnicode_New(ulength, 127); jpayne@69: if (unlikely(!uval)) return NULL; jpayne@69: udata = PyUnicode_DATA(uval); jpayne@69: #else jpayne@69: Py_UNICODE *udata; jpayne@69: uval = PyUnicode_FromUnicode(NULL, ulength); jpayne@69: if (unlikely(!uval)) return NULL; jpayne@69: udata = PyUnicode_AS_UNICODE(uval); jpayne@69: #endif jpayne@69: if (uoffset > 0) { jpayne@69: i = 0; jpayne@69: if (prepend_sign) { jpayne@69: __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); jpayne@69: i++; jpayne@69: } jpayne@69: for (; i < uoffset; i++) { jpayne@69: __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); jpayne@69: } jpayne@69: } jpayne@69: for (i=0; i < clength; i++) { jpayne@69: __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); jpayne@69: } jpayne@69: #else jpayne@69: { jpayne@69: PyObject *sign = NULL, *padding = NULL; jpayne@69: uval = NULL; jpayne@69: if (uoffset > 0) { jpayne@69: prepend_sign = !!prepend_sign; jpayne@69: if (uoffset > prepend_sign) { jpayne@69: padding = PyUnicode_FromOrdinal(padding_char); jpayne@69: if (likely(padding) && uoffset > prepend_sign + 1) { jpayne@69: PyObject *tmp; jpayne@69: PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign); jpayne@69: if (unlikely(!repeat)) goto done_or_error; jpayne@69: tmp = PyNumber_Multiply(padding, repeat); jpayne@69: Py_DECREF(repeat); jpayne@69: Py_DECREF(padding); jpayne@69: padding = tmp; jpayne@69: } jpayne@69: if (unlikely(!padding)) goto done_or_error; jpayne@69: } jpayne@69: if (prepend_sign) { jpayne@69: sign = PyUnicode_FromOrdinal('-'); jpayne@69: if (unlikely(!sign)) goto done_or_error; jpayne@69: } jpayne@69: } jpayne@69: uval = PyUnicode_DecodeASCII(chars, clength, NULL); jpayne@69: if (likely(uval) && padding) { jpayne@69: PyObject *tmp = PyNumber_Add(padding, uval); jpayne@69: Py_DECREF(uval); jpayne@69: uval = tmp; jpayne@69: } jpayne@69: if (likely(uval) && sign) { jpayne@69: PyObject *tmp = PyNumber_Add(sign, uval); jpayne@69: Py_DECREF(uval); jpayne@69: uval = tmp; jpayne@69: } jpayne@69: done_or_error: jpayne@69: Py_XDECREF(padding); jpayne@69: Py_XDECREF(sign); jpayne@69: } jpayne@69: #endif jpayne@69: return uval; jpayne@69: } jpayne@69: jpayne@69: /* CIntToPyUnicode */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { jpayne@69: char digits[sizeof(Py_ssize_t)*3+2]; jpayne@69: char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; jpayne@69: const char *hex_digits = DIGITS_HEX; jpayne@69: Py_ssize_t length, ulength; jpayne@69: int prepend_sign, last_one_off; jpayne@69: Py_ssize_t remaining; jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic push jpayne@69: #pragma GCC diagnostic ignored "-Wconversion" jpayne@69: #endif jpayne@69: const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic pop jpayne@69: #endif jpayne@69: const int is_unsigned = neg_one > const_zero; jpayne@69: if (format_char == 'X') { jpayne@69: hex_digits += 16; jpayne@69: format_char = 'x'; jpayne@69: } jpayne@69: remaining = value; jpayne@69: last_one_off = 0; jpayne@69: dpos = end; jpayne@69: do { jpayne@69: int digit_pos; jpayne@69: switch (format_char) { jpayne@69: case 'o': jpayne@69: digit_pos = abs((int)(remaining % (8*8))); jpayne@69: remaining = (Py_ssize_t) (remaining / (8*8)); jpayne@69: dpos -= 2; jpayne@69: memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); jpayne@69: last_one_off = (digit_pos < 8); jpayne@69: break; jpayne@69: case 'd': jpayne@69: digit_pos = abs((int)(remaining % (10*10))); jpayne@69: remaining = (Py_ssize_t) (remaining / (10*10)); jpayne@69: dpos -= 2; jpayne@69: memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); jpayne@69: last_one_off = (digit_pos < 10); jpayne@69: break; jpayne@69: case 'x': jpayne@69: *(--dpos) = hex_digits[abs((int)(remaining % 16))]; jpayne@69: remaining = (Py_ssize_t) (remaining / 16); jpayne@69: break; jpayne@69: default: jpayne@69: assert(0); jpayne@69: break; jpayne@69: } jpayne@69: } while (unlikely(remaining != 0)); jpayne@69: assert(!last_one_off || *dpos == '0'); jpayne@69: dpos += last_one_off; jpayne@69: length = end - dpos; jpayne@69: ulength = length; jpayne@69: prepend_sign = 0; jpayne@69: if (!is_unsigned && value <= neg_one) { jpayne@69: if (padding_char == ' ' || width <= length + 1) { jpayne@69: *(--dpos) = '-'; jpayne@69: ++length; jpayne@69: } else { jpayne@69: prepend_sign = 1; jpayne@69: } jpayne@69: ++ulength; jpayne@69: } jpayne@69: if (width > ulength) { jpayne@69: ulength = width; jpayne@69: } jpayne@69: if (ulength == 1) { jpayne@69: return PyUnicode_FromOrdinal(*dpos); jpayne@69: } jpayne@69: return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); jpayne@69: } jpayne@69: jpayne@69: /* PyObjectFormatAndDecref */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { jpayne@69: if (unlikely(!s)) return NULL; jpayne@69: if (likely(PyUnicode_CheckExact(s))) return s; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyString_CheckExact(s))) { jpayne@69: PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict"); jpayne@69: Py_DECREF(s); jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: return __Pyx_PyObject_FormatAndDecref(s, f); jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { jpayne@69: PyObject *result; jpayne@69: if (unlikely(!s)) return NULL; jpayne@69: result = PyObject_Format(s, f); jpayne@69: Py_DECREF(s); jpayne@69: return result; jpayne@69: } jpayne@69: jpayne@69: /* JoinPyUnicode */ jpayne@69: static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, jpayne@69: Py_UCS4 max_char) { jpayne@69: #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: PyObject *result_uval; jpayne@69: int result_ukind, kind_shift; jpayne@69: Py_ssize_t i, char_pos; jpayne@69: void *result_udata; jpayne@69: CYTHON_MAYBE_UNUSED_VAR(max_char); jpayne@69: #if CYTHON_PEP393_ENABLED jpayne@69: result_uval = PyUnicode_New(result_ulength, max_char); jpayne@69: if (unlikely(!result_uval)) return NULL; jpayne@69: result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; jpayne@69: kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; jpayne@69: result_udata = PyUnicode_DATA(result_uval); jpayne@69: #else jpayne@69: result_uval = PyUnicode_FromUnicode(NULL, result_ulength); jpayne@69: if (unlikely(!result_uval)) return NULL; jpayne@69: result_ukind = sizeof(Py_UNICODE); jpayne@69: kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1; jpayne@69: result_udata = PyUnicode_AS_UNICODE(result_uval); jpayne@69: #endif jpayne@69: assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); jpayne@69: char_pos = 0; jpayne@69: for (i=0; i < value_count; i++) { jpayne@69: int ukind; jpayne@69: Py_ssize_t ulength; jpayne@69: void *udata; jpayne@69: PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); jpayne@69: if (unlikely(__Pyx_PyUnicode_READY(uval))) jpayne@69: goto bad; jpayne@69: ulength = __Pyx_PyUnicode_GET_LENGTH(uval); jpayne@69: if (unlikely(!ulength)) jpayne@69: continue; jpayne@69: if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) jpayne@69: goto overflow; jpayne@69: ukind = __Pyx_PyUnicode_KIND(uval); jpayne@69: udata = __Pyx_PyUnicode_DATA(uval); jpayne@69: if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { jpayne@69: memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); jpayne@69: } else { jpayne@69: #if PY_VERSION_HEX >= 0x030d0000 jpayne@69: if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; jpayne@69: #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) jpayne@69: _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); jpayne@69: #else jpayne@69: Py_ssize_t j; jpayne@69: for (j=0; j < ulength; j++) { jpayne@69: Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); jpayne@69: __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: char_pos += ulength; jpayne@69: } jpayne@69: return result_uval; jpayne@69: overflow: jpayne@69: PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); jpayne@69: bad: jpayne@69: Py_DECREF(result_uval); jpayne@69: return NULL; jpayne@69: #else jpayne@69: CYTHON_UNUSED_VAR(max_char); jpayne@69: CYTHON_UNUSED_VAR(result_ulength); jpayne@69: CYTHON_UNUSED_VAR(value_count); jpayne@69: return PyUnicode_Join(__pyx_empty_unicode, value_tuple); jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* PyIntCompare */ jpayne@69: static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { jpayne@69: CYTHON_MAYBE_UNUSED_VAR(intval); jpayne@69: CYTHON_UNUSED_VAR(inplace); jpayne@69: if (op1 == op2) { jpayne@69: return 1; jpayne@69: } jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long a = PyInt_AS_LONG(op1); jpayne@69: return (a == b); jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (likely(PyLong_CheckExact(op1))) { jpayne@69: int unequal; jpayne@69: unsigned long uintval; jpayne@69: Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); jpayne@69: const digit* digits = __Pyx_PyLong_Digits(op1); jpayne@69: if (intval == 0) { jpayne@69: return (__Pyx_PyLong_IsZero(op1) == 1); jpayne@69: } else if (intval < 0) { jpayne@69: if (__Pyx_PyLong_IsNonNeg(op1)) jpayne@69: return 0; jpayne@69: intval = -intval; jpayne@69: } else { jpayne@69: if (__Pyx_PyLong_IsNeg(op1)) jpayne@69: return 0; jpayne@69: } jpayne@69: uintval = (unsigned long) intval; jpayne@69: #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 jpayne@69: if (uintval >> (PyLong_SHIFT * 4)) { jpayne@69: unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) jpayne@69: | (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)); jpayne@69: } else jpayne@69: #endif jpayne@69: #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 jpayne@69: if (uintval >> (PyLong_SHIFT * 3)) { jpayne@69: unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) jpayne@69: | (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)); jpayne@69: } else jpayne@69: #endif jpayne@69: #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 jpayne@69: if (uintval >> (PyLong_SHIFT * 2)) { jpayne@69: unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) jpayne@69: | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); jpayne@69: } else jpayne@69: #endif jpayne@69: #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 jpayne@69: if (uintval >> (PyLong_SHIFT * 1)) { jpayne@69: unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) jpayne@69: | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); jpayne@69: } else jpayne@69: #endif jpayne@69: unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); jpayne@69: return (unequal == 0); jpayne@69: } jpayne@69: #endif jpayne@69: if (PyFloat_CheckExact(op1)) { jpayne@69: const long b = intval; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: double a = __pyx_PyFloat_AsDouble(op1); jpayne@69: #else jpayne@69: double a = PyFloat_AS_DOUBLE(op1); jpayne@69: #endif jpayne@69: return ((double)a == (double)b); jpayne@69: } jpayne@69: return __Pyx_PyObject_IsTrueAndDecref( jpayne@69: PyObject_RichCompare(op1, op2, Py_EQ)); jpayne@69: } jpayne@69: jpayne@69: /* PyIntCompare */ jpayne@69: static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { jpayne@69: CYTHON_MAYBE_UNUSED_VAR(intval); jpayne@69: CYTHON_UNUSED_VAR(inplace); jpayne@69: if (op1 == op2) { jpayne@69: return 0; jpayne@69: } jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long a = PyInt_AS_LONG(op1); jpayne@69: return (a != b); jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (likely(PyLong_CheckExact(op1))) { jpayne@69: int unequal; jpayne@69: unsigned long uintval; jpayne@69: Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); jpayne@69: const digit* digits = __Pyx_PyLong_Digits(op1); jpayne@69: if (intval == 0) { jpayne@69: return (__Pyx_PyLong_IsZero(op1) != 1); jpayne@69: } else if (intval < 0) { jpayne@69: if (__Pyx_PyLong_IsNonNeg(op1)) jpayne@69: return 1; jpayne@69: intval = -intval; jpayne@69: } else { jpayne@69: if (__Pyx_PyLong_IsNeg(op1)) jpayne@69: return 1; jpayne@69: } jpayne@69: uintval = (unsigned long) intval; jpayne@69: #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 jpayne@69: if (uintval >> (PyLong_SHIFT * 4)) { jpayne@69: unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) jpayne@69: | (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)); jpayne@69: } else jpayne@69: #endif jpayne@69: #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 jpayne@69: if (uintval >> (PyLong_SHIFT * 3)) { jpayne@69: unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) jpayne@69: | (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)); jpayne@69: } else jpayne@69: #endif jpayne@69: #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 jpayne@69: if (uintval >> (PyLong_SHIFT * 2)) { jpayne@69: unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) jpayne@69: | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); jpayne@69: } else jpayne@69: #endif jpayne@69: #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 jpayne@69: if (uintval >> (PyLong_SHIFT * 1)) { jpayne@69: unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) jpayne@69: | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); jpayne@69: } else jpayne@69: #endif jpayne@69: unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); jpayne@69: return (unequal != 0); jpayne@69: } jpayne@69: #endif jpayne@69: if (PyFloat_CheckExact(op1)) { jpayne@69: const long b = intval; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: double a = __pyx_PyFloat_AsDouble(op1); jpayne@69: #else jpayne@69: double a = PyFloat_AS_DOUBLE(op1); jpayne@69: #endif jpayne@69: return ((double)a != (double)b); jpayne@69: } jpayne@69: return __Pyx_PyObject_IsTrueAndDecref( jpayne@69: PyObject_RichCompare(op1, op2, Py_NE)); jpayne@69: } jpayne@69: jpayne@69: /* DictGetItem */ jpayne@69: #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { jpayne@69: PyObject *value; jpayne@69: value = PyDict_GetItemWithError(d, key); jpayne@69: if (unlikely(!value)) { jpayne@69: if (!PyErr_Occurred()) { jpayne@69: if (unlikely(PyTuple_Check(key))) { jpayne@69: PyObject* args = PyTuple_Pack(1, key); jpayne@69: if (likely(args)) { jpayne@69: PyErr_SetObject(PyExc_KeyError, args); jpayne@69: Py_DECREF(args); jpayne@69: } jpayne@69: } else { jpayne@69: PyErr_SetObject(PyExc_KeyError, key); jpayne@69: } jpayne@69: } jpayne@69: return NULL; jpayne@69: } jpayne@69: Py_INCREF(value); jpayne@69: return value; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* SliceObject */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, jpayne@69: Py_ssize_t cstart, Py_ssize_t cstop, jpayne@69: PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, jpayne@69: int has_cstart, int has_cstop, int wraparound) { jpayne@69: __Pyx_TypeName obj_type_name; jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: PyMappingMethods* mp; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; jpayne@69: if (likely(ms && ms->sq_slice)) { jpayne@69: if (!has_cstart) { jpayne@69: if (_py_start && (*_py_start != Py_None)) { jpayne@69: cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); jpayne@69: if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; jpayne@69: } else jpayne@69: cstart = 0; jpayne@69: } jpayne@69: if (!has_cstop) { jpayne@69: if (_py_stop && (*_py_stop != Py_None)) { jpayne@69: cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); jpayne@69: if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; jpayne@69: } else jpayne@69: cstop = PY_SSIZE_T_MAX; jpayne@69: } jpayne@69: if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { jpayne@69: Py_ssize_t l = ms->sq_length(obj); jpayne@69: if (likely(l >= 0)) { jpayne@69: if (cstop < 0) { jpayne@69: cstop += l; jpayne@69: if (cstop < 0) cstop = 0; jpayne@69: } jpayne@69: if (cstart < 0) { jpayne@69: cstart += l; jpayne@69: if (cstart < 0) cstart = 0; jpayne@69: } jpayne@69: } else { jpayne@69: if (!PyErr_ExceptionMatches(PyExc_OverflowError)) jpayne@69: goto bad; jpayne@69: PyErr_Clear(); jpayne@69: } jpayne@69: } jpayne@69: return ms->sq_slice(obj, cstart, cstop); jpayne@69: } jpayne@69: #else jpayne@69: CYTHON_UNUSED_VAR(wraparound); jpayne@69: #endif jpayne@69: mp = Py_TYPE(obj)->tp_as_mapping; jpayne@69: if (likely(mp && mp->mp_subscript)) jpayne@69: #else jpayne@69: CYTHON_UNUSED_VAR(wraparound); jpayne@69: #endif jpayne@69: { jpayne@69: PyObject* result; jpayne@69: PyObject *py_slice, *py_start, *py_stop; jpayne@69: if (_py_slice) { jpayne@69: py_slice = *_py_slice; jpayne@69: } else { jpayne@69: PyObject* owned_start = NULL; jpayne@69: PyObject* owned_stop = NULL; jpayne@69: if (_py_start) { jpayne@69: py_start = *_py_start; jpayne@69: } else { jpayne@69: if (has_cstart) { jpayne@69: owned_start = py_start = PyInt_FromSsize_t(cstart); jpayne@69: if (unlikely(!py_start)) goto bad; jpayne@69: } else jpayne@69: py_start = Py_None; jpayne@69: } jpayne@69: if (_py_stop) { jpayne@69: py_stop = *_py_stop; jpayne@69: } else { jpayne@69: if (has_cstop) { jpayne@69: owned_stop = py_stop = PyInt_FromSsize_t(cstop); jpayne@69: if (unlikely(!py_stop)) { jpayne@69: Py_XDECREF(owned_start); jpayne@69: goto bad; jpayne@69: } jpayne@69: } else jpayne@69: py_stop = Py_None; jpayne@69: } jpayne@69: py_slice = PySlice_New(py_start, py_stop, Py_None); jpayne@69: Py_XDECREF(owned_start); jpayne@69: Py_XDECREF(owned_stop); jpayne@69: if (unlikely(!py_slice)) goto bad; jpayne@69: } jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: result = mp->mp_subscript(obj, py_slice); jpayne@69: #else jpayne@69: result = PyObject_GetItem(obj, py_slice); jpayne@69: #endif jpayne@69: if (!_py_slice) { jpayne@69: Py_DECREF(py_slice); jpayne@69: } jpayne@69: return result; jpayne@69: } jpayne@69: obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); jpayne@69: __Pyx_DECREF_TypeName(obj_type_name); jpayne@69: bad: jpayne@69: return NULL; jpayne@69: } jpayne@69: jpayne@69: /* KeywordStringCheck */ jpayne@69: static int __Pyx_CheckKeywordStrings( jpayne@69: PyObject *kw, jpayne@69: const char* function_name, jpayne@69: int kw_allowed) jpayne@69: { jpayne@69: PyObject* key = 0; jpayne@69: Py_ssize_t pos = 0; jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) jpayne@69: goto invalid_keyword; jpayne@69: return 1; jpayne@69: #else jpayne@69: if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { jpayne@69: Py_ssize_t kwsize; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: kwsize = PyTuple_GET_SIZE(kw); jpayne@69: #else jpayne@69: kwsize = PyTuple_Size(kw); jpayne@69: if (kwsize < 0) return 0; jpayne@69: #endif jpayne@69: if (unlikely(kwsize == 0)) jpayne@69: return 1; jpayne@69: if (!kw_allowed) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: key = PyTuple_GET_ITEM(kw, 0); jpayne@69: #else jpayne@69: key = PyTuple_GetItem(kw, pos); jpayne@69: if (!key) return 0; jpayne@69: #endif jpayne@69: goto invalid_keyword; jpayne@69: } jpayne@69: #if PY_VERSION_HEX < 0x03090000 jpayne@69: for (pos = 0; pos < kwsize; pos++) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: key = PyTuple_GET_ITEM(kw, pos); jpayne@69: #else jpayne@69: key = PyTuple_GetItem(kw, pos); jpayne@69: if (!key) return 0; jpayne@69: #endif jpayne@69: if (unlikely(!PyUnicode_Check(key))) jpayne@69: goto invalid_keyword_type; jpayne@69: } jpayne@69: #endif jpayne@69: return 1; jpayne@69: } jpayne@69: while (PyDict_Next(kw, &pos, &key, 0)) { jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (unlikely(!PyString_Check(key))) jpayne@69: #endif jpayne@69: if (unlikely(!PyUnicode_Check(key))) jpayne@69: goto invalid_keyword_type; jpayne@69: } jpayne@69: if (!kw_allowed && unlikely(key)) jpayne@69: goto invalid_keyword; jpayne@69: return 1; jpayne@69: invalid_keyword_type: jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() keywords must be strings", function_name); jpayne@69: return 0; jpayne@69: #endif jpayne@69: invalid_keyword: jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() got an unexpected keyword argument '%.200s'", jpayne@69: function_name, PyString_AsString(key)); jpayne@69: #else jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%s() got an unexpected keyword argument '%U'", jpayne@69: function_name, key); jpayne@69: #endif jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: /* GetAttr3 */ jpayne@69: #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 jpayne@69: static PyObject *__Pyx_GetAttr3Default(PyObject *d) { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) jpayne@69: return NULL; jpayne@69: __Pyx_PyErr_Clear(); jpayne@69: Py_INCREF(d); jpayne@69: return d; jpayne@69: } jpayne@69: #endif jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { jpayne@69: PyObject *r; jpayne@69: #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 jpayne@69: int res = PyObject_GetOptionalAttr(o, n, &r); jpayne@69: return (res != 0) ? r : __Pyx_NewRef(d); jpayne@69: #else jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: if (likely(PyString_Check(n))) { jpayne@69: r = __Pyx_PyObject_GetAttrStrNoError(o, n); jpayne@69: if (unlikely(!r) && likely(!PyErr_Occurred())) { jpayne@69: r = __Pyx_NewRef(d); jpayne@69: } jpayne@69: return r; jpayne@69: } jpayne@69: #endif jpayne@69: r = PyObject_GetAttr(o, n); jpayne@69: return (likely(r)) ? r : __Pyx_GetAttr3Default(d); jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* RaiseUnexpectedTypeError */ jpayne@69: static int jpayne@69: __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) jpayne@69: { jpayne@69: __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); jpayne@69: PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, jpayne@69: expected, obj_type_name); jpayne@69: __Pyx_DECREF_TypeName(obj_type_name); jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: /* IterFinish */ jpayne@69: static CYTHON_INLINE int __Pyx_IterFinish(void) { jpayne@69: PyObject* exc_type; jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: exc_type = __Pyx_PyErr_CurrentExceptionType(); jpayne@69: if (unlikely(exc_type)) { jpayne@69: if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) jpayne@69: return -1; jpayne@69: __Pyx_PyErr_Clear(); jpayne@69: return 0; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: /* PyObjectCallNoArg */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { jpayne@69: PyObject *arg[2] = {NULL, NULL}; jpayne@69: return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); jpayne@69: } jpayne@69: jpayne@69: /* PyObjectGetMethod */ jpayne@69: static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { jpayne@69: PyObject *attr; jpayne@69: #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP jpayne@69: __Pyx_TypeName type_name; jpayne@69: PyTypeObject *tp = Py_TYPE(obj); jpayne@69: PyObject *descr; jpayne@69: descrgetfunc f = NULL; jpayne@69: PyObject **dictptr, *dict; jpayne@69: int meth_found = 0; jpayne@69: assert (*method == NULL); jpayne@69: if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { jpayne@69: attr = __Pyx_PyObject_GetAttrStr(obj, name); jpayne@69: goto try_unpack; jpayne@69: } jpayne@69: if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { jpayne@69: return 0; jpayne@69: } jpayne@69: descr = _PyType_Lookup(tp, name); jpayne@69: if (likely(descr != NULL)) { jpayne@69: Py_INCREF(descr); jpayne@69: #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR jpayne@69: if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) jpayne@69: #elif PY_MAJOR_VERSION >= 3 jpayne@69: #ifdef __Pyx_CyFunction_USED jpayne@69: if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) jpayne@69: #else jpayne@69: if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) jpayne@69: #endif jpayne@69: #else jpayne@69: #ifdef __Pyx_CyFunction_USED jpayne@69: if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) jpayne@69: #else jpayne@69: if (likely(PyFunction_Check(descr))) jpayne@69: #endif jpayne@69: #endif jpayne@69: { jpayne@69: meth_found = 1; jpayne@69: } else { jpayne@69: f = Py_TYPE(descr)->tp_descr_get; jpayne@69: if (f != NULL && PyDescr_IsData(descr)) { jpayne@69: attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); jpayne@69: Py_DECREF(descr); jpayne@69: goto try_unpack; jpayne@69: } jpayne@69: } jpayne@69: } jpayne@69: dictptr = _PyObject_GetDictPtr(obj); jpayne@69: if (dictptr != NULL && (dict = *dictptr) != NULL) { jpayne@69: Py_INCREF(dict); jpayne@69: attr = __Pyx_PyDict_GetItemStr(dict, name); jpayne@69: if (attr != NULL) { jpayne@69: Py_INCREF(attr); jpayne@69: Py_DECREF(dict); jpayne@69: Py_XDECREF(descr); jpayne@69: goto try_unpack; jpayne@69: } jpayne@69: Py_DECREF(dict); jpayne@69: } jpayne@69: if (meth_found) { jpayne@69: *method = descr; jpayne@69: return 1; jpayne@69: } jpayne@69: if (f != NULL) { jpayne@69: attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); jpayne@69: Py_DECREF(descr); jpayne@69: goto try_unpack; jpayne@69: } jpayne@69: if (likely(descr != NULL)) { jpayne@69: *method = descr; jpayne@69: return 0; jpayne@69: } jpayne@69: type_name = __Pyx_PyType_GetName(tp); jpayne@69: PyErr_Format(PyExc_AttributeError, jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", jpayne@69: type_name, name); jpayne@69: #else jpayne@69: "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", jpayne@69: type_name, PyString_AS_STRING(name)); jpayne@69: #endif jpayne@69: __Pyx_DECREF_TypeName(type_name); jpayne@69: return 0; jpayne@69: #else jpayne@69: attr = __Pyx_PyObject_GetAttrStr(obj, name); jpayne@69: goto try_unpack; jpayne@69: #endif jpayne@69: try_unpack: jpayne@69: #if CYTHON_UNPACK_METHODS jpayne@69: if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { jpayne@69: PyObject *function = PyMethod_GET_FUNCTION(attr); jpayne@69: Py_INCREF(function); jpayne@69: Py_DECREF(attr); jpayne@69: *method = function; jpayne@69: return 1; jpayne@69: } jpayne@69: #endif jpayne@69: *method = attr; jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: /* PyObjectCallMethod0 */ jpayne@69: static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { jpayne@69: PyObject *method = NULL, *result = NULL; jpayne@69: int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); jpayne@69: if (likely(is_method)) { jpayne@69: result = __Pyx_PyObject_CallOneArg(method, obj); jpayne@69: Py_DECREF(method); jpayne@69: return result; jpayne@69: } jpayne@69: if (unlikely(!method)) goto bad; jpayne@69: result = __Pyx_PyObject_CallNoArg(method); jpayne@69: Py_DECREF(method); jpayne@69: bad: jpayne@69: return result; jpayne@69: } jpayne@69: jpayne@69: /* RaiseNeedMoreValuesToUnpack */ jpayne@69: static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { jpayne@69: PyErr_Format(PyExc_ValueError, jpayne@69: "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", jpayne@69: index, (index == 1) ? "" : "s"); jpayne@69: } jpayne@69: jpayne@69: /* RaiseTooManyValuesToUnpack */ jpayne@69: static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { jpayne@69: PyErr_Format(PyExc_ValueError, jpayne@69: "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); jpayne@69: } jpayne@69: jpayne@69: /* UnpackItemEndCheck */ jpayne@69: static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { jpayne@69: if (unlikely(retval)) { jpayne@69: Py_DECREF(retval); jpayne@69: __Pyx_RaiseTooManyValuesError(expected); jpayne@69: return -1; jpayne@69: } jpayne@69: return __Pyx_IterFinish(); jpayne@69: } jpayne@69: jpayne@69: /* RaiseNoneIterError */ jpayne@69: static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { jpayne@69: PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); jpayne@69: } jpayne@69: jpayne@69: /* UnpackTupleError */ jpayne@69: static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { jpayne@69: if (t == Py_None) { jpayne@69: __Pyx_RaiseNoneNotIterableError(); jpayne@69: } else if (PyTuple_GET_SIZE(t) < index) { jpayne@69: __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); jpayne@69: } else { jpayne@69: __Pyx_RaiseTooManyValuesError(index); jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* UnpackTuple2 */ jpayne@69: static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( jpayne@69: PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { jpayne@69: PyObject *value1 = NULL, *value2 = NULL; jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; jpayne@69: value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; jpayne@69: #else jpayne@69: value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); jpayne@69: value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); jpayne@69: #endif jpayne@69: if (decref_tuple) { jpayne@69: Py_DECREF(tuple); jpayne@69: } jpayne@69: *pvalue1 = value1; jpayne@69: *pvalue2 = value2; jpayne@69: return 0; jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: bad: jpayne@69: Py_XDECREF(value1); jpayne@69: Py_XDECREF(value2); jpayne@69: if (decref_tuple) { Py_XDECREF(tuple); } jpayne@69: return -1; jpayne@69: #endif jpayne@69: } jpayne@69: static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, jpayne@69: int has_known_size, int decref_tuple) { jpayne@69: Py_ssize_t index; jpayne@69: PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; jpayne@69: iternextfunc iternext; jpayne@69: iter = PyObject_GetIter(tuple); jpayne@69: if (unlikely(!iter)) goto bad; jpayne@69: if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } jpayne@69: iternext = __Pyx_PyObject_GetIterNextFunc(iter); jpayne@69: value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } jpayne@69: value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } jpayne@69: if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; jpayne@69: Py_DECREF(iter); jpayne@69: *pvalue1 = value1; jpayne@69: *pvalue2 = value2; jpayne@69: return 0; jpayne@69: unpacking_failed: jpayne@69: if (!has_known_size && __Pyx_IterFinish() == 0) jpayne@69: __Pyx_RaiseNeedMoreValuesError(index); jpayne@69: bad: jpayne@69: Py_XDECREF(iter); jpayne@69: Py_XDECREF(value1); jpayne@69: Py_XDECREF(value2); jpayne@69: if (decref_tuple) { Py_XDECREF(tuple); } jpayne@69: return -1; jpayne@69: } jpayne@69: jpayne@69: /* dict_iter */ jpayne@69: #if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 jpayne@69: #include jpayne@69: #endif jpayne@69: static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, jpayne@69: Py_ssize_t* p_orig_length, int* p_source_is_dict) { jpayne@69: is_dict = is_dict || likely(PyDict_CheckExact(iterable)); jpayne@69: *p_source_is_dict = is_dict; jpayne@69: if (is_dict) { jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: *p_orig_length = PyDict_Size(iterable); jpayne@69: Py_INCREF(iterable); jpayne@69: return iterable; jpayne@69: #elif PY_MAJOR_VERSION >= 3 jpayne@69: static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; jpayne@69: PyObject **pp = NULL; jpayne@69: if (method_name) { jpayne@69: const char *name = PyUnicode_AsUTF8(method_name); jpayne@69: if (strcmp(name, "iteritems") == 0) pp = &py_items; jpayne@69: else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; jpayne@69: else if (strcmp(name, "itervalues") == 0) pp = &py_values; jpayne@69: if (pp) { jpayne@69: if (!*pp) { jpayne@69: *pp = PyUnicode_FromString(name + 4); jpayne@69: if (!*pp) jpayne@69: return NULL; jpayne@69: } jpayne@69: method_name = *pp; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: *p_orig_length = 0; jpayne@69: if (method_name) { jpayne@69: PyObject* iter; jpayne@69: iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); jpayne@69: if (!iterable) jpayne@69: return NULL; jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) jpayne@69: return iterable; jpayne@69: #endif jpayne@69: iter = PyObject_GetIter(iterable); jpayne@69: Py_DECREF(iterable); jpayne@69: return iter; jpayne@69: } jpayne@69: return PyObject_GetIter(iterable); jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx_dict_iter_next( jpayne@69: PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, jpayne@69: PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { jpayne@69: PyObject* next_item; jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: if (source_is_dict) { jpayne@69: PyObject *key, *value; jpayne@69: if (unlikely(orig_length != PyDict_Size(iter_obj))) { jpayne@69: PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); jpayne@69: return -1; jpayne@69: } jpayne@69: if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { jpayne@69: return 0; jpayne@69: } jpayne@69: if (pitem) { jpayne@69: PyObject* tuple = PyTuple_New(2); jpayne@69: if (unlikely(!tuple)) { jpayne@69: return -1; jpayne@69: } jpayne@69: Py_INCREF(key); jpayne@69: Py_INCREF(value); jpayne@69: PyTuple_SET_ITEM(tuple, 0, key); jpayne@69: PyTuple_SET_ITEM(tuple, 1, value); jpayne@69: *pitem = tuple; jpayne@69: } else { jpayne@69: if (pkey) { jpayne@69: Py_INCREF(key); jpayne@69: *pkey = key; jpayne@69: } jpayne@69: if (pvalue) { jpayne@69: Py_INCREF(value); jpayne@69: *pvalue = value; jpayne@69: } jpayne@69: } jpayne@69: return 1; jpayne@69: } else if (PyTuple_CheckExact(iter_obj)) { jpayne@69: Py_ssize_t pos = *ppos; jpayne@69: if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; jpayne@69: *ppos = pos + 1; jpayne@69: next_item = PyTuple_GET_ITEM(iter_obj, pos); jpayne@69: Py_INCREF(next_item); jpayne@69: } else if (PyList_CheckExact(iter_obj)) { jpayne@69: Py_ssize_t pos = *ppos; jpayne@69: if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; jpayne@69: *ppos = pos + 1; jpayne@69: next_item = PyList_GET_ITEM(iter_obj, pos); jpayne@69: Py_INCREF(next_item); jpayne@69: } else jpayne@69: #endif jpayne@69: { jpayne@69: next_item = PyIter_Next(iter_obj); jpayne@69: if (unlikely(!next_item)) { jpayne@69: return __Pyx_IterFinish(); jpayne@69: } jpayne@69: } jpayne@69: if (pitem) { jpayne@69: *pitem = next_item; jpayne@69: } else if (pkey && pvalue) { jpayne@69: if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) jpayne@69: return -1; jpayne@69: } else if (pkey) { jpayne@69: *pkey = next_item; jpayne@69: } else { jpayne@69: *pvalue = next_item; jpayne@69: } jpayne@69: return 1; jpayne@69: } jpayne@69: jpayne@69: /* PyObjectSetAttrStr */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { jpayne@69: PyTypeObject* tp = Py_TYPE(obj); jpayne@69: if (likely(tp->tp_setattro)) jpayne@69: return tp->tp_setattro(obj, attr_name, value); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(tp->tp_setattr)) jpayne@69: return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); jpayne@69: #endif jpayne@69: return PyObject_SetAttr(obj, attr_name, value); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* unicode_tailmatch */ jpayne@69: static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings, jpayne@69: Py_ssize_t start, Py_ssize_t end, int direction) { jpayne@69: Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); jpayne@69: for (i = 0; i < count; i++) { jpayne@69: Py_ssize_t result; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substrings, i), jpayne@69: start, end, direction); jpayne@69: #else jpayne@69: PyObject* sub = PySequence_ITEM(substrings, i); jpayne@69: if (unlikely(!sub)) return -1; jpayne@69: result = PyUnicode_Tailmatch(s, sub, start, end, direction); jpayne@69: Py_DECREF(sub); jpayne@69: #endif jpayne@69: if (result) { jpayne@69: return (int) result; jpayne@69: } jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr, jpayne@69: Py_ssize_t start, Py_ssize_t end, int direction) { jpayne@69: if (unlikely(PyTuple_Check(substr))) { jpayne@69: return __Pyx_PyUnicode_TailmatchTuple(s, substr, start, end, direction); jpayne@69: } jpayne@69: return (int) PyUnicode_Tailmatch(s, substr, start, end, direction); jpayne@69: } jpayne@69: jpayne@69: /* PyUnicode_Substring */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( jpayne@69: PyObject* text, Py_ssize_t start, Py_ssize_t stop) { jpayne@69: Py_ssize_t length; jpayne@69: if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL; jpayne@69: length = __Pyx_PyUnicode_GET_LENGTH(text); jpayne@69: if (start < 0) { jpayne@69: start += length; jpayne@69: if (start < 0) jpayne@69: start = 0; jpayne@69: } jpayne@69: if (stop < 0) jpayne@69: stop += length; jpayne@69: else if (stop > length) jpayne@69: stop = length; jpayne@69: if (stop <= start) jpayne@69: return __Pyx_NewRef(__pyx_empty_unicode); jpayne@69: if (start == 0 && stop == length) jpayne@69: return __Pyx_NewRef(text); jpayne@69: #if CYTHON_PEP393_ENABLED jpayne@69: return PyUnicode_FromKindAndData(PyUnicode_KIND(text), jpayne@69: PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start); jpayne@69: #else jpayne@69: return PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(text)+start, stop-start); jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* PyIntBinop */ jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { jpayne@69: CYTHON_MAYBE_UNUSED_VAR(intval); jpayne@69: CYTHON_MAYBE_UNUSED_VAR(inplace); jpayne@69: CYTHON_UNUSED_VAR(zerodivision_check); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long x; jpayne@69: long a = PyInt_AS_LONG(op1); jpayne@69: jpayne@69: x = (long)((unsigned long)a + (unsigned long)b); jpayne@69: if (likely((x^a) >= 0 || (x^b) >= 0)) jpayne@69: return PyInt_FromLong(x); jpayne@69: return PyLong_Type.tp_as_number->nb_add(op1, op2); jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (likely(PyLong_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long a, x; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: const PY_LONG_LONG llb = intval; jpayne@69: PY_LONG_LONG lla, llx; jpayne@69: #endif jpayne@69: if (unlikely(__Pyx_PyLong_IsZero(op1))) { jpayne@69: return __Pyx_NewRef(op2); jpayne@69: } jpayne@69: if (likely(__Pyx_PyLong_IsCompact(op1))) { jpayne@69: a = __Pyx_PyLong_CompactValue(op1); jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(op1); jpayne@69: const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); jpayne@69: switch (size) { jpayne@69: case -2: jpayne@69: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { jpayne@69: lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { jpayne@69: a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { jpayne@69: lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case -3: jpayne@69: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { jpayne@69: a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case -4: jpayne@69: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { jpayne@69: a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: default: return PyLong_Type.tp_as_number->nb_add(op1, op2); jpayne@69: } jpayne@69: } jpayne@69: x = a + b; jpayne@69: return PyLong_FromLong(x); jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: long_long: jpayne@69: llx = lla + llb; jpayne@69: return PyLong_FromLongLong(llx); jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: } jpayne@69: #endif jpayne@69: if (PyFloat_CheckExact(op1)) { jpayne@69: const long b = intval; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: double a = __pyx_PyFloat_AsDouble(op1); jpayne@69: #else jpayne@69: double a = PyFloat_AS_DOUBLE(op1); jpayne@69: #endif jpayne@69: double result; jpayne@69: jpayne@69: PyFPE_START_PROTECT("add", return NULL) jpayne@69: result = ((double)a) + (double)b; jpayne@69: PyFPE_END_PROTECT(result) jpayne@69: return PyFloat_FromDouble(result); jpayne@69: } jpayne@69: return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* UnicodeConcatInPlace */ jpayne@69: # if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 jpayne@69: static int jpayne@69: __Pyx_unicode_modifiable(PyObject *unicode) jpayne@69: { jpayne@69: if (Py_REFCNT(unicode) != 1) jpayne@69: return 0; jpayne@69: if (!PyUnicode_CheckExact(unicode)) jpayne@69: return 0; jpayne@69: if (PyUnicode_CHECK_INTERNED(unicode)) jpayne@69: return 0; jpayne@69: return 1; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right jpayne@69: #if CYTHON_REFNANNY jpayne@69: , void* __pyx_refnanny jpayne@69: #endif jpayne@69: ) { jpayne@69: PyObject *left = *p_left; jpayne@69: Py_ssize_t left_len, right_len, new_len; jpayne@69: if (unlikely(__Pyx_PyUnicode_READY(left) == -1)) jpayne@69: return NULL; jpayne@69: if (unlikely(__Pyx_PyUnicode_READY(right) == -1)) jpayne@69: return NULL; jpayne@69: left_len = PyUnicode_GET_LENGTH(left); jpayne@69: if (left_len == 0) { jpayne@69: Py_INCREF(right); jpayne@69: return right; jpayne@69: } jpayne@69: right_len = PyUnicode_GET_LENGTH(right); jpayne@69: if (right_len == 0) { jpayne@69: Py_INCREF(left); jpayne@69: return left; jpayne@69: } jpayne@69: if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) { jpayne@69: PyErr_SetString(PyExc_OverflowError, jpayne@69: "strings are too large to concat"); jpayne@69: return NULL; jpayne@69: } jpayne@69: new_len = left_len + right_len; jpayne@69: if (__Pyx_unicode_modifiable(left) jpayne@69: && PyUnicode_CheckExact(right) jpayne@69: && PyUnicode_KIND(right) <= PyUnicode_KIND(left) jpayne@69: && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) { jpayne@69: int ret; jpayne@69: __Pyx_GIVEREF(*p_left); jpayne@69: ret = PyUnicode_Resize(p_left, new_len); jpayne@69: __Pyx_GOTREF(*p_left); jpayne@69: if (unlikely(ret != 0)) jpayne@69: return NULL; jpayne@69: #if PY_VERSION_HEX >= 0x030d0000 jpayne@69: if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL; jpayne@69: #else jpayne@69: _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len); jpayne@69: #endif jpayne@69: __Pyx_INCREF(*p_left); jpayne@69: __Pyx_GIVEREF(*p_left); jpayne@69: return *p_left; jpayne@69: } else { jpayne@69: return __Pyx_PyUnicode_Concat(left, right); jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* DivInt[Py_ssize_t] */ jpayne@69: static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { jpayne@69: Py_ssize_t q = a / b; jpayne@69: Py_ssize_t r = a - q*b; jpayne@69: q -= ((r != 0) & ((r ^ b) < 0)); jpayne@69: return q; jpayne@69: } jpayne@69: jpayne@69: /* SliceTupleAndList */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { jpayne@69: Py_ssize_t start = *_start, stop = *_stop, length = *_length; jpayne@69: if (start < 0) { jpayne@69: start += length; jpayne@69: if (start < 0) jpayne@69: start = 0; jpayne@69: } jpayne@69: if (stop < 0) jpayne@69: stop += length; jpayne@69: else if (stop > length) jpayne@69: stop = length; jpayne@69: *_length = stop - start; jpayne@69: *_start = start; jpayne@69: *_stop = stop; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( jpayne@69: PyObject* src, Py_ssize_t start, Py_ssize_t stop) { jpayne@69: Py_ssize_t length = PyList_GET_SIZE(src); jpayne@69: __Pyx_crop_slice(&start, &stop, &length); jpayne@69: if (length <= 0) { jpayne@69: return PyList_New(0); jpayne@69: } jpayne@69: return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length); jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( jpayne@69: PyObject* src, Py_ssize_t start, Py_ssize_t stop) { jpayne@69: Py_ssize_t length = PyTuple_GET_SIZE(src); jpayne@69: __Pyx_crop_slice(&start, &stop, &length); jpayne@69: return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyObjectCall2Args */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { jpayne@69: PyObject *args[3] = {NULL, arg1, arg2}; jpayne@69: return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); jpayne@69: } jpayne@69: jpayne@69: /* PyObjectCallMethod1 */ jpayne@69: #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) jpayne@69: static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { jpayne@69: PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); jpayne@69: Py_DECREF(method); jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { jpayne@69: #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 jpayne@69: PyObject *args[2] = {obj, arg}; jpayne@69: (void) __Pyx_PyObject_GetMethod; jpayne@69: (void) __Pyx_PyObject_CallOneArg; jpayne@69: (void) __Pyx_PyObject_Call2Args; jpayne@69: return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); jpayne@69: #else jpayne@69: PyObject *method = NULL, *result; jpayne@69: int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); jpayne@69: if (likely(is_method)) { jpayne@69: result = __Pyx_PyObject_Call2Args(method, obj, arg); jpayne@69: Py_DECREF(method); jpayne@69: return result; jpayne@69: } jpayne@69: if (unlikely(!method)) return NULL; jpayne@69: return __Pyx__PyObject_CallMethod1(method, arg); jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* append */ jpayne@69: static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { jpayne@69: if (likely(PyList_CheckExact(L))) { jpayne@69: if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; jpayne@69: } else { jpayne@69: PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); jpayne@69: if (unlikely(!retval)) jpayne@69: return -1; jpayne@69: Py_DECREF(retval); jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: /* PyIntBinop */ jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { jpayne@69: CYTHON_MAYBE_UNUSED_VAR(intval); jpayne@69: CYTHON_MAYBE_UNUSED_VAR(inplace); jpayne@69: CYTHON_UNUSED_VAR(zerodivision_check); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long x; jpayne@69: long a = PyInt_AS_LONG(op1); jpayne@69: jpayne@69: if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a)) jpayne@69: return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2); jpayne@69: else { jpayne@69: long q, r; jpayne@69: q = a / b; jpayne@69: r = a - q*b; jpayne@69: q -= ((r != 0) & ((r ^ b) < 0)); jpayne@69: x = q; jpayne@69: } jpayne@69: return PyInt_FromLong(x); jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (likely(PyLong_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long a, x; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: const PY_LONG_LONG llb = intval; jpayne@69: PY_LONG_LONG lla, llx; jpayne@69: #endif jpayne@69: if (unlikely(__Pyx_PyLong_IsZero(op1))) { jpayne@69: return __Pyx_NewRef(op1); jpayne@69: } jpayne@69: if (likely(__Pyx_PyLong_IsCompact(op1))) { jpayne@69: a = __Pyx_PyLong_CompactValue(op1); jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(op1); jpayne@69: const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); jpayne@69: switch (size) { jpayne@69: case -2: jpayne@69: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { jpayne@69: lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { jpayne@69: a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { jpayne@69: lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case -3: jpayne@69: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { jpayne@69: a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case -4: jpayne@69: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { jpayne@69: a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2); jpayne@69: } jpayne@69: } jpayne@69: { jpayne@69: long q, r; jpayne@69: q = a / b; jpayne@69: r = a - q*b; jpayne@69: q -= ((r != 0) & ((r ^ b) < 0)); jpayne@69: x = q; jpayne@69: } jpayne@69: return PyLong_FromLong(x); jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: long_long: jpayne@69: { jpayne@69: PY_LONG_LONG q, r; jpayne@69: q = lla / llb; jpayne@69: r = lla - q*llb; jpayne@69: q -= ((r != 0) & ((r ^ llb) < 0)); jpayne@69: llx = q; jpayne@69: } jpayne@69: return PyLong_FromLongLong(llx); jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: } jpayne@69: #endif jpayne@69: return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyIntBinop */ jpayne@69: #if !CYTHON_COMPILING_IN_PYPY jpayne@69: static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { jpayne@69: CYTHON_MAYBE_UNUSED_VAR(intval); jpayne@69: CYTHON_MAYBE_UNUSED_VAR(inplace); jpayne@69: CYTHON_UNUSED_VAR(zerodivision_check); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long x; jpayne@69: long a = PyInt_AS_LONG(op1); jpayne@69: jpayne@69: x = a % b; jpayne@69: x += ((x != 0) & ((x ^ b) < 0)) * b; jpayne@69: return PyInt_FromLong(x); jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (likely(PyLong_CheckExact(op1))) { jpayne@69: const long b = intval; jpayne@69: long a, x; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: const PY_LONG_LONG llb = intval; jpayne@69: PY_LONG_LONG lla, llx; jpayne@69: #endif jpayne@69: if (unlikely(__Pyx_PyLong_IsZero(op1))) { jpayne@69: return __Pyx_NewRef(op1); jpayne@69: } jpayne@69: if (likely(__Pyx_PyLong_IsCompact(op1))) { jpayne@69: a = __Pyx_PyLong_CompactValue(op1); jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(op1); jpayne@69: const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); jpayne@69: switch (size) { jpayne@69: case -2: jpayne@69: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { jpayne@69: lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 2: jpayne@69: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { jpayne@69: a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { jpayne@69: lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case -3: jpayne@69: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 3: jpayne@69: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { jpayne@69: a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case -4: jpayne@69: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { jpayne@69: a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: case 4: jpayne@69: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { jpayne@69: a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); jpayne@69: break; jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: goto long_long; jpayne@69: #endif jpayne@69: } jpayne@69: CYTHON_FALLTHROUGH; jpayne@69: default: return PyLong_Type.tp_as_number->nb_remainder(op1, op2); jpayne@69: } jpayne@69: } jpayne@69: x = a % b; jpayne@69: x += ((x != 0) & ((x ^ b) < 0)) * b; jpayne@69: return PyLong_FromLong(x); jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: long_long: jpayne@69: llx = lla % llb; jpayne@69: llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb; jpayne@69: return PyLong_FromLongLong(llx); jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: } jpayne@69: #endif jpayne@69: return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* SetItemInt */ jpayne@69: static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { jpayne@69: int r; jpayne@69: if (unlikely(!j)) return -1; jpayne@69: r = PyObject_SetItem(o, j, v); jpayne@69: Py_DECREF(j); jpayne@69: return r; jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, jpayne@69: CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS jpayne@69: if (is_list || PyList_CheckExact(o)) { jpayne@69: Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); jpayne@69: if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { jpayne@69: PyObject* old = PyList_GET_ITEM(o, n); jpayne@69: Py_INCREF(v); jpayne@69: PyList_SET_ITEM(o, n, v); jpayne@69: Py_DECREF(old); jpayne@69: return 1; jpayne@69: } jpayne@69: } else { jpayne@69: PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; jpayne@69: PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; jpayne@69: if (mm && mm->mp_ass_subscript) { jpayne@69: int r; jpayne@69: PyObject *key = PyInt_FromSsize_t(i); jpayne@69: if (unlikely(!key)) return -1; jpayne@69: r = mm->mp_ass_subscript(o, key, v); jpayne@69: Py_DECREF(key); jpayne@69: return r; jpayne@69: } jpayne@69: if (likely(sm && sm->sq_ass_item)) { jpayne@69: if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { jpayne@69: Py_ssize_t l = sm->sq_length(o); jpayne@69: if (likely(l >= 0)) { jpayne@69: i += l; jpayne@69: } else { jpayne@69: if (!PyErr_ExceptionMatches(PyExc_OverflowError)) jpayne@69: return -1; jpayne@69: PyErr_Clear(); jpayne@69: } jpayne@69: } jpayne@69: return sm->sq_ass_item(o, i, v); jpayne@69: } jpayne@69: } jpayne@69: #else jpayne@69: if (is_list || !PyMapping_Check(o)) jpayne@69: { jpayne@69: return PySequence_SetItem(o, i, v); jpayne@69: } jpayne@69: #endif jpayne@69: return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); jpayne@69: } jpayne@69: jpayne@69: /* pyobject_as_double */ jpayne@69: static double __Pyx__PyObject_AsDouble(PyObject* obj) { jpayne@69: if (PyUnicode_CheckExact(obj)) { jpayne@69: return __Pyx_PyUnicode_AsDouble(obj); jpayne@69: } else if (PyBytes_CheckExact(obj)) { jpayne@69: return __Pyx_PyBytes_AsDouble(obj); jpayne@69: } else if (PyByteArray_CheckExact(obj)) { jpayne@69: return __Pyx_PyByteArray_AsDouble(obj); jpayne@69: } else { jpayne@69: PyObject* float_value; jpayne@69: #if !CYTHON_USE_TYPE_SLOTS jpayne@69: float_value = PyNumber_Float(obj); if ((0)) goto bad; jpayne@69: (void)__Pyx_PyObject_CallOneArg; jpayne@69: #else jpayne@69: PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; jpayne@69: if (likely(nb) && likely(nb->nb_float)) { jpayne@69: float_value = nb->nb_float(obj); jpayne@69: if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { jpayne@69: __Pyx_TypeName float_value_type_name = __Pyx_PyType_GetName(Py_TYPE(float_value)); jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "__float__ returned non-float (type " __Pyx_FMT_TYPENAME ")", jpayne@69: float_value_type_name); jpayne@69: __Pyx_DECREF_TypeName(float_value_type_name); jpayne@69: Py_DECREF(float_value); jpayne@69: goto bad; jpayne@69: } jpayne@69: } else { jpayne@69: float_value = __Pyx_PyObject_CallOneArg((PyObject*)&PyFloat_Type, obj); jpayne@69: } jpayne@69: #endif jpayne@69: if (likely(float_value)) { jpayne@69: double value = PyFloat_AS_DOUBLE(float_value); jpayne@69: Py_DECREF(float_value); jpayne@69: return value; jpayne@69: } jpayne@69: } jpayne@69: bad: jpayne@69: return (double)-1; jpayne@69: } jpayne@69: jpayne@69: /* PySequenceMultiply */ jpayne@69: static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) { jpayne@69: PyObject *result, *pymul = PyInt_FromSsize_t(mul); jpayne@69: if (unlikely(!pymul)) jpayne@69: return NULL; jpayne@69: result = PyNumber_Multiply(seq, pymul); jpayne@69: Py_DECREF(pymul); jpayne@69: return result; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) { jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: PyTypeObject *type = Py_TYPE(seq); jpayne@69: if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) { jpayne@69: return type->tp_as_sequence->sq_repeat(seq, mul); jpayne@69: } else jpayne@69: #endif jpayne@69: { jpayne@69: return __Pyx_PySequence_Multiply_Generic(seq, mul); jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* pep479 */ jpayne@69: static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { jpayne@69: PyObject *exc, *val, *tb, *cur_exc; jpayne@69: __Pyx_PyThreadState_declare jpayne@69: #ifdef __Pyx_StopAsyncIteration_USED jpayne@69: int is_async_stopiteration = 0; jpayne@69: #endif jpayne@69: CYTHON_MAYBE_UNUSED_VAR(in_async_gen); jpayne@69: cur_exc = PyErr_Occurred(); jpayne@69: if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { jpayne@69: #ifdef __Pyx_StopAsyncIteration_USED jpayne@69: if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) { jpayne@69: is_async_stopiteration = 1; jpayne@69: } else jpayne@69: #endif jpayne@69: return; jpayne@69: } jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_GetException(&exc, &val, &tb); jpayne@69: Py_XDECREF(exc); jpayne@69: Py_XDECREF(val); jpayne@69: Py_XDECREF(tb); jpayne@69: PyErr_SetString(PyExc_RuntimeError, jpayne@69: #ifdef __Pyx_StopAsyncIteration_USED jpayne@69: is_async_stopiteration ? "async generator raised StopAsyncIteration" : jpayne@69: in_async_gen ? "async generator raised StopIteration" : jpayne@69: #endif jpayne@69: "generator raised StopIteration"); jpayne@69: } jpayne@69: jpayne@69: /* Import */ jpayne@69: static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { jpayne@69: PyObject *module = 0; jpayne@69: PyObject *empty_dict = 0; jpayne@69: PyObject *empty_list = 0; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PyObject *py_import; jpayne@69: py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); jpayne@69: if (unlikely(!py_import)) jpayne@69: goto bad; jpayne@69: if (!from_list) { jpayne@69: empty_list = PyList_New(0); jpayne@69: if (unlikely(!empty_list)) jpayne@69: goto bad; jpayne@69: from_list = empty_list; jpayne@69: } jpayne@69: #endif jpayne@69: empty_dict = PyDict_New(); jpayne@69: if (unlikely(!empty_dict)) jpayne@69: goto bad; jpayne@69: { jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: if (level == -1) { jpayne@69: if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { jpayne@69: module = PyImport_ImportModuleLevelObject( jpayne@69: name, __pyx_d, empty_dict, from_list, 1); jpayne@69: if (unlikely(!module)) { jpayne@69: if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) jpayne@69: goto bad; jpayne@69: PyErr_Clear(); jpayne@69: } jpayne@69: } jpayne@69: level = 0; jpayne@69: } jpayne@69: #endif jpayne@69: if (!module) { jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PyObject *py_level = PyInt_FromLong(level); jpayne@69: if (unlikely(!py_level)) jpayne@69: goto bad; jpayne@69: module = PyObject_CallFunctionObjArgs(py_import, jpayne@69: name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); jpayne@69: Py_DECREF(py_level); jpayne@69: #else jpayne@69: module = PyImport_ImportModuleLevelObject( jpayne@69: name, __pyx_d, empty_dict, from_list, level); jpayne@69: #endif jpayne@69: } jpayne@69: } jpayne@69: bad: jpayne@69: Py_XDECREF(empty_dict); jpayne@69: Py_XDECREF(empty_list); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: Py_XDECREF(py_import); jpayne@69: #endif jpayne@69: return module; jpayne@69: } jpayne@69: jpayne@69: /* ImportFrom */ jpayne@69: static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { jpayne@69: PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); jpayne@69: if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { jpayne@69: const char* module_name_str = 0; jpayne@69: PyObject* module_name = 0; jpayne@69: PyObject* module_dot = 0; jpayne@69: PyObject* full_name = 0; jpayne@69: PyErr_Clear(); jpayne@69: module_name_str = PyModule_GetName(module); jpayne@69: if (unlikely(!module_name_str)) { goto modbad; } jpayne@69: module_name = PyUnicode_FromString(module_name_str); jpayne@69: if (unlikely(!module_name)) { goto modbad; } jpayne@69: module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__5); jpayne@69: if (unlikely(!module_dot)) { goto modbad; } jpayne@69: full_name = PyUnicode_Concat(module_dot, name); jpayne@69: if (unlikely(!full_name)) { goto modbad; } jpayne@69: #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) jpayne@69: { jpayne@69: PyObject *modules = PyImport_GetModuleDict(); jpayne@69: if (unlikely(!modules)) jpayne@69: goto modbad; jpayne@69: value = PyObject_GetItem(modules, full_name); jpayne@69: } jpayne@69: #else jpayne@69: value = PyImport_GetModule(full_name); jpayne@69: #endif jpayne@69: modbad: jpayne@69: Py_XDECREF(full_name); jpayne@69: Py_XDECREF(module_dot); jpayne@69: Py_XDECREF(module_name); jpayne@69: } jpayne@69: if (unlikely(!value)) { jpayne@69: PyErr_Format(PyExc_ImportError, jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: "cannot import name %.230s", PyString_AS_STRING(name)); jpayne@69: #else jpayne@69: "cannot import name %S", name); jpayne@69: #endif jpayne@69: } jpayne@69: return value; jpayne@69: } jpayne@69: jpayne@69: /* GetAttr */ jpayne@69: static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: if (likely(PyUnicode_Check(n))) jpayne@69: #else jpayne@69: if (likely(PyString_Check(n))) jpayne@69: #endif jpayne@69: return __Pyx_PyObject_GetAttrStr(o, n); jpayne@69: #endif jpayne@69: return PyObject_GetAttr(o, n); jpayne@69: } jpayne@69: jpayne@69: /* HasAttr */ jpayne@69: static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { jpayne@69: PyObject *r; jpayne@69: if (unlikely(!__Pyx_PyBaseString_Check(n))) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "hasattr(): attribute name must be string"); jpayne@69: return -1; jpayne@69: } jpayne@69: r = __Pyx_GetAttr(o, n); jpayne@69: if (!r) { jpayne@69: PyErr_Clear(); jpayne@69: return 0; jpayne@69: } else { jpayne@69: Py_DECREF(r); jpayne@69: return 1; jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* CallNextTpDealloc */ jpayne@69: static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { jpayne@69: PyTypeObject* type = Py_TYPE(obj); jpayne@69: destructor tp_dealloc = NULL; jpayne@69: while (type && __Pyx_PyType_GetSlot(type, tp_dealloc, destructor) != current_tp_dealloc) jpayne@69: type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); jpayne@69: while (type && (tp_dealloc = __Pyx_PyType_GetSlot(type, tp_dealloc, destructor)) == current_tp_dealloc) jpayne@69: type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); jpayne@69: if (type) jpayne@69: tp_dealloc(obj); jpayne@69: } jpayne@69: jpayne@69: /* CallNextTpTraverse */ jpayne@69: static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { jpayne@69: PyTypeObject* type = Py_TYPE(obj); jpayne@69: traverseproc tp_traverse = NULL; jpayne@69: while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse) jpayne@69: type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); jpayne@69: while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse) jpayne@69: type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); jpayne@69: if (type && tp_traverse) jpayne@69: return tp_traverse(obj, v, a); jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: /* CallNextTpClear */ jpayne@69: static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { jpayne@69: PyTypeObject* type = Py_TYPE(obj); jpayne@69: inquiry tp_clear = NULL; jpayne@69: while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear) jpayne@69: type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); jpayne@69: while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear) jpayne@69: type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); jpayne@69: if (type && tp_clear) jpayne@69: tp_clear(obj); jpayne@69: } jpayne@69: jpayne@69: /* TypeImport */ jpayne@69: #ifndef __PYX_HAVE_RT_ImportType_3_0_11 jpayne@69: #define __PYX_HAVE_RT_ImportType_3_0_11 jpayne@69: static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name, jpayne@69: size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size) jpayne@69: { jpayne@69: PyObject *result = 0; jpayne@69: char warning[200]; jpayne@69: Py_ssize_t basicsize; jpayne@69: Py_ssize_t itemsize; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: PyObject *py_basicsize; jpayne@69: PyObject *py_itemsize; jpayne@69: #endif jpayne@69: result = PyObject_GetAttrString(module, class_name); jpayne@69: if (!result) jpayne@69: goto bad; jpayne@69: if (!PyType_Check(result)) { jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s.%.200s is not a type object", jpayne@69: module_name, class_name); jpayne@69: goto bad; jpayne@69: } jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: basicsize = ((PyTypeObject *)result)->tp_basicsize; jpayne@69: itemsize = ((PyTypeObject *)result)->tp_itemsize; jpayne@69: #else jpayne@69: py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); jpayne@69: if (!py_basicsize) jpayne@69: goto bad; jpayne@69: basicsize = PyLong_AsSsize_t(py_basicsize); jpayne@69: Py_DECREF(py_basicsize); jpayne@69: py_basicsize = 0; jpayne@69: if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) jpayne@69: goto bad; jpayne@69: py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); jpayne@69: if (!py_itemsize) jpayne@69: goto bad; jpayne@69: itemsize = PyLong_AsSsize_t(py_itemsize); jpayne@69: Py_DECREF(py_itemsize); jpayne@69: py_itemsize = 0; jpayne@69: if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) jpayne@69: goto bad; jpayne@69: #endif jpayne@69: if (itemsize) { jpayne@69: if (size % alignment) { jpayne@69: alignment = size % alignment; jpayne@69: } jpayne@69: if (itemsize < (Py_ssize_t)alignment) jpayne@69: itemsize = (Py_ssize_t)alignment; jpayne@69: } jpayne@69: if ((size_t)(basicsize + itemsize) < size) { jpayne@69: PyErr_Format(PyExc_ValueError, jpayne@69: "%.200s.%.200s size changed, may indicate binary incompatibility. " jpayne@69: "Expected %zd from C header, got %zd from PyObject", jpayne@69: module_name, class_name, size, basicsize+itemsize); jpayne@69: goto bad; jpayne@69: } jpayne@69: if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 && jpayne@69: ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { jpayne@69: PyErr_Format(PyExc_ValueError, jpayne@69: "%.200s.%.200s size changed, may indicate binary incompatibility. " jpayne@69: "Expected %zd from C header, got %zd-%zd from PyObject", jpayne@69: module_name, class_name, size, basicsize, basicsize+itemsize); jpayne@69: goto bad; jpayne@69: } jpayne@69: else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) { jpayne@69: PyOS_snprintf(warning, sizeof(warning), jpayne@69: "%s.%s size changed, may indicate binary incompatibility. " jpayne@69: "Expected %zd from C header, got %zd from PyObject", jpayne@69: module_name, class_name, size, basicsize); jpayne@69: if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; jpayne@69: } jpayne@69: return (PyTypeObject *)result; jpayne@69: bad: jpayne@69: Py_XDECREF(result); jpayne@69: return NULL; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* GetVTable */ jpayne@69: static void* __Pyx_GetVtable(PyTypeObject *type) { jpayne@69: void* ptr; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); jpayne@69: #else jpayne@69: PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); jpayne@69: #endif jpayne@69: if (!ob) jpayne@69: goto bad; jpayne@69: ptr = PyCapsule_GetPointer(ob, 0); jpayne@69: if (!ptr && !PyErr_Occurred()) jpayne@69: PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); jpayne@69: Py_DECREF(ob); jpayne@69: return ptr; jpayne@69: bad: jpayne@69: Py_XDECREF(ob); jpayne@69: return NULL; jpayne@69: } jpayne@69: jpayne@69: /* FixUpExtensionType */ jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { jpayne@69: #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: CYTHON_UNUSED_VAR(spec); jpayne@69: CYTHON_UNUSED_VAR(type); jpayne@69: #else jpayne@69: const PyType_Slot *slot = spec->slots; jpayne@69: while (slot && slot->slot && slot->slot != Py_tp_members) jpayne@69: slot++; jpayne@69: if (slot && slot->slot == Py_tp_members) { jpayne@69: int changed = 0; jpayne@69: #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) jpayne@69: const jpayne@69: #endif jpayne@69: PyMemberDef *memb = (PyMemberDef*) slot->pfunc; jpayne@69: while (memb && memb->name) { jpayne@69: if (memb->name[0] == '_' && memb->name[1] == '_') { jpayne@69: #if PY_VERSION_HEX < 0x030900b1 jpayne@69: if (strcmp(memb->name, "__weaklistoffset__") == 0) { jpayne@69: assert(memb->type == T_PYSSIZET); jpayne@69: assert(memb->flags == READONLY); jpayne@69: type->tp_weaklistoffset = memb->offset; jpayne@69: changed = 1; jpayne@69: } jpayne@69: else if (strcmp(memb->name, "__dictoffset__") == 0) { jpayne@69: assert(memb->type == T_PYSSIZET); jpayne@69: assert(memb->flags == READONLY); jpayne@69: type->tp_dictoffset = memb->offset; jpayne@69: changed = 1; jpayne@69: } jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { jpayne@69: assert(memb->type == T_PYSSIZET); jpayne@69: assert(memb->flags == READONLY); jpayne@69: #if PY_VERSION_HEX >= 0x030800b4 jpayne@69: type->tp_vectorcall_offset = memb->offset; jpayne@69: #else jpayne@69: type->tp_print = (printfunc) memb->offset; jpayne@69: #endif jpayne@69: changed = 1; jpayne@69: } jpayne@69: #endif jpayne@69: #else jpayne@69: if ((0)); jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON jpayne@69: else if (strcmp(memb->name, "__module__") == 0) { jpayne@69: PyObject *descr; jpayne@69: assert(memb->type == T_OBJECT); jpayne@69: assert(memb->flags == 0 || memb->flags == READONLY); jpayne@69: descr = PyDescr_NewMember(type, memb); jpayne@69: if (unlikely(!descr)) jpayne@69: return -1; jpayne@69: if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { jpayne@69: Py_DECREF(descr); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_DECREF(descr); jpayne@69: changed = 1; jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: memb++; jpayne@69: } jpayne@69: if (changed) jpayne@69: PyType_Modified(type); jpayne@69: } jpayne@69: #endif jpayne@69: return 0; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* ValidateBasesTuple */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS jpayne@69: static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { jpayne@69: Py_ssize_t i, n; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: n = PyTuple_GET_SIZE(bases); jpayne@69: #else jpayne@69: n = PyTuple_Size(bases); jpayne@69: if (n < 0) return -1; jpayne@69: #endif jpayne@69: for (i = 1; i < n; i++) jpayne@69: { jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: PyObject *b0 = PySequence_GetItem(bases, i); jpayne@69: if (!b0) return -1; jpayne@69: #elif CYTHON_ASSUME_SAFE_MACROS jpayne@69: PyObject *b0 = PyTuple_GET_ITEM(bases, i); jpayne@69: #else jpayne@69: PyObject *b0 = PyTuple_GetItem(bases, i); jpayne@69: if (!b0) return -1; jpayne@69: #endif jpayne@69: PyTypeObject *b; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (PyClass_Check(b0)) jpayne@69: { jpayne@69: PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", jpayne@69: PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_DECREF(b0); jpayne@69: #endif jpayne@69: return -1; jpayne@69: } jpayne@69: #endif jpayne@69: b = (PyTypeObject*) b0; jpayne@69: if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) jpayne@69: { jpayne@69: __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); jpayne@69: __Pyx_DECREF_TypeName(b_name); jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_DECREF(b0); jpayne@69: #endif jpayne@69: return -1; jpayne@69: } jpayne@69: if (dictoffset == 0) jpayne@69: { jpayne@69: Py_ssize_t b_dictoffset = 0; jpayne@69: #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY jpayne@69: b_dictoffset = b->tp_dictoffset; jpayne@69: #else jpayne@69: PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); jpayne@69: if (!py_b_dictoffset) goto dictoffset_return; jpayne@69: b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); jpayne@69: Py_DECREF(py_b_dictoffset); jpayne@69: if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; jpayne@69: #endif jpayne@69: if (b_dictoffset) { jpayne@69: { jpayne@69: __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "extension type '%.200s' has no __dict__ slot, " jpayne@69: "but base type '" __Pyx_FMT_TYPENAME "' has: " jpayne@69: "either add 'cdef dict __dict__' to the extension type " jpayne@69: "or add '__slots__ = [...]' to the base type", jpayne@69: type_name, b_name); jpayne@69: __Pyx_DECREF_TypeName(b_name); jpayne@69: } jpayne@69: #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) jpayne@69: dictoffset_return: jpayne@69: #endif jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_DECREF(b0); jpayne@69: #endif jpayne@69: return -1; jpayne@69: } jpayne@69: } jpayne@69: #if CYTHON_AVOID_BORROWED_REFS jpayne@69: Py_DECREF(b0); jpayne@69: #endif jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyType_Ready */ jpayne@69: static int __Pyx_PyType_Ready(PyTypeObject *t) { jpayne@69: #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) jpayne@69: (void)__Pyx_PyObject_CallMethod0; jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: (void)__Pyx_validate_bases_tuple; jpayne@69: #endif jpayne@69: return PyType_Ready(t); jpayne@69: #else jpayne@69: int r; jpayne@69: PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); jpayne@69: if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) jpayne@69: return -1; jpayne@69: #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) jpayne@69: { jpayne@69: int gc_was_enabled; jpayne@69: #if PY_VERSION_HEX >= 0x030A00b1 jpayne@69: gc_was_enabled = PyGC_Disable(); jpayne@69: (void)__Pyx_PyObject_CallMethod0; jpayne@69: #else jpayne@69: PyObject *ret, *py_status; jpayne@69: PyObject *gc = NULL; jpayne@69: #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) jpayne@69: gc = PyImport_GetModule(__pyx_kp_u_gc); jpayne@69: #endif jpayne@69: if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); jpayne@69: if (unlikely(!gc)) return -1; jpayne@69: py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); jpayne@69: if (unlikely(!py_status)) { jpayne@69: Py_DECREF(gc); jpayne@69: return -1; jpayne@69: } jpayne@69: gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); jpayne@69: Py_DECREF(py_status); jpayne@69: if (gc_was_enabled > 0) { jpayne@69: ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); jpayne@69: if (unlikely(!ret)) { jpayne@69: Py_DECREF(gc); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_DECREF(ret); jpayne@69: } else if (unlikely(gc_was_enabled == -1)) { jpayne@69: Py_DECREF(gc); jpayne@69: return -1; jpayne@69: } jpayne@69: #endif jpayne@69: t->tp_flags |= Py_TPFLAGS_HEAPTYPE; jpayne@69: #if PY_VERSION_HEX >= 0x030A0000 jpayne@69: t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; jpayne@69: #endif jpayne@69: #else jpayne@69: (void)__Pyx_PyObject_CallMethod0; jpayne@69: #endif jpayne@69: r = PyType_Ready(t); jpayne@69: #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) jpayne@69: t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; jpayne@69: #if PY_VERSION_HEX >= 0x030A00b1 jpayne@69: if (gc_was_enabled) jpayne@69: PyGC_Enable(); jpayne@69: #else jpayne@69: if (gc_was_enabled) { jpayne@69: PyObject *tp, *v, *tb; jpayne@69: PyErr_Fetch(&tp, &v, &tb); jpayne@69: ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); jpayne@69: if (likely(ret || r == -1)) { jpayne@69: Py_XDECREF(ret); jpayne@69: PyErr_Restore(tp, v, tb); jpayne@69: } else { jpayne@69: Py_XDECREF(tp); jpayne@69: Py_XDECREF(v); jpayne@69: Py_XDECREF(tb); jpayne@69: r = -1; jpayne@69: } jpayne@69: } jpayne@69: Py_DECREF(gc); jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: return r; jpayne@69: #endif jpayne@69: } jpayne@69: jpayne@69: /* PyObject_GenericGetAttrNoDict */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 jpayne@69: static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { jpayne@69: __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); jpayne@69: PyErr_Format(PyExc_AttributeError, jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", jpayne@69: type_name, attr_name); jpayne@69: #else jpayne@69: "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", jpayne@69: type_name, PyString_AS_STRING(attr_name)); jpayne@69: #endif jpayne@69: __Pyx_DECREF_TypeName(type_name); jpayne@69: return NULL; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { jpayne@69: PyObject *descr; jpayne@69: PyTypeObject *tp = Py_TYPE(obj); jpayne@69: if (unlikely(!PyString_Check(attr_name))) { jpayne@69: return PyObject_GenericGetAttr(obj, attr_name); jpayne@69: } jpayne@69: assert(!tp->tp_dictoffset); jpayne@69: descr = _PyType_Lookup(tp, attr_name); jpayne@69: if (unlikely(!descr)) { jpayne@69: return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); jpayne@69: } jpayne@69: Py_INCREF(descr); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) jpayne@69: #endif jpayne@69: { jpayne@69: descrgetfunc f = Py_TYPE(descr)->tp_descr_get; jpayne@69: if (unlikely(f)) { jpayne@69: PyObject *res = f(descr, obj, (PyObject *)tp); jpayne@69: Py_DECREF(descr); jpayne@69: return res; jpayne@69: } jpayne@69: } jpayne@69: return descr; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyObject_GenericGetAttr */ jpayne@69: #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 jpayne@69: static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { jpayne@69: if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { jpayne@69: return PyObject_GenericGetAttr(obj, attr_name); jpayne@69: } jpayne@69: return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* SetVTable */ jpayne@69: static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { jpayne@69: PyObject *ob = PyCapsule_New(vtable, 0, 0); jpayne@69: if (unlikely(!ob)) jpayne@69: goto bad; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) jpayne@69: #else jpayne@69: if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) jpayne@69: #endif jpayne@69: goto bad; jpayne@69: Py_DECREF(ob); jpayne@69: return 0; jpayne@69: bad: jpayne@69: Py_XDECREF(ob); jpayne@69: return -1; jpayne@69: } jpayne@69: jpayne@69: /* MergeVTables */ jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static int __Pyx_MergeVtables(PyTypeObject *type) { jpayne@69: int i; jpayne@69: void** base_vtables; jpayne@69: __Pyx_TypeName tp_base_name; jpayne@69: __Pyx_TypeName base_name; jpayne@69: void* unknown = (void*)-1; jpayne@69: PyObject* bases = type->tp_bases; jpayne@69: int base_depth = 0; jpayne@69: { jpayne@69: PyTypeObject* base = type->tp_base; jpayne@69: while (base) { jpayne@69: base_depth += 1; jpayne@69: base = base->tp_base; jpayne@69: } jpayne@69: } jpayne@69: base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); jpayne@69: base_vtables[0] = unknown; jpayne@69: for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { jpayne@69: void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); jpayne@69: if (base_vtable != NULL) { jpayne@69: int j; jpayne@69: PyTypeObject* base = type->tp_base; jpayne@69: for (j = 0; j < base_depth; j++) { jpayne@69: if (base_vtables[j] == unknown) { jpayne@69: base_vtables[j] = __Pyx_GetVtable(base); jpayne@69: base_vtables[j + 1] = unknown; jpayne@69: } jpayne@69: if (base_vtables[j] == base_vtable) { jpayne@69: break; jpayne@69: } else if (base_vtables[j] == NULL) { jpayne@69: goto bad; jpayne@69: } jpayne@69: base = base->tp_base; jpayne@69: } jpayne@69: } jpayne@69: } jpayne@69: PyErr_Clear(); jpayne@69: free(base_vtables); jpayne@69: return 0; jpayne@69: bad: jpayne@69: tp_base_name = __Pyx_PyType_GetName(type->tp_base); jpayne@69: base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); jpayne@69: __Pyx_DECREF_TypeName(tp_base_name); jpayne@69: __Pyx_DECREF_TypeName(base_name); jpayne@69: free(base_vtables); jpayne@69: return -1; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* SetupReduce */ jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { jpayne@69: int ret; jpayne@69: PyObject *name_attr; jpayne@69: name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name); jpayne@69: if (likely(name_attr)) { jpayne@69: ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); jpayne@69: } else { jpayne@69: ret = -1; jpayne@69: } jpayne@69: if (unlikely(ret < 0)) { jpayne@69: PyErr_Clear(); jpayne@69: ret = 0; jpayne@69: } jpayne@69: Py_XDECREF(name_attr); jpayne@69: return ret; jpayne@69: } jpayne@69: static int __Pyx_setup_reduce(PyObject* type_obj) { jpayne@69: int ret = 0; jpayne@69: PyObject *object_reduce = NULL; jpayne@69: PyObject *object_getstate = NULL; jpayne@69: PyObject *object_reduce_ex = NULL; jpayne@69: PyObject *reduce = NULL; jpayne@69: PyObject *reduce_ex = NULL; jpayne@69: PyObject *reduce_cython = NULL; jpayne@69: PyObject *setstate = NULL; jpayne@69: PyObject *setstate_cython = NULL; jpayne@69: PyObject *getstate = NULL; jpayne@69: #if CYTHON_USE_PYTYPE_LOOKUP jpayne@69: getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); jpayne@69: #else jpayne@69: getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); jpayne@69: if (!getstate && PyErr_Occurred()) { jpayne@69: goto __PYX_BAD; jpayne@69: } jpayne@69: #endif jpayne@69: if (getstate) { jpayne@69: #if CYTHON_USE_PYTYPE_LOOKUP jpayne@69: object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); jpayne@69: #else jpayne@69: object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); jpayne@69: if (!object_getstate && PyErr_Occurred()) { jpayne@69: goto __PYX_BAD; jpayne@69: } jpayne@69: #endif jpayne@69: if (object_getstate != getstate) { jpayne@69: goto __PYX_GOOD; jpayne@69: } jpayne@69: } jpayne@69: #if CYTHON_USE_PYTYPE_LOOKUP jpayne@69: object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; jpayne@69: #else jpayne@69: object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; jpayne@69: #endif jpayne@69: reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; jpayne@69: if (reduce_ex == object_reduce_ex) { jpayne@69: #if CYTHON_USE_PYTYPE_LOOKUP jpayne@69: object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; jpayne@69: #else jpayne@69: object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; jpayne@69: #endif jpayne@69: reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; jpayne@69: if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { jpayne@69: reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); jpayne@69: if (likely(reduce_cython)) { jpayne@69: ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; jpayne@69: ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; jpayne@69: } else if (reduce == object_reduce || PyErr_Occurred()) { jpayne@69: goto __PYX_BAD; jpayne@69: } jpayne@69: setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); jpayne@69: if (!setstate) PyErr_Clear(); jpayne@69: if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { jpayne@69: setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); jpayne@69: if (likely(setstate_cython)) { jpayne@69: ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; jpayne@69: ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; jpayne@69: } else if (!setstate || PyErr_Occurred()) { jpayne@69: goto __PYX_BAD; jpayne@69: } jpayne@69: } jpayne@69: PyType_Modified((PyTypeObject*)type_obj); jpayne@69: } jpayne@69: } jpayne@69: goto __PYX_GOOD; jpayne@69: __PYX_BAD: jpayne@69: if (!PyErr_Occurred()) { jpayne@69: __Pyx_TypeName type_obj_name = jpayne@69: __Pyx_PyType_GetName((PyTypeObject*)type_obj); jpayne@69: PyErr_Format(PyExc_RuntimeError, jpayne@69: "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); jpayne@69: __Pyx_DECREF_TypeName(type_obj_name); jpayne@69: } jpayne@69: ret = -1; jpayne@69: __PYX_GOOD: jpayne@69: #if !CYTHON_USE_PYTYPE_LOOKUP jpayne@69: Py_XDECREF(object_reduce); jpayne@69: Py_XDECREF(object_reduce_ex); jpayne@69: Py_XDECREF(object_getstate); jpayne@69: Py_XDECREF(getstate); jpayne@69: #endif jpayne@69: Py_XDECREF(reduce); jpayne@69: Py_XDECREF(reduce_ex); jpayne@69: Py_XDECREF(reduce_cython); jpayne@69: Py_XDECREF(setstate); jpayne@69: Py_XDECREF(setstate_cython); jpayne@69: return ret; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* ImportDottedModule */ jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { jpayne@69: PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; jpayne@69: if (unlikely(PyErr_Occurred())) { jpayne@69: PyErr_Clear(); jpayne@69: } jpayne@69: if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { jpayne@69: partial_name = name; jpayne@69: } else { jpayne@69: slice = PySequence_GetSlice(parts_tuple, 0, count); jpayne@69: if (unlikely(!slice)) jpayne@69: goto bad; jpayne@69: sep = PyUnicode_FromStringAndSize(".", 1); jpayne@69: if (unlikely(!sep)) jpayne@69: goto bad; jpayne@69: partial_name = PyUnicode_Join(sep, slice); jpayne@69: } jpayne@69: PyErr_Format( jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PyExc_ImportError, jpayne@69: "No module named '%s'", PyString_AS_STRING(partial_name)); jpayne@69: #else jpayne@69: #if PY_VERSION_HEX >= 0x030600B1 jpayne@69: PyExc_ModuleNotFoundError, jpayne@69: #else jpayne@69: PyExc_ImportError, jpayne@69: #endif jpayne@69: "No module named '%U'", partial_name); jpayne@69: #endif jpayne@69: bad: jpayne@69: Py_XDECREF(sep); jpayne@69: Py_XDECREF(slice); jpayne@69: Py_XDECREF(partial_name); jpayne@69: return NULL; jpayne@69: } jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { jpayne@69: PyObject *imported_module; jpayne@69: #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) jpayne@69: PyObject *modules = PyImport_GetModuleDict(); jpayne@69: if (unlikely(!modules)) jpayne@69: return NULL; jpayne@69: imported_module = __Pyx_PyDict_GetItemStr(modules, name); jpayne@69: Py_XINCREF(imported_module); jpayne@69: #else jpayne@69: imported_module = PyImport_GetModule(name); jpayne@69: #endif jpayne@69: return imported_module; jpayne@69: } jpayne@69: #endif jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { jpayne@69: Py_ssize_t i, nparts; jpayne@69: nparts = PyTuple_GET_SIZE(parts_tuple); jpayne@69: for (i=1; i < nparts && module; i++) { jpayne@69: PyObject *part, *submodule; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: part = PyTuple_GET_ITEM(parts_tuple, i); jpayne@69: #else jpayne@69: part = PySequence_ITEM(parts_tuple, i); jpayne@69: #endif jpayne@69: submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); jpayne@69: #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) jpayne@69: Py_DECREF(part); jpayne@69: #endif jpayne@69: Py_DECREF(module); jpayne@69: module = submodule; jpayne@69: } jpayne@69: if (unlikely(!module)) { jpayne@69: return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); jpayne@69: } jpayne@69: return module; jpayne@69: } jpayne@69: #endif jpayne@69: static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PyObject *module, *from_list, *star = __pyx_n_s__33; jpayne@69: CYTHON_UNUSED_VAR(parts_tuple); jpayne@69: from_list = PyList_New(1); jpayne@69: if (unlikely(!from_list)) jpayne@69: return NULL; jpayne@69: Py_INCREF(star); jpayne@69: PyList_SET_ITEM(from_list, 0, star); jpayne@69: module = __Pyx_Import(name, from_list, 0); jpayne@69: Py_DECREF(from_list); jpayne@69: return module; jpayne@69: #else jpayne@69: PyObject *imported_module; jpayne@69: PyObject *module = __Pyx_Import(name, NULL, 0); jpayne@69: if (!parts_tuple || unlikely(!module)) jpayne@69: return module; jpayne@69: imported_module = __Pyx__ImportDottedModule_Lookup(name); jpayne@69: if (likely(imported_module)) { jpayne@69: Py_DECREF(module); jpayne@69: return imported_module; jpayne@69: } jpayne@69: PyErr_Clear(); jpayne@69: return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); jpayne@69: #endif jpayne@69: } jpayne@69: static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 jpayne@69: PyObject *module = __Pyx__ImportDottedModule_Lookup(name); jpayne@69: if (likely(module)) { jpayne@69: PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); jpayne@69: if (likely(spec)) { jpayne@69: PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); jpayne@69: if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { jpayne@69: Py_DECREF(spec); jpayne@69: spec = NULL; jpayne@69: } jpayne@69: Py_XDECREF(unsafe); jpayne@69: } jpayne@69: if (likely(!spec)) { jpayne@69: PyErr_Clear(); jpayne@69: return module; jpayne@69: } jpayne@69: Py_DECREF(spec); jpayne@69: Py_DECREF(module); jpayne@69: } else if (PyErr_Occurred()) { jpayne@69: PyErr_Clear(); jpayne@69: } jpayne@69: #endif jpayne@69: return __Pyx__ImportDottedModule(name, parts_tuple); jpayne@69: } jpayne@69: jpayne@69: /* FetchSharedCythonModule */ jpayne@69: static PyObject *__Pyx_FetchSharedCythonABIModule(void) { jpayne@69: return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); jpayne@69: } jpayne@69: jpayne@69: /* FetchCommonType */ jpayne@69: static int __Pyx_VerifyCachedType(PyObject *cached_type, jpayne@69: const char *name, jpayne@69: Py_ssize_t basicsize, jpayne@69: Py_ssize_t expected_basicsize) { jpayne@69: if (!PyType_Check(cached_type)) { jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "Shared Cython type %.200s is not a type object", name); jpayne@69: return -1; jpayne@69: } jpayne@69: if (basicsize != expected_basicsize) { jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "Shared Cython type %.200s has the wrong size, try recompiling", jpayne@69: name); jpayne@69: return -1; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: #if !CYTHON_USE_TYPE_SPECS jpayne@69: static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { jpayne@69: PyObject* abi_module; jpayne@69: const char* object_name; jpayne@69: PyTypeObject *cached_type = NULL; jpayne@69: abi_module = __Pyx_FetchSharedCythonABIModule(); jpayne@69: if (!abi_module) return NULL; jpayne@69: object_name = strrchr(type->tp_name, '.'); jpayne@69: object_name = object_name ? object_name+1 : type->tp_name; jpayne@69: cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); jpayne@69: if (cached_type) { jpayne@69: if (__Pyx_VerifyCachedType( jpayne@69: (PyObject *)cached_type, jpayne@69: object_name, jpayne@69: cached_type->tp_basicsize, jpayne@69: type->tp_basicsize) < 0) { jpayne@69: goto bad; jpayne@69: } jpayne@69: goto done; jpayne@69: } jpayne@69: if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; jpayne@69: PyErr_Clear(); jpayne@69: if (PyType_Ready(type) < 0) goto bad; jpayne@69: if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) jpayne@69: goto bad; jpayne@69: Py_INCREF(type); jpayne@69: cached_type = type; jpayne@69: done: jpayne@69: Py_DECREF(abi_module); jpayne@69: return cached_type; jpayne@69: bad: jpayne@69: Py_XDECREF(cached_type); jpayne@69: cached_type = NULL; jpayne@69: goto done; jpayne@69: } jpayne@69: #else jpayne@69: static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { jpayne@69: PyObject *abi_module, *cached_type = NULL; jpayne@69: const char* object_name = strrchr(spec->name, '.'); jpayne@69: object_name = object_name ? object_name+1 : spec->name; jpayne@69: abi_module = __Pyx_FetchSharedCythonABIModule(); jpayne@69: if (!abi_module) return NULL; jpayne@69: cached_type = PyObject_GetAttrString(abi_module, object_name); jpayne@69: if (cached_type) { jpayne@69: Py_ssize_t basicsize; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: PyObject *py_basicsize; jpayne@69: py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); jpayne@69: if (unlikely(!py_basicsize)) goto bad; jpayne@69: basicsize = PyLong_AsSsize_t(py_basicsize); jpayne@69: Py_DECREF(py_basicsize); jpayne@69: py_basicsize = 0; jpayne@69: if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; jpayne@69: #else jpayne@69: basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; jpayne@69: #endif jpayne@69: if (__Pyx_VerifyCachedType( jpayne@69: cached_type, jpayne@69: object_name, jpayne@69: basicsize, jpayne@69: spec->basicsize) < 0) { jpayne@69: goto bad; jpayne@69: } jpayne@69: goto done; jpayne@69: } jpayne@69: if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; jpayne@69: PyErr_Clear(); jpayne@69: CYTHON_UNUSED_VAR(module); jpayne@69: cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); jpayne@69: if (unlikely(!cached_type)) goto bad; jpayne@69: if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; jpayne@69: if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; jpayne@69: done: jpayne@69: Py_DECREF(abi_module); jpayne@69: assert(cached_type == NULL || PyType_Check(cached_type)); jpayne@69: return (PyTypeObject *) cached_type; jpayne@69: bad: jpayne@69: Py_XDECREF(cached_type); jpayne@69: cached_type = NULL; jpayne@69: goto done; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* PyVectorcallFastCallDict */ jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) jpayne@69: { jpayne@69: PyObject *res = NULL; jpayne@69: PyObject *kwnames; jpayne@69: PyObject **newargs; jpayne@69: PyObject **kwvalues; jpayne@69: Py_ssize_t i, pos; jpayne@69: size_t j; jpayne@69: PyObject *key, *value; jpayne@69: unsigned long keys_are_strings; jpayne@69: Py_ssize_t nkw = PyDict_GET_SIZE(kw); jpayne@69: newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); jpayne@69: if (unlikely(newargs == NULL)) { jpayne@69: PyErr_NoMemory(); jpayne@69: return NULL; jpayne@69: } jpayne@69: for (j = 0; j < nargs; j++) newargs[j] = args[j]; jpayne@69: kwnames = PyTuple_New(nkw); jpayne@69: if (unlikely(kwnames == NULL)) { jpayne@69: PyMem_Free(newargs); jpayne@69: return NULL; jpayne@69: } jpayne@69: kwvalues = newargs + nargs; jpayne@69: pos = i = 0; jpayne@69: keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; jpayne@69: while (PyDict_Next(kw, &pos, &key, &value)) { jpayne@69: keys_are_strings &= Py_TYPE(key)->tp_flags; jpayne@69: Py_INCREF(key); jpayne@69: Py_INCREF(value); jpayne@69: PyTuple_SET_ITEM(kwnames, i, key); jpayne@69: kwvalues[i] = value; jpayne@69: i++; jpayne@69: } jpayne@69: if (unlikely(!keys_are_strings)) { jpayne@69: PyErr_SetString(PyExc_TypeError, "keywords must be strings"); jpayne@69: goto cleanup; jpayne@69: } jpayne@69: res = vc(func, newargs, nargs, kwnames); jpayne@69: cleanup: jpayne@69: Py_DECREF(kwnames); jpayne@69: for (i = 0; i < nkw; i++) jpayne@69: Py_DECREF(kwvalues[i]); jpayne@69: PyMem_Free(newargs); jpayne@69: return res; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) jpayne@69: { jpayne@69: if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { jpayne@69: return vc(func, args, nargs, NULL); jpayne@69: } jpayne@69: return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* CythonFunctionShared */ jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { jpayne@69: if (__Pyx_CyFunction_Check(func)) { jpayne@69: return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; jpayne@69: } else if (PyCFunction_Check(func)) { jpayne@69: return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: #else jpayne@69: static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { jpayne@69: return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; jpayne@69: } jpayne@69: #endif jpayne@69: static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { jpayne@69: #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: __Pyx_Py_XDECREF_SET( jpayne@69: __Pyx_CyFunction_GetClassObj(f), jpayne@69: ((classobj) ? __Pyx_NewRef(classobj) : NULL)); jpayne@69: #else jpayne@69: __Pyx_Py_XDECREF_SET( jpayne@69: ((PyCMethodObject *) (f))->mm_class, jpayne@69: (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); jpayne@69: #endif jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(closure); jpayne@69: if (unlikely(op->func_doc == NULL)) { jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); jpayne@69: if (unlikely(!op->func_doc)) return NULL; jpayne@69: #else jpayne@69: if (((PyCFunctionObject*)op)->m_ml->ml_doc) { jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); jpayne@69: #else jpayne@69: op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); jpayne@69: #endif jpayne@69: if (unlikely(op->func_doc == NULL)) jpayne@69: return NULL; jpayne@69: } else { jpayne@69: Py_INCREF(Py_None); jpayne@69: return Py_None; jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: Py_INCREF(op->func_doc); jpayne@69: return op->func_doc; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (value == NULL) { jpayne@69: value = Py_None; jpayne@69: } jpayne@69: Py_INCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(op->func_doc, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (unlikely(op->func_name == NULL)) { jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: op->func_name = PyObject_GetAttrString(op->func, "__name__"); jpayne@69: #elif PY_MAJOR_VERSION >= 3 jpayne@69: op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); jpayne@69: #else jpayne@69: op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); jpayne@69: #endif jpayne@69: if (unlikely(op->func_name == NULL)) jpayne@69: return NULL; jpayne@69: } jpayne@69: Py_INCREF(op->func_name); jpayne@69: return op->func_name; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: if (unlikely(value == NULL || !PyUnicode_Check(value))) jpayne@69: #else jpayne@69: if (unlikely(value == NULL || !PyString_Check(value))) jpayne@69: #endif jpayne@69: { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "__name__ must be set to a string object"); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_INCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(op->func_name, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: Py_INCREF(op->func_qualname); jpayne@69: return op->func_qualname; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: if (unlikely(value == NULL || !PyUnicode_Check(value))) jpayne@69: #else jpayne@69: if (unlikely(value == NULL || !PyString_Check(value))) jpayne@69: #endif jpayne@69: { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "__qualname__ must be set to a string object"); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_INCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(op->func_qualname, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (unlikely(op->func_dict == NULL)) { jpayne@69: op->func_dict = PyDict_New(); jpayne@69: if (unlikely(op->func_dict == NULL)) jpayne@69: return NULL; jpayne@69: } jpayne@69: Py_INCREF(op->func_dict); jpayne@69: return op->func_dict; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (unlikely(value == NULL)) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "function's dictionary may not be deleted"); jpayne@69: return -1; jpayne@69: } jpayne@69: if (unlikely(!PyDict_Check(value))) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "setting function's dictionary to a non-dict"); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_INCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(op->func_dict, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: Py_INCREF(op->func_globals); jpayne@69: return op->func_globals; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(op); jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: Py_INCREF(Py_None); jpayne@69: return Py_None; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) jpayne@69: { jpayne@69: PyObject* result = (op->func_code) ? op->func_code : Py_None; jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: Py_INCREF(result); jpayne@69: return result; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { jpayne@69: int result = 0; jpayne@69: PyObject *res = op->defaults_getter((PyObject *) op); jpayne@69: if (unlikely(!res)) jpayne@69: return -1; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: op->defaults_tuple = PyTuple_GET_ITEM(res, 0); jpayne@69: Py_INCREF(op->defaults_tuple); jpayne@69: op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); jpayne@69: Py_INCREF(op->defaults_kwdict); jpayne@69: #else jpayne@69: op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); jpayne@69: if (unlikely(!op->defaults_tuple)) result = -1; jpayne@69: else { jpayne@69: op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); jpayne@69: if (unlikely(!op->defaults_kwdict)) result = -1; jpayne@69: } jpayne@69: #endif jpayne@69: Py_DECREF(res); jpayne@69: return result; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (!value) { jpayne@69: value = Py_None; jpayne@69: } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "__defaults__ must be set to a tuple object"); jpayne@69: return -1; jpayne@69: } jpayne@69: PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " jpayne@69: "currently affect the values used in function calls", 1); jpayne@69: Py_INCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { jpayne@69: PyObject* result = op->defaults_tuple; jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (unlikely(!result)) { jpayne@69: if (op->defaults_getter) { jpayne@69: if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; jpayne@69: result = op->defaults_tuple; jpayne@69: } else { jpayne@69: result = Py_None; jpayne@69: } jpayne@69: } jpayne@69: Py_INCREF(result); jpayne@69: return result; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (!value) { jpayne@69: value = Py_None; jpayne@69: } else if (unlikely(value != Py_None && !PyDict_Check(value))) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "__kwdefaults__ must be set to a dict object"); jpayne@69: return -1; jpayne@69: } jpayne@69: PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " jpayne@69: "currently affect the values used in function calls", 1); jpayne@69: Py_INCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { jpayne@69: PyObject* result = op->defaults_kwdict; jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (unlikely(!result)) { jpayne@69: if (op->defaults_getter) { jpayne@69: if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; jpayne@69: result = op->defaults_kwdict; jpayne@69: } else { jpayne@69: result = Py_None; jpayne@69: } jpayne@69: } jpayne@69: Py_INCREF(result); jpayne@69: return result; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (!value || value == Py_None) { jpayne@69: value = NULL; jpayne@69: } else if (unlikely(!PyDict_Check(value))) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "__annotations__ must be set to a dict object"); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_XINCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(op->func_annotations, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { jpayne@69: PyObject* result = op->func_annotations; jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (unlikely(!result)) { jpayne@69: result = PyDict_New(); jpayne@69: if (unlikely(!result)) return NULL; jpayne@69: op->func_annotations = result; jpayne@69: } jpayne@69: Py_INCREF(result); jpayne@69: return result; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { jpayne@69: int is_coroutine; jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (op->func_is_coroutine) { jpayne@69: return __Pyx_NewRef(op->func_is_coroutine); jpayne@69: } jpayne@69: is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; jpayne@69: #if PY_VERSION_HEX >= 0x03050000 jpayne@69: if (is_coroutine) { jpayne@69: PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; jpayne@69: fromlist = PyList_New(1); jpayne@69: if (unlikely(!fromlist)) return NULL; jpayne@69: Py_INCREF(marker); jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: PyList_SET_ITEM(fromlist, 0, marker); jpayne@69: #else jpayne@69: if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { jpayne@69: Py_DECREF(marker); jpayne@69: Py_DECREF(fromlist); jpayne@69: return NULL; jpayne@69: } jpayne@69: #endif jpayne@69: module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); jpayne@69: Py_DECREF(fromlist); jpayne@69: if (unlikely(!module)) goto ignore; jpayne@69: op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); jpayne@69: Py_DECREF(module); jpayne@69: if (likely(op->func_is_coroutine)) { jpayne@69: return __Pyx_NewRef(op->func_is_coroutine); jpayne@69: } jpayne@69: ignore: jpayne@69: PyErr_Clear(); jpayne@69: } jpayne@69: #endif jpayne@69: op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); jpayne@69: return __Pyx_NewRef(op->func_is_coroutine); jpayne@69: } jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: return PyObject_GetAttrString(op->func, "__module__"); jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: return PyObject_SetAttrString(op->func, "__module__", value); jpayne@69: } jpayne@69: #endif jpayne@69: static PyGetSetDef __pyx_CyFunction_getsets[] = { jpayne@69: {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, jpayne@69: {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, jpayne@69: {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, jpayne@69: {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, jpayne@69: {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, jpayne@69: {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, jpayne@69: {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, jpayne@69: {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, jpayne@69: {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, jpayne@69: {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, jpayne@69: {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, jpayne@69: {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, jpayne@69: {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, jpayne@69: {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, jpayne@69: {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, jpayne@69: {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, jpayne@69: {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, jpayne@69: {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, jpayne@69: #endif jpayne@69: {0, 0, 0, 0, 0} jpayne@69: }; jpayne@69: static PyMemberDef __pyx_CyFunction_members[] = { jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, jpayne@69: #endif jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: #if CYTHON_BACKPORT_VECTORCALL jpayne@69: {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, jpayne@69: #else jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, jpayne@69: #endif jpayne@69: #endif jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, jpayne@69: #else jpayne@69: {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, jpayne@69: #endif jpayne@69: #endif jpayne@69: {0, 0, 0, 0, 0} jpayne@69: }; jpayne@69: static PyObject * jpayne@69: __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(args); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: Py_INCREF(m->func_qualname); jpayne@69: return m->func_qualname; jpayne@69: #else jpayne@69: return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); jpayne@69: #endif jpayne@69: } jpayne@69: static PyMethodDef __pyx_CyFunction_methods[] = { jpayne@69: {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, jpayne@69: {0, 0, 0, 0} jpayne@69: }; jpayne@69: #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) jpayne@69: #else jpayne@69: #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) jpayne@69: #endif jpayne@69: static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, jpayne@69: PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: PyCFunctionObject *cf = (PyCFunctionObject*) op; jpayne@69: #endif jpayne@69: if (unlikely(op == NULL)) jpayne@69: return NULL; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); jpayne@69: if (unlikely(!op->func)) return NULL; jpayne@69: #endif jpayne@69: op->flags = flags; jpayne@69: __Pyx_CyFunction_weakreflist(op) = NULL; jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: cf->m_ml = ml; jpayne@69: cf->m_self = (PyObject *) op; jpayne@69: #endif jpayne@69: Py_XINCREF(closure); jpayne@69: op->func_closure = closure; jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: Py_XINCREF(module); jpayne@69: cf->m_module = module; jpayne@69: #endif jpayne@69: op->func_dict = NULL; jpayne@69: op->func_name = NULL; jpayne@69: Py_INCREF(qualname); jpayne@69: op->func_qualname = qualname; jpayne@69: op->func_doc = NULL; jpayne@69: #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API jpayne@69: op->func_classobj = NULL; jpayne@69: #else jpayne@69: ((PyCMethodObject*)op)->mm_class = NULL; jpayne@69: #endif jpayne@69: op->func_globals = globals; jpayne@69: Py_INCREF(op->func_globals); jpayne@69: Py_XINCREF(code); jpayne@69: op->func_code = code; jpayne@69: op->defaults_pyobjects = 0; jpayne@69: op->defaults_size = 0; jpayne@69: op->defaults = NULL; jpayne@69: op->defaults_tuple = NULL; jpayne@69: op->defaults_kwdict = NULL; jpayne@69: op->defaults_getter = NULL; jpayne@69: op->func_annotations = NULL; jpayne@69: op->func_is_coroutine = NULL; jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { jpayne@69: case METH_NOARGS: jpayne@69: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; jpayne@69: break; jpayne@69: case METH_O: jpayne@69: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; jpayne@69: break; jpayne@69: case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: jpayne@69: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; jpayne@69: break; jpayne@69: case METH_FASTCALL | METH_KEYWORDS: jpayne@69: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; jpayne@69: break; jpayne@69: case METH_VARARGS | METH_KEYWORDS: jpayne@69: __Pyx_CyFunction_func_vectorcall(op) = NULL; jpayne@69: break; jpayne@69: default: jpayne@69: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); jpayne@69: Py_DECREF(op); jpayne@69: return NULL; jpayne@69: } jpayne@69: #endif jpayne@69: return (PyObject *) op; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) jpayne@69: { jpayne@69: Py_CLEAR(m->func_closure); jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: Py_CLEAR(m->func); jpayne@69: #else jpayne@69: Py_CLEAR(((PyCFunctionObject*)m)->m_module); jpayne@69: #endif jpayne@69: Py_CLEAR(m->func_dict); jpayne@69: Py_CLEAR(m->func_name); jpayne@69: Py_CLEAR(m->func_qualname); jpayne@69: Py_CLEAR(m->func_doc); jpayne@69: Py_CLEAR(m->func_globals); jpayne@69: Py_CLEAR(m->func_code); jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #if PY_VERSION_HEX < 0x030900B1 jpayne@69: Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); jpayne@69: #else jpayne@69: { jpayne@69: PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; jpayne@69: ((PyCMethodObject *) (m))->mm_class = NULL; jpayne@69: Py_XDECREF(cls); jpayne@69: } jpayne@69: #endif jpayne@69: #endif jpayne@69: Py_CLEAR(m->defaults_tuple); jpayne@69: Py_CLEAR(m->defaults_kwdict); jpayne@69: Py_CLEAR(m->func_annotations); jpayne@69: Py_CLEAR(m->func_is_coroutine); jpayne@69: if (m->defaults) { jpayne@69: PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); jpayne@69: int i; jpayne@69: for (i = 0; i < m->defaults_pyobjects; i++) jpayne@69: Py_XDECREF(pydefaults[i]); jpayne@69: PyObject_Free(m->defaults); jpayne@69: m->defaults = NULL; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) jpayne@69: { jpayne@69: if (__Pyx_CyFunction_weakreflist(m) != NULL) jpayne@69: PyObject_ClearWeakRefs((PyObject *) m); jpayne@69: __Pyx_CyFunction_clear(m); jpayne@69: __Pyx_PyHeapTypeObject_GC_Del(m); jpayne@69: } jpayne@69: static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) jpayne@69: { jpayne@69: PyObject_GC_UnTrack(m); jpayne@69: __Pyx__CyFunction_dealloc(m); jpayne@69: } jpayne@69: static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) jpayne@69: { jpayne@69: Py_VISIT(m->func_closure); jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: Py_VISIT(m->func); jpayne@69: #else jpayne@69: Py_VISIT(((PyCFunctionObject*)m)->m_module); jpayne@69: #endif jpayne@69: Py_VISIT(m->func_dict); jpayne@69: Py_VISIT(m->func_name); jpayne@69: Py_VISIT(m->func_qualname); jpayne@69: Py_VISIT(m->func_doc); jpayne@69: Py_VISIT(m->func_globals); jpayne@69: Py_VISIT(m->func_code); jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); jpayne@69: #endif jpayne@69: Py_VISIT(m->defaults_tuple); jpayne@69: Py_VISIT(m->defaults_kwdict); jpayne@69: Py_VISIT(m->func_is_coroutine); jpayne@69: if (m->defaults) { jpayne@69: PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); jpayne@69: int i; jpayne@69: for (i = 0; i < m->defaults_pyobjects; i++) jpayne@69: Py_VISIT(pydefaults[i]); jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject* jpayne@69: __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) jpayne@69: { jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: return PyUnicode_FromFormat("", jpayne@69: op->func_qualname, (void *)op); jpayne@69: #else jpayne@69: return PyString_FromFormat("", jpayne@69: PyString_AsString(op->func_qualname), (void *)op); jpayne@69: #endif jpayne@69: } jpayne@69: static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: PyObject *f = ((__pyx_CyFunctionObject*)func)->func; jpayne@69: PyObject *py_name = NULL; jpayne@69: PyCFunction meth; jpayne@69: int flags; jpayne@69: meth = PyCFunction_GetFunction(f); jpayne@69: if (unlikely(!meth)) return NULL; jpayne@69: flags = PyCFunction_GetFlags(f); jpayne@69: if (unlikely(flags < 0)) return NULL; jpayne@69: #else jpayne@69: PyCFunctionObject* f = (PyCFunctionObject*)func; jpayne@69: PyCFunction meth = f->m_ml->ml_meth; jpayne@69: int flags = f->m_ml->ml_flags; jpayne@69: #endif jpayne@69: Py_ssize_t size; jpayne@69: switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { jpayne@69: case METH_VARARGS: jpayne@69: if (likely(kw == NULL || PyDict_Size(kw) == 0)) jpayne@69: return (*meth)(self, arg); jpayne@69: break; jpayne@69: case METH_VARARGS | METH_KEYWORDS: jpayne@69: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); jpayne@69: case METH_NOARGS: jpayne@69: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: size = PyTuple_GET_SIZE(arg); jpayne@69: #else jpayne@69: size = PyTuple_Size(arg); jpayne@69: if (unlikely(size < 0)) return NULL; jpayne@69: #endif jpayne@69: if (likely(size == 0)) jpayne@69: return (*meth)(self, NULL); jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); jpayne@69: if (!py_name) return NULL; jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", jpayne@69: py_name, size); jpayne@69: Py_DECREF(py_name); jpayne@69: #else jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", jpayne@69: f->m_ml->ml_name, size); jpayne@69: #endif jpayne@69: return NULL; jpayne@69: } jpayne@69: break; jpayne@69: case METH_O: jpayne@69: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: size = PyTuple_GET_SIZE(arg); jpayne@69: #else jpayne@69: size = PyTuple_Size(arg); jpayne@69: if (unlikely(size < 0)) return NULL; jpayne@69: #endif jpayne@69: if (likely(size == 1)) { jpayne@69: PyObject *result, *arg0; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: arg0 = PyTuple_GET_ITEM(arg, 0); jpayne@69: #else jpayne@69: arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; jpayne@69: #endif jpayne@69: result = (*meth)(self, arg0); jpayne@69: #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) jpayne@69: Py_DECREF(arg0); jpayne@69: #endif jpayne@69: return result; jpayne@69: } jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); jpayne@69: if (!py_name) return NULL; jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", jpayne@69: py_name, size); jpayne@69: Py_DECREF(py_name); jpayne@69: #else jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", jpayne@69: f->m_ml->ml_name, size); jpayne@69: #endif jpayne@69: return NULL; jpayne@69: } jpayne@69: break; jpayne@69: default: jpayne@69: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); jpayne@69: return NULL; jpayne@69: } jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); jpayne@69: if (!py_name) return NULL; jpayne@69: PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", jpayne@69: py_name); jpayne@69: Py_DECREF(py_name); jpayne@69: #else jpayne@69: PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", jpayne@69: f->m_ml->ml_name); jpayne@69: #endif jpayne@69: return NULL; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { jpayne@69: PyObject *self, *result; jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); jpayne@69: if (unlikely(!self) && PyErr_Occurred()) return NULL; jpayne@69: #else jpayne@69: self = ((PyCFunctionObject*)func)->m_self; jpayne@69: #endif jpayne@69: result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); jpayne@69: return result; jpayne@69: } jpayne@69: static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { jpayne@69: PyObject *result; jpayne@69: __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); jpayne@69: if (vc) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); jpayne@69: #else jpayne@69: (void) &__Pyx_PyVectorcall_FastCallDict; jpayne@69: return PyVectorcall_Call(func, args, kw); jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { jpayne@69: Py_ssize_t argc; jpayne@69: PyObject *new_args; jpayne@69: PyObject *self; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: argc = PyTuple_GET_SIZE(args); jpayne@69: #else jpayne@69: argc = PyTuple_Size(args); jpayne@69: if (unlikely(!argc) < 0) return NULL; jpayne@69: #endif jpayne@69: new_args = PyTuple_GetSlice(args, 1, argc); jpayne@69: if (unlikely(!new_args)) jpayne@69: return NULL; jpayne@69: self = PyTuple_GetItem(args, 0); jpayne@69: if (unlikely(!self)) { jpayne@69: Py_DECREF(new_args); jpayne@69: #if PY_MAJOR_VERSION > 2 jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "unbound method %.200S() needs an argument", jpayne@69: cyfunc->func_qualname); jpayne@69: #else jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "unbound method needs an argument"); jpayne@69: #endif jpayne@69: return NULL; jpayne@69: } jpayne@69: result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); jpayne@69: Py_DECREF(new_args); jpayne@69: } else { jpayne@69: result = __Pyx_CyFunction_Call(func, args, kw); jpayne@69: } jpayne@69: return result; jpayne@69: } jpayne@69: #if CYTHON_METH_FASTCALL jpayne@69: static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) jpayne@69: { jpayne@69: int ret = 0; jpayne@69: if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { jpayne@69: if (unlikely(nargs < 1)) { jpayne@69: PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", jpayne@69: ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); jpayne@69: return -1; jpayne@69: } jpayne@69: ret = 1; jpayne@69: } jpayne@69: if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); jpayne@69: return -1; jpayne@69: } jpayne@69: return ret; jpayne@69: } jpayne@69: static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) jpayne@69: { jpayne@69: __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; jpayne@69: PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; jpayne@69: #if CYTHON_BACKPORT_VECTORCALL jpayne@69: Py_ssize_t nargs = (Py_ssize_t)nargsf; jpayne@69: #else jpayne@69: Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); jpayne@69: #endif jpayne@69: PyObject *self; jpayne@69: switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { jpayne@69: case 1: jpayne@69: self = args[0]; jpayne@69: args += 1; jpayne@69: nargs -= 1; jpayne@69: break; jpayne@69: case 0: jpayne@69: self = ((PyCFunctionObject*)cyfunc)->m_self; jpayne@69: break; jpayne@69: default: jpayne@69: return NULL; jpayne@69: } jpayne@69: if (unlikely(nargs != 0)) { jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", jpayne@69: def->ml_name, nargs); jpayne@69: return NULL; jpayne@69: } jpayne@69: return def->ml_meth(self, NULL); jpayne@69: } jpayne@69: static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) jpayne@69: { jpayne@69: __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; jpayne@69: PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; jpayne@69: #if CYTHON_BACKPORT_VECTORCALL jpayne@69: Py_ssize_t nargs = (Py_ssize_t)nargsf; jpayne@69: #else jpayne@69: Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); jpayne@69: #endif jpayne@69: PyObject *self; jpayne@69: switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { jpayne@69: case 1: jpayne@69: self = args[0]; jpayne@69: args += 1; jpayne@69: nargs -= 1; jpayne@69: break; jpayne@69: case 0: jpayne@69: self = ((PyCFunctionObject*)cyfunc)->m_self; jpayne@69: break; jpayne@69: default: jpayne@69: return NULL; jpayne@69: } jpayne@69: if (unlikely(nargs != 1)) { jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", jpayne@69: def->ml_name, nargs); jpayne@69: return NULL; jpayne@69: } jpayne@69: return def->ml_meth(self, args[0]); jpayne@69: } jpayne@69: static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) jpayne@69: { jpayne@69: __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; jpayne@69: PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; jpayne@69: #if CYTHON_BACKPORT_VECTORCALL jpayne@69: Py_ssize_t nargs = (Py_ssize_t)nargsf; jpayne@69: #else jpayne@69: Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); jpayne@69: #endif jpayne@69: PyObject *self; jpayne@69: switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { jpayne@69: case 1: jpayne@69: self = args[0]; jpayne@69: args += 1; jpayne@69: nargs -= 1; jpayne@69: break; jpayne@69: case 0: jpayne@69: self = ((PyCFunctionObject*)cyfunc)->m_self; jpayne@69: break; jpayne@69: default: jpayne@69: return NULL; jpayne@69: } jpayne@69: return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); jpayne@69: } jpayne@69: static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) jpayne@69: { jpayne@69: __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; jpayne@69: PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; jpayne@69: PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); jpayne@69: #if CYTHON_BACKPORT_VECTORCALL jpayne@69: Py_ssize_t nargs = (Py_ssize_t)nargsf; jpayne@69: #else jpayne@69: Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); jpayne@69: #endif jpayne@69: PyObject *self; jpayne@69: switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { jpayne@69: case 1: jpayne@69: self = args[0]; jpayne@69: args += 1; jpayne@69: nargs -= 1; jpayne@69: break; jpayne@69: case 0: jpayne@69: self = ((PyCFunctionObject*)cyfunc)->m_self; jpayne@69: break; jpayne@69: default: jpayne@69: return NULL; jpayne@69: } jpayne@69: return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: static PyType_Slot __pyx_CyFunctionType_slots[] = { jpayne@69: {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, jpayne@69: {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, jpayne@69: {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, jpayne@69: {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, jpayne@69: {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, jpayne@69: {Py_tp_methods, (void *)__pyx_CyFunction_methods}, jpayne@69: {Py_tp_members, (void *)__pyx_CyFunction_members}, jpayne@69: {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, jpayne@69: {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, jpayne@69: {0, 0}, jpayne@69: }; jpayne@69: static PyType_Spec __pyx_CyFunctionType_spec = { jpayne@69: __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", jpayne@69: sizeof(__pyx_CyFunctionObject), jpayne@69: 0, jpayne@69: #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR jpayne@69: Py_TPFLAGS_METHOD_DESCRIPTOR | jpayne@69: #endif jpayne@69: #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) jpayne@69: _Py_TPFLAGS_HAVE_VECTORCALL | jpayne@69: #endif jpayne@69: Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, jpayne@69: __pyx_CyFunctionType_slots jpayne@69: }; jpayne@69: #else jpayne@69: static PyTypeObject __pyx_CyFunctionType_type = { jpayne@69: PyVarObject_HEAD_INIT(0, 0) jpayne@69: __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", jpayne@69: sizeof(__pyx_CyFunctionObject), jpayne@69: 0, jpayne@69: (destructor) __Pyx_CyFunction_dealloc, jpayne@69: #if !CYTHON_METH_FASTCALL jpayne@69: 0, jpayne@69: #elif CYTHON_BACKPORT_VECTORCALL jpayne@69: (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), jpayne@69: #else jpayne@69: offsetof(PyCFunctionObject, vectorcall), jpayne@69: #endif jpayne@69: 0, jpayne@69: 0, jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: 0, jpayne@69: #else jpayne@69: 0, jpayne@69: #endif jpayne@69: (reprfunc) __Pyx_CyFunction_repr, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: __Pyx_CyFunction_CallAsMethod, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR jpayne@69: Py_TPFLAGS_METHOD_DESCRIPTOR | jpayne@69: #endif jpayne@69: #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL jpayne@69: _Py_TPFLAGS_HAVE_VECTORCALL | jpayne@69: #endif jpayne@69: Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, jpayne@69: 0, jpayne@69: (traverseproc) __Pyx_CyFunction_traverse, jpayne@69: (inquiry) __Pyx_CyFunction_clear, jpayne@69: 0, jpayne@69: #if PY_VERSION_HEX < 0x030500A0 jpayne@69: offsetof(__pyx_CyFunctionObject, func_weakreflist), jpayne@69: #else jpayne@69: offsetof(PyCFunctionObject, m_weakreflist), jpayne@69: #endif jpayne@69: 0, jpayne@69: 0, jpayne@69: __pyx_CyFunction_methods, jpayne@69: __pyx_CyFunction_members, jpayne@69: __pyx_CyFunction_getsets, jpayne@69: 0, jpayne@69: 0, jpayne@69: __Pyx_PyMethod_New, jpayne@69: 0, jpayne@69: offsetof(__pyx_CyFunctionObject, func_dict), jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: #if PY_VERSION_HEX >= 0x030400a1 jpayne@69: 0, jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) jpayne@69: 0, jpayne@69: #endif jpayne@69: #if __PYX_NEED_TP_PRINT_SLOT jpayne@69: 0, jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030C0000 jpayne@69: 0, jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030d00A4 jpayne@69: 0, jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 jpayne@69: 0, jpayne@69: #endif jpayne@69: }; jpayne@69: #endif jpayne@69: static int __pyx_CyFunction_init(PyObject *module) { jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); jpayne@69: #else jpayne@69: CYTHON_UNUSED_VAR(module); jpayne@69: __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); jpayne@69: #endif jpayne@69: if (unlikely(__pyx_CyFunctionType == NULL)) { jpayne@69: return -1; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { jpayne@69: __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; jpayne@69: m->defaults = PyObject_Malloc(size); jpayne@69: if (unlikely(!m->defaults)) jpayne@69: return PyErr_NoMemory(); jpayne@69: memset(m->defaults, 0, size); jpayne@69: m->defaults_pyobjects = pyobjects; jpayne@69: m->defaults_size = size; jpayne@69: return m->defaults; jpayne@69: } jpayne@69: static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { jpayne@69: __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; jpayne@69: m->defaults_tuple = tuple; jpayne@69: Py_INCREF(tuple); jpayne@69: } jpayne@69: static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { jpayne@69: __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; jpayne@69: m->defaults_kwdict = dict; jpayne@69: Py_INCREF(dict); jpayne@69: } jpayne@69: static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { jpayne@69: __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; jpayne@69: m->func_annotations = dict; jpayne@69: Py_INCREF(dict); jpayne@69: } jpayne@69: jpayne@69: /* CythonFunction */ jpayne@69: static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, jpayne@69: PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { jpayne@69: PyObject *op = __Pyx_CyFunction_Init( jpayne@69: PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), jpayne@69: ml, flags, qualname, closure, module, globals, code jpayne@69: ); jpayne@69: if (likely(op)) { jpayne@69: PyObject_GC_Track(op); jpayne@69: } jpayne@69: return op; jpayne@69: } jpayne@69: jpayne@69: /* Py3UpdateBases */ jpayne@69: static PyObject* jpayne@69: __Pyx_PEP560_update_bases(PyObject *bases) jpayne@69: { jpayne@69: Py_ssize_t i, j, size_bases; jpayne@69: PyObject *base, *meth, *new_base, *result, *new_bases = NULL; jpayne@69: size_bases = PyTuple_GET_SIZE(bases); jpayne@69: for (i = 0; i < size_bases; i++) { jpayne@69: base = PyTuple_GET_ITEM(bases, i); jpayne@69: if (PyType_Check(base)) { jpayne@69: if (new_bases) { jpayne@69: if (PyList_Append(new_bases, base) < 0) { jpayne@69: goto error; jpayne@69: } jpayne@69: } jpayne@69: continue; jpayne@69: } jpayne@69: meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries); jpayne@69: if (!meth && PyErr_Occurred()) { jpayne@69: goto error; jpayne@69: } jpayne@69: if (!meth) { jpayne@69: if (new_bases) { jpayne@69: if (PyList_Append(new_bases, base) < 0) { jpayne@69: goto error; jpayne@69: } jpayne@69: } jpayne@69: continue; jpayne@69: } jpayne@69: new_base = __Pyx_PyObject_CallOneArg(meth, bases); jpayne@69: Py_DECREF(meth); jpayne@69: if (!new_base) { jpayne@69: goto error; jpayne@69: } jpayne@69: if (!PyTuple_Check(new_base)) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "__mro_entries__ must return a tuple"); jpayne@69: Py_DECREF(new_base); jpayne@69: goto error; jpayne@69: } jpayne@69: if (!new_bases) { jpayne@69: if (!(new_bases = PyList_New(i))) { jpayne@69: goto error; jpayne@69: } jpayne@69: for (j = 0; j < i; j++) { jpayne@69: base = PyTuple_GET_ITEM(bases, j); jpayne@69: PyList_SET_ITEM(new_bases, j, base); jpayne@69: Py_INCREF(base); jpayne@69: } jpayne@69: } jpayne@69: j = PyList_GET_SIZE(new_bases); jpayne@69: if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { jpayne@69: goto error; jpayne@69: } jpayne@69: Py_DECREF(new_base); jpayne@69: } jpayne@69: if (!new_bases) { jpayne@69: Py_INCREF(bases); jpayne@69: return bases; jpayne@69: } jpayne@69: result = PyList_AsTuple(new_bases); jpayne@69: Py_DECREF(new_bases); jpayne@69: return result; jpayne@69: error: jpayne@69: Py_XDECREF(new_bases); jpayne@69: return NULL; jpayne@69: } jpayne@69: jpayne@69: /* CalculateMetaclass */ jpayne@69: static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { jpayne@69: Py_ssize_t i, nbases; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: nbases = PyTuple_GET_SIZE(bases); jpayne@69: #else jpayne@69: nbases = PyTuple_Size(bases); jpayne@69: if (nbases < 0) return NULL; jpayne@69: #endif jpayne@69: for (i=0; i < nbases; i++) { jpayne@69: PyTypeObject *tmptype; jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS jpayne@69: PyObject *tmp = PyTuple_GET_ITEM(bases, i); jpayne@69: #else jpayne@69: PyObject *tmp = PyTuple_GetItem(bases, i); jpayne@69: if (!tmp) return NULL; jpayne@69: #endif jpayne@69: tmptype = Py_TYPE(tmp); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (tmptype == &PyClass_Type) jpayne@69: continue; jpayne@69: #endif jpayne@69: if (!metaclass) { jpayne@69: metaclass = tmptype; jpayne@69: continue; jpayne@69: } jpayne@69: if (PyType_IsSubtype(metaclass, tmptype)) jpayne@69: continue; jpayne@69: if (PyType_IsSubtype(tmptype, metaclass)) { jpayne@69: metaclass = tmptype; jpayne@69: continue; jpayne@69: } jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "metaclass conflict: " jpayne@69: "the metaclass of a derived class " jpayne@69: "must be a (non-strict) subclass " jpayne@69: "of the metaclasses of all its bases"); jpayne@69: return NULL; jpayne@69: } jpayne@69: if (!metaclass) { jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: metaclass = &PyClass_Type; jpayne@69: #else jpayne@69: metaclass = &PyType_Type; jpayne@69: #endif jpayne@69: } jpayne@69: Py_INCREF((PyObject*) metaclass); jpayne@69: return (PyObject*) metaclass; jpayne@69: } jpayne@69: jpayne@69: /* PyObjectLookupSpecial */ jpayne@69: #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS jpayne@69: static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { jpayne@69: PyObject *res; jpayne@69: PyTypeObject *tp = Py_TYPE(obj); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (unlikely(PyInstance_Check(obj))) jpayne@69: return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name); jpayne@69: #endif jpayne@69: res = _PyType_Lookup(tp, attr_name); jpayne@69: if (likely(res)) { jpayne@69: descrgetfunc f = Py_TYPE(res)->tp_descr_get; jpayne@69: if (!f) { jpayne@69: Py_INCREF(res); jpayne@69: } else { jpayne@69: res = f(res, obj, (PyObject *)tp); jpayne@69: } jpayne@69: } else if (with_error) { jpayne@69: PyErr_SetObject(PyExc_AttributeError, attr_name); jpayne@69: } jpayne@69: return res; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* Py3ClassCreate */ jpayne@69: static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, jpayne@69: PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { jpayne@69: PyObject *ns; jpayne@69: if (metaclass) { jpayne@69: PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare); jpayne@69: if (prep) { jpayne@69: PyObject *pargs[3] = {NULL, name, bases}; jpayne@69: ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); jpayne@69: Py_DECREF(prep); jpayne@69: } else { jpayne@69: if (unlikely(PyErr_Occurred())) jpayne@69: return NULL; jpayne@69: ns = PyDict_New(); jpayne@69: } jpayne@69: } else { jpayne@69: ns = PyDict_New(); jpayne@69: } jpayne@69: if (unlikely(!ns)) jpayne@69: return NULL; jpayne@69: if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; jpayne@69: #if PY_VERSION_HEX >= 0x03030000 jpayne@69: if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; jpayne@69: #else jpayne@69: CYTHON_MAYBE_UNUSED_VAR(qualname); jpayne@69: #endif jpayne@69: if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; jpayne@69: return ns; jpayne@69: bad: jpayne@69: Py_DECREF(ns); jpayne@69: return NULL; jpayne@69: } jpayne@69: #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS jpayne@69: static int __Pyx_SetNamesPEP487(PyObject *type_obj) { jpayne@69: PyTypeObject *type = (PyTypeObject*) type_obj; jpayne@69: PyObject *names_to_set, *key, *value, *set_name, *tmp; jpayne@69: Py_ssize_t i = 0; jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: names_to_set = PyDict_Copy(type->tp_dict); jpayne@69: #else jpayne@69: { jpayne@69: PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict); jpayne@69: names_to_set = NULL; jpayne@69: if (likely(d)) { jpayne@69: PyObject *names_to_set = PyDict_New(); jpayne@69: int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1; jpayne@69: Py_DECREF(d); jpayne@69: if (unlikely(ret < 0)) jpayne@69: Py_CLEAR(names_to_set); jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: if (unlikely(names_to_set == NULL)) jpayne@69: goto bad; jpayne@69: while (PyDict_Next(names_to_set, &i, &key, &value)) { jpayne@69: set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name); jpayne@69: if (unlikely(set_name != NULL)) { jpayne@69: tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key); jpayne@69: Py_DECREF(set_name); jpayne@69: if (unlikely(tmp == NULL)) { jpayne@69: __Pyx_TypeName value_type_name = jpayne@69: __Pyx_PyType_GetName(Py_TYPE(value)); jpayne@69: __Pyx_TypeName type_name = __Pyx_PyType_GetName(type); jpayne@69: PyErr_Format(PyExc_RuntimeError, jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'", jpayne@69: value_type_name, key, type_name); jpayne@69: #else jpayne@69: "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'", jpayne@69: value_type_name, jpayne@69: PyString_Check(key) ? PyString_AS_STRING(key) : "?", jpayne@69: type_name); jpayne@69: #endif jpayne@69: goto bad; jpayne@69: } else { jpayne@69: Py_DECREF(tmp); jpayne@69: } jpayne@69: } jpayne@69: else if (unlikely(PyErr_Occurred())) { jpayne@69: goto bad; jpayne@69: } jpayne@69: } jpayne@69: Py_DECREF(names_to_set); jpayne@69: return 0; jpayne@69: bad: jpayne@69: Py_XDECREF(names_to_set); jpayne@69: return -1; jpayne@69: } jpayne@69: static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) { jpayne@69: #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: PyTypeObject *type = (PyTypeObject*) type_obj; jpayne@69: PyObject *mro = type->tp_mro; jpayne@69: Py_ssize_t i, nbases; jpayne@69: if (unlikely(!mro)) goto done; jpayne@69: (void) &__Pyx_GetBuiltinName; jpayne@69: Py_INCREF(mro); jpayne@69: nbases = PyTuple_GET_SIZE(mro); jpayne@69: assert(PyTuple_GET_ITEM(mro, 0) == type_obj); jpayne@69: for (i = 1; i < nbases-1; i++) { jpayne@69: PyObject *base, *dict, *meth; jpayne@69: base = PyTuple_GET_ITEM(mro, i); jpayne@69: dict = ((PyTypeObject *)base)->tp_dict; jpayne@69: meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass); jpayne@69: if (unlikely(meth)) { jpayne@69: descrgetfunc f = Py_TYPE(meth)->tp_descr_get; jpayne@69: PyObject *res; jpayne@69: Py_INCREF(meth); jpayne@69: if (likely(f)) { jpayne@69: res = f(meth, NULL, type_obj); jpayne@69: Py_DECREF(meth); jpayne@69: if (unlikely(!res)) goto bad; jpayne@69: meth = res; jpayne@69: } jpayne@69: res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw); jpayne@69: Py_DECREF(meth); jpayne@69: if (unlikely(!res)) goto bad; jpayne@69: Py_DECREF(res); jpayne@69: goto done; jpayne@69: } else if (unlikely(PyErr_Occurred())) { jpayne@69: goto bad; jpayne@69: } jpayne@69: } jpayne@69: done: jpayne@69: Py_XDECREF(mro); jpayne@69: return type_obj; jpayne@69: bad: jpayne@69: Py_XDECREF(mro); jpayne@69: Py_DECREF(type_obj); jpayne@69: return NULL; jpayne@69: #else jpayne@69: PyObject *super_type, *super, *func, *res; jpayne@69: #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) jpayne@69: super_type = __Pyx_GetBuiltinName(__pyx_n_s_super); jpayne@69: #else jpayne@69: super_type = (PyObject*) &PySuper_Type; jpayne@69: (void) &__Pyx_GetBuiltinName; jpayne@69: #endif jpayne@69: super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL; jpayne@69: #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) jpayne@69: Py_XDECREF(super_type); jpayne@69: #endif jpayne@69: if (unlikely(!super)) { jpayne@69: Py_CLEAR(type_obj); jpayne@69: goto done; jpayne@69: } jpayne@69: func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass); jpayne@69: Py_DECREF(super); jpayne@69: if (likely(!func)) { jpayne@69: if (unlikely(PyErr_Occurred())) jpayne@69: Py_CLEAR(type_obj); jpayne@69: goto done; jpayne@69: } jpayne@69: res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw); jpayne@69: Py_DECREF(func); jpayne@69: if (unlikely(!res)) jpayne@69: Py_CLEAR(type_obj); jpayne@69: Py_XDECREF(res); jpayne@69: done: jpayne@69: return type_obj; jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, jpayne@69: PyObject *dict, PyObject *mkw, jpayne@69: int calculate_metaclass, int allow_py2_metaclass) { jpayne@69: PyObject *result; jpayne@69: PyObject *owned_metaclass = NULL; jpayne@69: PyObject *margs[4] = {NULL, name, bases, dict}; jpayne@69: if (allow_py2_metaclass) { jpayne@69: owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); jpayne@69: if (owned_metaclass) { jpayne@69: metaclass = owned_metaclass; jpayne@69: } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { jpayne@69: PyErr_Clear(); jpayne@69: } else { jpayne@69: return NULL; jpayne@69: } jpayne@69: } jpayne@69: if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { jpayne@69: metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); jpayne@69: Py_XDECREF(owned_metaclass); jpayne@69: if (unlikely(!metaclass)) jpayne@69: return NULL; jpayne@69: owned_metaclass = metaclass; jpayne@69: } jpayne@69: result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, jpayne@69: #if PY_VERSION_HEX < 0x030600A4 jpayne@69: (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw jpayne@69: #else jpayne@69: mkw jpayne@69: #endif jpayne@69: ); jpayne@69: Py_XDECREF(owned_metaclass); jpayne@69: #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS jpayne@69: if (likely(result) && likely(PyType_Check(result))) { jpayne@69: if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) { jpayne@69: Py_CLEAR(result); jpayne@69: } else { jpayne@69: result = __Pyx_InitSubclassPEP487(result, mkw); jpayne@69: } jpayne@69: } jpayne@69: #else jpayne@69: (void) &__Pyx_GetBuiltinName; jpayne@69: #endif jpayne@69: return result; jpayne@69: } jpayne@69: jpayne@69: /* CLineInTraceback */ jpayne@69: #ifndef CYTHON_CLINE_IN_TRACEBACK jpayne@69: static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { jpayne@69: PyObject *use_cline; jpayne@69: PyObject *ptype, *pvalue, *ptraceback; jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: PyObject **cython_runtime_dict; jpayne@69: #endif jpayne@69: CYTHON_MAYBE_UNUSED_VAR(tstate); jpayne@69: if (unlikely(!__pyx_cython_runtime)) { jpayne@69: return c_line; jpayne@69: } jpayne@69: __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); jpayne@69: if (likely(cython_runtime_dict)) { jpayne@69: __PYX_PY_DICT_LOOKUP_IF_MODIFIED( jpayne@69: use_cline, *cython_runtime_dict, jpayne@69: __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) jpayne@69: } else jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); jpayne@69: if (use_cline_obj) { jpayne@69: use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; jpayne@69: Py_DECREF(use_cline_obj); jpayne@69: } else { jpayne@69: PyErr_Clear(); jpayne@69: use_cline = NULL; jpayne@69: } jpayne@69: } jpayne@69: if (!use_cline) { jpayne@69: c_line = 0; jpayne@69: (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); jpayne@69: } jpayne@69: else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { jpayne@69: c_line = 0; jpayne@69: } jpayne@69: __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); jpayne@69: return c_line; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* CodeObjectCache */ jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { jpayne@69: int start = 0, mid = 0, end = count - 1; jpayne@69: if (end >= 0 && code_line > entries[end].code_line) { jpayne@69: return count; jpayne@69: } jpayne@69: while (start < end) { jpayne@69: mid = start + (end - start) / 2; jpayne@69: if (code_line < entries[mid].code_line) { jpayne@69: end = mid; jpayne@69: } else if (code_line > entries[mid].code_line) { jpayne@69: start = mid + 1; jpayne@69: } else { jpayne@69: return mid; jpayne@69: } jpayne@69: } jpayne@69: if (code_line <= entries[mid].code_line) { jpayne@69: return mid; jpayne@69: } else { jpayne@69: return mid + 1; jpayne@69: } jpayne@69: } jpayne@69: static PyCodeObject *__pyx_find_code_object(int code_line) { jpayne@69: PyCodeObject* code_object; jpayne@69: int pos; jpayne@69: if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { jpayne@69: return NULL; jpayne@69: } jpayne@69: pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); jpayne@69: if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { jpayne@69: return NULL; jpayne@69: } jpayne@69: code_object = __pyx_code_cache.entries[pos].code_object; jpayne@69: Py_INCREF(code_object); jpayne@69: return code_object; jpayne@69: } jpayne@69: static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { jpayne@69: int pos, i; jpayne@69: __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; jpayne@69: if (unlikely(!code_line)) { jpayne@69: return; jpayne@69: } jpayne@69: if (unlikely(!entries)) { jpayne@69: entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); jpayne@69: if (likely(entries)) { jpayne@69: __pyx_code_cache.entries = entries; jpayne@69: __pyx_code_cache.max_count = 64; jpayne@69: __pyx_code_cache.count = 1; jpayne@69: entries[0].code_line = code_line; jpayne@69: entries[0].code_object = code_object; jpayne@69: Py_INCREF(code_object); jpayne@69: } jpayne@69: return; jpayne@69: } jpayne@69: pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); jpayne@69: if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { jpayne@69: PyCodeObject* tmp = entries[pos].code_object; jpayne@69: entries[pos].code_object = code_object; jpayne@69: Py_DECREF(tmp); jpayne@69: return; jpayne@69: } jpayne@69: if (__pyx_code_cache.count == __pyx_code_cache.max_count) { jpayne@69: int new_max = __pyx_code_cache.max_count + 64; jpayne@69: entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( jpayne@69: __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); jpayne@69: if (unlikely(!entries)) { jpayne@69: return; jpayne@69: } jpayne@69: __pyx_code_cache.entries = entries; jpayne@69: __pyx_code_cache.max_count = new_max; jpayne@69: } jpayne@69: for (i=__pyx_code_cache.count; i>pos; i--) { jpayne@69: entries[i] = entries[i-1]; jpayne@69: } jpayne@69: entries[pos].code_line = code_line; jpayne@69: entries[pos].code_object = code_object; jpayne@69: __pyx_code_cache.count++; jpayne@69: Py_INCREF(code_object); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* AddTraceback */ jpayne@69: #include "compile.h" jpayne@69: #include "frameobject.h" jpayne@69: #include "traceback.h" jpayne@69: #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: #ifndef Py_BUILD_CORE jpayne@69: #define Py_BUILD_CORE 1 jpayne@69: #endif jpayne@69: #include "internal/pycore_frame.h" jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, jpayne@69: PyObject *firstlineno, PyObject *name) { jpayne@69: PyObject *replace = NULL; jpayne@69: if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; jpayne@69: if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; jpayne@69: replace = PyObject_GetAttrString(code, "replace"); jpayne@69: if (likely(replace)) { jpayne@69: PyObject *result; jpayne@69: result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); jpayne@69: Py_DECREF(replace); jpayne@69: return result; jpayne@69: } jpayne@69: PyErr_Clear(); jpayne@69: #if __PYX_LIMITED_VERSION_HEX < 0x030780000 jpayne@69: { jpayne@69: PyObject *compiled = NULL, *result = NULL; jpayne@69: if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; jpayne@69: if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; jpayne@69: compiled = Py_CompileString( jpayne@69: "out = type(code)(\n" jpayne@69: " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" jpayne@69: " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" jpayne@69: " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" jpayne@69: " code.co_lnotab)\n", "", Py_file_input); jpayne@69: if (!compiled) return NULL; jpayne@69: result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); jpayne@69: Py_DECREF(compiled); jpayne@69: if (!result) PyErr_Print(); jpayne@69: Py_DECREF(result); jpayne@69: result = PyDict_GetItemString(scratch_dict, "out"); jpayne@69: if (result) Py_INCREF(result); jpayne@69: return result; jpayne@69: } jpayne@69: #else jpayne@69: return NULL; jpayne@69: #endif jpayne@69: } jpayne@69: static void __Pyx_AddTraceback(const char *funcname, int c_line, jpayne@69: int py_line, const char *filename) { jpayne@69: PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; jpayne@69: PyObject *replace = NULL, *getframe = NULL, *frame = NULL; jpayne@69: PyObject *exc_type, *exc_value, *exc_traceback; jpayne@69: int success = 0; jpayne@69: if (c_line) { jpayne@69: (void) __pyx_cfilenm; jpayne@69: (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); jpayne@69: } jpayne@69: PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); jpayne@69: code_object = Py_CompileString("_getframe()", filename, Py_eval_input); jpayne@69: if (unlikely(!code_object)) goto bad; jpayne@69: py_py_line = PyLong_FromLong(py_line); jpayne@69: if (unlikely(!py_py_line)) goto bad; jpayne@69: py_funcname = PyUnicode_FromString(funcname); jpayne@69: if (unlikely(!py_funcname)) goto bad; jpayne@69: dict = PyDict_New(); jpayne@69: if (unlikely(!dict)) goto bad; jpayne@69: { jpayne@69: PyObject *old_code_object = code_object; jpayne@69: code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); jpayne@69: Py_DECREF(old_code_object); jpayne@69: } jpayne@69: if (unlikely(!code_object)) goto bad; jpayne@69: getframe = PySys_GetObject("_getframe"); jpayne@69: if (unlikely(!getframe)) goto bad; jpayne@69: if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; jpayne@69: frame = PyEval_EvalCode(code_object, dict, dict); jpayne@69: if (unlikely(!frame) || frame == Py_None) goto bad; jpayne@69: success = 1; jpayne@69: bad: jpayne@69: PyErr_Restore(exc_type, exc_value, exc_traceback); jpayne@69: Py_XDECREF(code_object); jpayne@69: Py_XDECREF(py_py_line); jpayne@69: Py_XDECREF(py_funcname); jpayne@69: Py_XDECREF(dict); jpayne@69: Py_XDECREF(replace); jpayne@69: if (success) { jpayne@69: PyTraceBack_Here( jpayne@69: (struct _frame*)frame); jpayne@69: } jpayne@69: Py_XDECREF(frame); jpayne@69: } jpayne@69: #else jpayne@69: static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( jpayne@69: const char *funcname, int c_line, jpayne@69: int py_line, const char *filename) { jpayne@69: PyCodeObject *py_code = NULL; jpayne@69: PyObject *py_funcname = NULL; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: PyObject *py_srcfile = NULL; jpayne@69: py_srcfile = PyString_FromString(filename); jpayne@69: if (!py_srcfile) goto bad; jpayne@69: #endif jpayne@69: if (c_line) { jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); jpayne@69: if (!py_funcname) goto bad; jpayne@69: #else jpayne@69: py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); jpayne@69: if (!py_funcname) goto bad; jpayne@69: funcname = PyUnicode_AsUTF8(py_funcname); jpayne@69: if (!funcname) goto bad; jpayne@69: #endif jpayne@69: } jpayne@69: else { jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: py_funcname = PyString_FromString(funcname); jpayne@69: if (!py_funcname) goto bad; jpayne@69: #endif jpayne@69: } jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: py_code = __Pyx_PyCode_New( jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: __pyx_empty_bytes, /*PyObject *code,*/ jpayne@69: __pyx_empty_tuple, /*PyObject *consts,*/ jpayne@69: __pyx_empty_tuple, /*PyObject *names,*/ jpayne@69: __pyx_empty_tuple, /*PyObject *varnames,*/ jpayne@69: __pyx_empty_tuple, /*PyObject *freevars,*/ jpayne@69: __pyx_empty_tuple, /*PyObject *cellvars,*/ jpayne@69: py_srcfile, /*PyObject *filename,*/ jpayne@69: py_funcname, /*PyObject *name,*/ jpayne@69: py_line, jpayne@69: __pyx_empty_bytes /*PyObject *lnotab*/ jpayne@69: ); jpayne@69: Py_DECREF(py_srcfile); jpayne@69: #else jpayne@69: py_code = PyCode_NewEmpty(filename, funcname, py_line); jpayne@69: #endif jpayne@69: Py_XDECREF(py_funcname); jpayne@69: return py_code; jpayne@69: bad: jpayne@69: Py_XDECREF(py_funcname); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: Py_XDECREF(py_srcfile); jpayne@69: #endif jpayne@69: return NULL; jpayne@69: } jpayne@69: static void __Pyx_AddTraceback(const char *funcname, int c_line, jpayne@69: int py_line, const char *filename) { jpayne@69: PyCodeObject *py_code = 0; jpayne@69: PyFrameObject *py_frame = 0; jpayne@69: PyThreadState *tstate = __Pyx_PyThreadState_Current; jpayne@69: PyObject *ptype, *pvalue, *ptraceback; jpayne@69: if (c_line) { jpayne@69: c_line = __Pyx_CLineForTraceback(tstate, c_line); jpayne@69: } jpayne@69: py_code = __pyx_find_code_object(c_line ? -c_line : py_line); jpayne@69: if (!py_code) { jpayne@69: __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); jpayne@69: py_code = __Pyx_CreateCodeObjectForTraceback( jpayne@69: funcname, c_line, py_line, filename); jpayne@69: if (!py_code) { jpayne@69: /* If the code object creation fails, then we should clear the jpayne@69: fetched exception references and propagate the new exception */ jpayne@69: Py_XDECREF(ptype); jpayne@69: Py_XDECREF(pvalue); jpayne@69: Py_XDECREF(ptraceback); jpayne@69: goto bad; jpayne@69: } jpayne@69: __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); jpayne@69: __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); jpayne@69: } jpayne@69: py_frame = PyFrame_New( jpayne@69: tstate, /*PyThreadState *tstate,*/ jpayne@69: py_code, /*PyCodeObject *code,*/ jpayne@69: __pyx_d, /*PyObject *globals,*/ jpayne@69: 0 /*PyObject *locals*/ jpayne@69: ); jpayne@69: if (!py_frame) goto bad; jpayne@69: __Pyx_PyFrame_SetLineNumber(py_frame, py_line); jpayne@69: PyTraceBack_Here(py_frame); jpayne@69: bad: jpayne@69: Py_XDECREF(py_code); jpayne@69: Py_XDECREF(py_frame); jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* CIntFromPyVerify */ jpayne@69: #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ jpayne@69: __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) jpayne@69: #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ jpayne@69: __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) jpayne@69: #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ jpayne@69: {\ jpayne@69: func_type value = func_value;\ jpayne@69: if (sizeof(target_type) < sizeof(func_type)) {\ jpayne@69: if (unlikely(value != (func_type) (target_type) value)) {\ jpayne@69: func_type zero = 0;\ jpayne@69: if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ jpayne@69: return (target_type) -1;\ jpayne@69: if (is_unsigned && unlikely(value < zero))\ jpayne@69: goto raise_neg_overflow;\ jpayne@69: else\ jpayne@69: goto raise_overflow;\ jpayne@69: }\ jpayne@69: }\ jpayne@69: return (target_type) value;\ jpayne@69: } jpayne@69: jpayne@69: /* CIntFromPy */ jpayne@69: static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic push jpayne@69: #pragma GCC diagnostic ignored "-Wconversion" jpayne@69: #endif jpayne@69: const long neg_one = (long) -1, const_zero = (long) 0; jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic pop jpayne@69: #endif jpayne@69: const int is_unsigned = neg_one > const_zero; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_Check(x))) { jpayne@69: if ((sizeof(long) < sizeof(long))) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) jpayne@69: } else { jpayne@69: long val = PyInt_AS_LONG(x); jpayne@69: if (is_unsigned && unlikely(val < 0)) { jpayne@69: goto raise_neg_overflow; jpayne@69: } jpayne@69: return (long) val; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: if (unlikely(!PyLong_Check(x))) { jpayne@69: long val; jpayne@69: PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); jpayne@69: if (!tmp) return (long) -1; jpayne@69: val = __Pyx_PyInt_As_long(tmp); jpayne@69: Py_DECREF(tmp); jpayne@69: return val; jpayne@69: } jpayne@69: if (is_unsigned) { jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (unlikely(__Pyx_PyLong_IsNeg(x))) { jpayne@69: goto raise_neg_overflow; jpayne@69: } else if (__Pyx_PyLong_IsCompact(x)) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(x); jpayne@69: assert(__Pyx_PyLong_DigitCount(x) > 1); jpayne@69: switch (__Pyx_PyLong_DigitCount(x)) { jpayne@69: case 2: jpayne@69: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { jpayne@69: return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 3: jpayne@69: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { jpayne@69: return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 4: jpayne@69: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { jpayne@69: __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]))) jpayne@69: } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { jpayne@69: return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 jpayne@69: if (unlikely(Py_SIZE(x) < 0)) { jpayne@69: goto raise_neg_overflow; jpayne@69: } jpayne@69: #else jpayne@69: { jpayne@69: int result = PyObject_RichCompareBool(x, Py_False, Py_LT); jpayne@69: if (unlikely(result < 0)) jpayne@69: return (long) -1; jpayne@69: if (unlikely(result == 1)) jpayne@69: goto raise_neg_overflow; jpayne@69: } jpayne@69: #endif jpayne@69: if ((sizeof(long) <= sizeof(unsigned long))) { jpayne@69: __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { jpayne@69: __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (__Pyx_PyLong_IsCompact(x)) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(x); jpayne@69: assert(__Pyx_PyLong_DigitCount(x) > 1); jpayne@69: switch (__Pyx_PyLong_SignedDigitCount(x)) { jpayne@69: case -2: jpayne@69: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { jpayne@69: return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 2: jpayne@69: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { jpayne@69: return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case -3: jpayne@69: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { jpayne@69: return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 3: jpayne@69: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { jpayne@69: return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case -4: jpayne@69: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { jpayne@69: __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]))) jpayne@69: } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { jpayne@69: return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 4: jpayne@69: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { jpayne@69: __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]))) jpayne@69: } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { jpayne@69: return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: if ((sizeof(long) <= sizeof(long))) { jpayne@69: __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { jpayne@69: __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) jpayne@69: #endif jpayne@69: } jpayne@69: } jpayne@69: { jpayne@69: long val; jpayne@69: int ret = -1; jpayne@69: #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: Py_ssize_t bytes_copied = PyLong_AsNativeBytes( jpayne@69: x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); jpayne@69: if (unlikely(bytes_copied == -1)) { jpayne@69: } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { jpayne@69: goto raise_overflow; jpayne@69: } else { jpayne@69: ret = 0; jpayne@69: } jpayne@69: #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) jpayne@69: int one = 1; int is_little = (int)*(unsigned char *)&one; jpayne@69: unsigned char *bytes = (unsigned char *)&val; jpayne@69: ret = _PyLong_AsByteArray((PyLongObject *)x, jpayne@69: bytes, sizeof(val), jpayne@69: is_little, !is_unsigned); jpayne@69: #else jpayne@69: PyObject *v; jpayne@69: PyObject *stepval = NULL, *mask = NULL, *shift = NULL; jpayne@69: int bits, remaining_bits, is_negative = 0; jpayne@69: int chunk_size = (sizeof(long) < 8) ? 30 : 62; jpayne@69: if (likely(PyLong_CheckExact(x))) { jpayne@69: v = __Pyx_NewRef(x); jpayne@69: } else { jpayne@69: v = PyNumber_Long(x); jpayne@69: if (unlikely(!v)) return (long) -1; jpayne@69: assert(PyLong_CheckExact(v)); jpayne@69: } jpayne@69: { jpayne@69: int result = PyObject_RichCompareBool(v, Py_False, Py_LT); jpayne@69: if (unlikely(result < 0)) { jpayne@69: Py_DECREF(v); jpayne@69: return (long) -1; jpayne@69: } jpayne@69: is_negative = result == 1; jpayne@69: } jpayne@69: if (is_unsigned && unlikely(is_negative)) { jpayne@69: Py_DECREF(v); jpayne@69: goto raise_neg_overflow; jpayne@69: } else if (is_negative) { jpayne@69: stepval = PyNumber_Invert(v); jpayne@69: Py_DECREF(v); jpayne@69: if (unlikely(!stepval)) jpayne@69: return (long) -1; jpayne@69: } else { jpayne@69: stepval = v; jpayne@69: } jpayne@69: v = NULL; jpayne@69: val = (long) 0; jpayne@69: mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; jpayne@69: shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; jpayne@69: for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { jpayne@69: PyObject *tmp, *digit; jpayne@69: long idigit; jpayne@69: digit = PyNumber_And(stepval, mask); jpayne@69: if (unlikely(!digit)) goto done; jpayne@69: idigit = PyLong_AsLong(digit); jpayne@69: Py_DECREF(digit); jpayne@69: if (unlikely(idigit < 0)) goto done; jpayne@69: val |= ((long) idigit) << bits; jpayne@69: tmp = PyNumber_Rshift(stepval, shift); jpayne@69: if (unlikely(!tmp)) goto done; jpayne@69: Py_DECREF(stepval); stepval = tmp; jpayne@69: } jpayne@69: Py_DECREF(shift); shift = NULL; jpayne@69: Py_DECREF(mask); mask = NULL; jpayne@69: { jpayne@69: long idigit = PyLong_AsLong(stepval); jpayne@69: if (unlikely(idigit < 0)) goto done; jpayne@69: remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); jpayne@69: if (unlikely(idigit >= (1L << remaining_bits))) jpayne@69: goto raise_overflow; jpayne@69: val |= ((long) idigit) << bits; jpayne@69: } jpayne@69: if (!is_unsigned) { jpayne@69: if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) jpayne@69: goto raise_overflow; jpayne@69: if (is_negative) jpayne@69: val = ~val; jpayne@69: } jpayne@69: ret = 0; jpayne@69: done: jpayne@69: Py_XDECREF(shift); jpayne@69: Py_XDECREF(mask); jpayne@69: Py_XDECREF(stepval); jpayne@69: #endif jpayne@69: if (unlikely(ret)) jpayne@69: return (long) -1; jpayne@69: return val; jpayne@69: } jpayne@69: raise_overflow: jpayne@69: PyErr_SetString(PyExc_OverflowError, jpayne@69: "value too large to convert to long"); jpayne@69: return (long) -1; jpayne@69: raise_neg_overflow: jpayne@69: PyErr_SetString(PyExc_OverflowError, jpayne@69: "can't convert negative value to long"); jpayne@69: return (long) -1; jpayne@69: } jpayne@69: jpayne@69: /* CIntToPy */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic push jpayne@69: #pragma GCC diagnostic ignored "-Wconversion" jpayne@69: #endif jpayne@69: const long neg_one = (long) -1, const_zero = (long) 0; jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic pop jpayne@69: #endif jpayne@69: const int is_unsigned = neg_one > const_zero; jpayne@69: if (is_unsigned) { jpayne@69: if (sizeof(long) < sizeof(long)) { jpayne@69: return PyInt_FromLong((long) value); jpayne@69: } else if (sizeof(long) <= sizeof(unsigned long)) { jpayne@69: return PyLong_FromUnsignedLong((unsigned long) value); jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { jpayne@69: return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: if (sizeof(long) <= sizeof(long)) { jpayne@69: return PyInt_FromLong((long) value); jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { jpayne@69: return PyLong_FromLongLong((PY_LONG_LONG) value); jpayne@69: #endif jpayne@69: } jpayne@69: } jpayne@69: { jpayne@69: unsigned char *bytes = (unsigned char *)&value; jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 jpayne@69: if (is_unsigned) { jpayne@69: return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); jpayne@69: } else { jpayne@69: return PyLong_FromNativeBytes(bytes, sizeof(value), -1); jpayne@69: } jpayne@69: #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 jpayne@69: int one = 1; int little = (int)*(unsigned char *)&one; jpayne@69: return _PyLong_FromByteArray(bytes, sizeof(long), jpayne@69: little, !is_unsigned); jpayne@69: #else jpayne@69: int one = 1; int little = (int)*(unsigned char *)&one; jpayne@69: PyObject *from_bytes, *result = NULL; jpayne@69: PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; jpayne@69: from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); jpayne@69: if (!from_bytes) return NULL; jpayne@69: py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); jpayne@69: if (!py_bytes) goto limited_bad; jpayne@69: order_str = PyUnicode_FromString(little ? "little" : "big"); jpayne@69: if (!order_str) goto limited_bad; jpayne@69: arg_tuple = PyTuple_Pack(2, py_bytes, order_str); jpayne@69: if (!arg_tuple) goto limited_bad; jpayne@69: if (!is_unsigned) { jpayne@69: kwds = PyDict_New(); jpayne@69: if (!kwds) goto limited_bad; jpayne@69: if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; jpayne@69: } jpayne@69: result = PyObject_Call(from_bytes, arg_tuple, kwds); jpayne@69: limited_bad: jpayne@69: Py_XDECREF(kwds); jpayne@69: Py_XDECREF(arg_tuple); jpayne@69: Py_XDECREF(order_str); jpayne@69: Py_XDECREF(py_bytes); jpayne@69: Py_XDECREF(from_bytes); jpayne@69: return result; jpayne@69: #endif jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* CIntToPy */ jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) { jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic push jpayne@69: #pragma GCC diagnostic ignored "-Wconversion" jpayne@69: #endif jpayne@69: const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic pop jpayne@69: #endif jpayne@69: const int is_unsigned = neg_one > const_zero; jpayne@69: if (is_unsigned) { jpayne@69: if (sizeof(uint32_t) < sizeof(long)) { jpayne@69: return PyInt_FromLong((long) value); jpayne@69: } else if (sizeof(uint32_t) <= sizeof(unsigned long)) { jpayne@69: return PyLong_FromUnsignedLong((unsigned long) value); jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) { jpayne@69: return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: if (sizeof(uint32_t) <= sizeof(long)) { jpayne@69: return PyInt_FromLong((long) value); jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) { jpayne@69: return PyLong_FromLongLong((PY_LONG_LONG) value); jpayne@69: #endif jpayne@69: } jpayne@69: } jpayne@69: { jpayne@69: unsigned char *bytes = (unsigned char *)&value; jpayne@69: #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 jpayne@69: if (is_unsigned) { jpayne@69: return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); jpayne@69: } else { jpayne@69: return PyLong_FromNativeBytes(bytes, sizeof(value), -1); jpayne@69: } jpayne@69: #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 jpayne@69: int one = 1; int little = (int)*(unsigned char *)&one; jpayne@69: return _PyLong_FromByteArray(bytes, sizeof(uint32_t), jpayne@69: little, !is_unsigned); jpayne@69: #else jpayne@69: int one = 1; int little = (int)*(unsigned char *)&one; jpayne@69: PyObject *from_bytes, *result = NULL; jpayne@69: PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; jpayne@69: from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); jpayne@69: if (!from_bytes) return NULL; jpayne@69: py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint32_t)); jpayne@69: if (!py_bytes) goto limited_bad; jpayne@69: order_str = PyUnicode_FromString(little ? "little" : "big"); jpayne@69: if (!order_str) goto limited_bad; jpayne@69: arg_tuple = PyTuple_Pack(2, py_bytes, order_str); jpayne@69: if (!arg_tuple) goto limited_bad; jpayne@69: if (!is_unsigned) { jpayne@69: kwds = PyDict_New(); jpayne@69: if (!kwds) goto limited_bad; jpayne@69: if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; jpayne@69: } jpayne@69: result = PyObject_Call(from_bytes, arg_tuple, kwds); jpayne@69: limited_bad: jpayne@69: Py_XDECREF(kwds); jpayne@69: Py_XDECREF(arg_tuple); jpayne@69: Py_XDECREF(order_str); jpayne@69: Py_XDECREF(py_bytes); jpayne@69: Py_XDECREF(from_bytes); jpayne@69: return result; jpayne@69: #endif jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* CIntFromPy */ jpayne@69: static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic push jpayne@69: #pragma GCC diagnostic ignored "-Wconversion" jpayne@69: #endif jpayne@69: const int neg_one = (int) -1, const_zero = (int) 0; jpayne@69: #ifdef __Pyx_HAS_GCC_DIAGNOSTIC jpayne@69: #pragma GCC diagnostic pop jpayne@69: #endif jpayne@69: const int is_unsigned = neg_one > const_zero; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_Check(x))) { jpayne@69: if ((sizeof(int) < sizeof(long))) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) jpayne@69: } else { jpayne@69: long val = PyInt_AS_LONG(x); jpayne@69: if (is_unsigned && unlikely(val < 0)) { jpayne@69: goto raise_neg_overflow; jpayne@69: } jpayne@69: return (int) val; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: if (unlikely(!PyLong_Check(x))) { jpayne@69: int val; jpayne@69: PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); jpayne@69: if (!tmp) return (int) -1; jpayne@69: val = __Pyx_PyInt_As_int(tmp); jpayne@69: Py_DECREF(tmp); jpayne@69: return val; jpayne@69: } jpayne@69: if (is_unsigned) { jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (unlikely(__Pyx_PyLong_IsNeg(x))) { jpayne@69: goto raise_neg_overflow; jpayne@69: } else if (__Pyx_PyLong_IsCompact(x)) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(x); jpayne@69: assert(__Pyx_PyLong_DigitCount(x) > 1); jpayne@69: switch (__Pyx_PyLong_DigitCount(x)) { jpayne@69: case 2: jpayne@69: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { jpayne@69: return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 3: jpayne@69: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { jpayne@69: return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 4: jpayne@69: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { jpayne@69: __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]))) jpayne@69: } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { jpayne@69: return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 jpayne@69: if (unlikely(Py_SIZE(x) < 0)) { jpayne@69: goto raise_neg_overflow; jpayne@69: } jpayne@69: #else jpayne@69: { jpayne@69: int result = PyObject_RichCompareBool(x, Py_False, Py_LT); jpayne@69: if (unlikely(result < 0)) jpayne@69: return (int) -1; jpayne@69: if (unlikely(result == 1)) jpayne@69: goto raise_neg_overflow; jpayne@69: } jpayne@69: #endif jpayne@69: if ((sizeof(int) <= sizeof(unsigned long))) { jpayne@69: __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { jpayne@69: __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) jpayne@69: #endif jpayne@69: } jpayne@69: } else { jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (__Pyx_PyLong_IsCompact(x)) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(x); jpayne@69: assert(__Pyx_PyLong_DigitCount(x) > 1); jpayne@69: switch (__Pyx_PyLong_SignedDigitCount(x)) { jpayne@69: case -2: jpayne@69: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { jpayne@69: return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 2: jpayne@69: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { jpayne@69: return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case -3: jpayne@69: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { jpayne@69: return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 3: jpayne@69: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { jpayne@69: __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) jpayne@69: } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { jpayne@69: return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case -4: jpayne@69: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { jpayne@69: __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]))) jpayne@69: } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { jpayne@69: return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: case 4: jpayne@69: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { jpayne@69: if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { jpayne@69: __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]))) jpayne@69: } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { jpayne@69: return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); jpayne@69: } jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: if ((sizeof(int) <= sizeof(long))) { jpayne@69: __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) jpayne@69: #ifdef HAVE_LONG_LONG jpayne@69: } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { jpayne@69: __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) jpayne@69: #endif jpayne@69: } jpayne@69: } jpayne@69: { jpayne@69: int val; jpayne@69: int ret = -1; jpayne@69: #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API jpayne@69: Py_ssize_t bytes_copied = PyLong_AsNativeBytes( jpayne@69: x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); jpayne@69: if (unlikely(bytes_copied == -1)) { jpayne@69: } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { jpayne@69: goto raise_overflow; jpayne@69: } else { jpayne@69: ret = 0; jpayne@69: } jpayne@69: #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) jpayne@69: int one = 1; int is_little = (int)*(unsigned char *)&one; jpayne@69: unsigned char *bytes = (unsigned char *)&val; jpayne@69: ret = _PyLong_AsByteArray((PyLongObject *)x, jpayne@69: bytes, sizeof(val), jpayne@69: is_little, !is_unsigned); jpayne@69: #else jpayne@69: PyObject *v; jpayne@69: PyObject *stepval = NULL, *mask = NULL, *shift = NULL; jpayne@69: int bits, remaining_bits, is_negative = 0; jpayne@69: int chunk_size = (sizeof(long) < 8) ? 30 : 62; jpayne@69: if (likely(PyLong_CheckExact(x))) { jpayne@69: v = __Pyx_NewRef(x); jpayne@69: } else { jpayne@69: v = PyNumber_Long(x); jpayne@69: if (unlikely(!v)) return (int) -1; jpayne@69: assert(PyLong_CheckExact(v)); jpayne@69: } jpayne@69: { jpayne@69: int result = PyObject_RichCompareBool(v, Py_False, Py_LT); jpayne@69: if (unlikely(result < 0)) { jpayne@69: Py_DECREF(v); jpayne@69: return (int) -1; jpayne@69: } jpayne@69: is_negative = result == 1; jpayne@69: } jpayne@69: if (is_unsigned && unlikely(is_negative)) { jpayne@69: Py_DECREF(v); jpayne@69: goto raise_neg_overflow; jpayne@69: } else if (is_negative) { jpayne@69: stepval = PyNumber_Invert(v); jpayne@69: Py_DECREF(v); jpayne@69: if (unlikely(!stepval)) jpayne@69: return (int) -1; jpayne@69: } else { jpayne@69: stepval = v; jpayne@69: } jpayne@69: v = NULL; jpayne@69: val = (int) 0; jpayne@69: mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; jpayne@69: shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; jpayne@69: for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { jpayne@69: PyObject *tmp, *digit; jpayne@69: long idigit; jpayne@69: digit = PyNumber_And(stepval, mask); jpayne@69: if (unlikely(!digit)) goto done; jpayne@69: idigit = PyLong_AsLong(digit); jpayne@69: Py_DECREF(digit); jpayne@69: if (unlikely(idigit < 0)) goto done; jpayne@69: val |= ((int) idigit) << bits; jpayne@69: tmp = PyNumber_Rshift(stepval, shift); jpayne@69: if (unlikely(!tmp)) goto done; jpayne@69: Py_DECREF(stepval); stepval = tmp; jpayne@69: } jpayne@69: Py_DECREF(shift); shift = NULL; jpayne@69: Py_DECREF(mask); mask = NULL; jpayne@69: { jpayne@69: long idigit = PyLong_AsLong(stepval); jpayne@69: if (unlikely(idigit < 0)) goto done; jpayne@69: remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); jpayne@69: if (unlikely(idigit >= (1L << remaining_bits))) jpayne@69: goto raise_overflow; jpayne@69: val |= ((int) idigit) << bits; jpayne@69: } jpayne@69: if (!is_unsigned) { jpayne@69: if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) jpayne@69: goto raise_overflow; jpayne@69: if (is_negative) jpayne@69: val = ~val; jpayne@69: } jpayne@69: ret = 0; jpayne@69: done: jpayne@69: Py_XDECREF(shift); jpayne@69: Py_XDECREF(mask); jpayne@69: Py_XDECREF(stepval); jpayne@69: #endif jpayne@69: if (unlikely(ret)) jpayne@69: return (int) -1; jpayne@69: return val; jpayne@69: } jpayne@69: raise_overflow: jpayne@69: PyErr_SetString(PyExc_OverflowError, jpayne@69: "value too large to convert to int"); jpayne@69: return (int) -1; jpayne@69: raise_neg_overflow: jpayne@69: PyErr_SetString(PyExc_OverflowError, jpayne@69: "can't convert negative value to int"); jpayne@69: return (int) -1; jpayne@69: } jpayne@69: jpayne@69: /* FormatTypeName */ jpayne@69: #if CYTHON_COMPILING_IN_LIMITED_API jpayne@69: static __Pyx_TypeName jpayne@69: __Pyx_PyType_GetName(PyTypeObject* tp) jpayne@69: { jpayne@69: PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, jpayne@69: __pyx_n_s_name); jpayne@69: if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { jpayne@69: PyErr_Clear(); jpayne@69: Py_XDECREF(name); jpayne@69: name = __Pyx_NewRef(__pyx_n_s__139); jpayne@69: } jpayne@69: return name; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* FastTypeChecks */ jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { jpayne@69: while (a) { jpayne@69: a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); jpayne@69: if (a == b) jpayne@69: return 1; jpayne@69: } jpayne@69: return b == &PyBaseObject_Type; jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { jpayne@69: PyObject *mro; jpayne@69: if (a == b) return 1; jpayne@69: mro = a->tp_mro; jpayne@69: if (likely(mro)) { jpayne@69: Py_ssize_t i, n; jpayne@69: n = PyTuple_GET_SIZE(mro); jpayne@69: for (i = 0; i < n; i++) { jpayne@69: if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) jpayne@69: return 1; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: return __Pyx_InBases(a, b); jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { jpayne@69: PyObject *mro; jpayne@69: if (cls == a || cls == b) return 1; jpayne@69: mro = cls->tp_mro; jpayne@69: if (likely(mro)) { jpayne@69: Py_ssize_t i, n; jpayne@69: n = PyTuple_GET_SIZE(mro); jpayne@69: for (i = 0; i < n; i++) { jpayne@69: PyObject *base = PyTuple_GET_ITEM(mro, i); jpayne@69: if (base == (PyObject *)a || base == (PyObject *)b) jpayne@69: return 1; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); jpayne@69: } jpayne@69: #if PY_MAJOR_VERSION == 2 jpayne@69: static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { jpayne@69: PyObject *exception, *value, *tb; jpayne@69: int res; jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ErrFetch(&exception, &value, &tb); jpayne@69: res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; jpayne@69: if (unlikely(res == -1)) { jpayne@69: PyErr_WriteUnraisable(err); jpayne@69: res = 0; jpayne@69: } jpayne@69: if (!res) { jpayne@69: res = PyObject_IsSubclass(err, exc_type2); jpayne@69: if (unlikely(res == -1)) { jpayne@69: PyErr_WriteUnraisable(err); jpayne@69: res = 0; jpayne@69: } jpayne@69: } jpayne@69: __Pyx_ErrRestore(exception, value, tb); jpayne@69: return res; jpayne@69: } jpayne@69: #else jpayne@69: static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { jpayne@69: if (exc_type1) { jpayne@69: return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); jpayne@69: } else { jpayne@69: return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { jpayne@69: Py_ssize_t i, n; jpayne@69: assert(PyExceptionClass_Check(exc_type)); jpayne@69: n = PyTuple_GET_SIZE(tuple); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: for (i=0; i= 0x030B00a4 jpayne@69: _PyErr_StackItem *exc_info = tstate->exc_info; jpayne@69: tmp_value = exc_info->exc_value; jpayne@69: exc_info->exc_value = *value; jpayne@69: if (tmp_value == NULL || tmp_value == Py_None) { jpayne@69: Py_XDECREF(tmp_value); jpayne@69: tmp_value = NULL; jpayne@69: tmp_type = NULL; jpayne@69: tmp_tb = NULL; jpayne@69: } else { jpayne@69: tmp_type = (PyObject*) Py_TYPE(tmp_value); jpayne@69: Py_INCREF(tmp_type); jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; jpayne@69: Py_XINCREF(tmp_tb); jpayne@69: #else jpayne@69: tmp_tb = PyException_GetTraceback(tmp_value); jpayne@69: #endif jpayne@69: } jpayne@69: #elif CYTHON_USE_EXC_INFO_STACK jpayne@69: _PyErr_StackItem *exc_info = tstate->exc_info; jpayne@69: tmp_type = exc_info->exc_type; jpayne@69: tmp_value = exc_info->exc_value; jpayne@69: tmp_tb = exc_info->exc_traceback; jpayne@69: exc_info->exc_type = *type; jpayne@69: exc_info->exc_value = *value; jpayne@69: exc_info->exc_traceback = *tb; jpayne@69: #else jpayne@69: tmp_type = tstate->exc_type; jpayne@69: tmp_value = tstate->exc_value; jpayne@69: tmp_tb = tstate->exc_traceback; jpayne@69: tstate->exc_type = *type; jpayne@69: tstate->exc_value = *value; jpayne@69: tstate->exc_traceback = *tb; jpayne@69: #endif jpayne@69: *type = tmp_type; jpayne@69: *value = tmp_value; jpayne@69: *tb = tmp_tb; jpayne@69: } jpayne@69: #else jpayne@69: static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { jpayne@69: PyObject *tmp_type, *tmp_value, *tmp_tb; jpayne@69: PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); jpayne@69: PyErr_SetExcInfo(*type, *value, *tb); jpayne@69: *type = tmp_type; jpayne@69: *value = tmp_value; jpayne@69: *tb = tmp_tb; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* CoroutineBase */ jpayne@69: #include jpayne@69: #if PY_VERSION_HEX >= 0x030b00a6 jpayne@69: #ifndef Py_BUILD_CORE jpayne@69: #define Py_BUILD_CORE 1 jpayne@69: #endif jpayne@69: #include "internal/pycore_frame.h" jpayne@69: #endif jpayne@69: #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) jpayne@69: static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { jpayne@69: PyObject *et, *ev, *tb; jpayne@69: PyObject *value = NULL; jpayne@69: CYTHON_UNUSED_VAR(__pyx_tstate); jpayne@69: __Pyx_ErrFetch(&et, &ev, &tb); jpayne@69: if (!et) { jpayne@69: Py_XDECREF(tb); jpayne@69: Py_XDECREF(ev); jpayne@69: Py_INCREF(Py_None); jpayne@69: *pvalue = Py_None; jpayne@69: return 0; jpayne@69: } jpayne@69: if (likely(et == PyExc_StopIteration)) { jpayne@69: if (!ev) { jpayne@69: Py_INCREF(Py_None); jpayne@69: value = Py_None; jpayne@69: } jpayne@69: #if PY_VERSION_HEX >= 0x030300A0 jpayne@69: else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { jpayne@69: value = ((PyStopIterationObject *)ev)->value; jpayne@69: Py_INCREF(value); jpayne@69: Py_DECREF(ev); jpayne@69: } jpayne@69: #endif jpayne@69: else if (unlikely(PyTuple_Check(ev))) { jpayne@69: if (PyTuple_GET_SIZE(ev) >= 1) { jpayne@69: #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS jpayne@69: value = PyTuple_GET_ITEM(ev, 0); jpayne@69: Py_INCREF(value); jpayne@69: #else jpayne@69: value = PySequence_ITEM(ev, 0); jpayne@69: #endif jpayne@69: } else { jpayne@69: Py_INCREF(Py_None); jpayne@69: value = Py_None; jpayne@69: } jpayne@69: Py_DECREF(ev); jpayne@69: } jpayne@69: else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { jpayne@69: value = ev; jpayne@69: } jpayne@69: if (likely(value)) { jpayne@69: Py_XDECREF(tb); jpayne@69: Py_DECREF(et); jpayne@69: *pvalue = value; jpayne@69: return 0; jpayne@69: } jpayne@69: } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { jpayne@69: __Pyx_ErrRestore(et, ev, tb); jpayne@69: return -1; jpayne@69: } jpayne@69: PyErr_NormalizeException(&et, &ev, &tb); jpayne@69: if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { jpayne@69: __Pyx_ErrRestore(et, ev, tb); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_XDECREF(tb); jpayne@69: Py_DECREF(et); jpayne@69: #if PY_VERSION_HEX >= 0x030300A0 jpayne@69: value = ((PyStopIterationObject *)ev)->value; jpayne@69: Py_INCREF(value); jpayne@69: Py_DECREF(ev); jpayne@69: #else jpayne@69: { jpayne@69: PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); jpayne@69: Py_DECREF(ev); jpayne@69: if (likely(args)) { jpayne@69: value = PySequence_GetItem(args, 0); jpayne@69: Py_DECREF(args); jpayne@69: } jpayne@69: if (unlikely(!value)) { jpayne@69: __Pyx_ErrRestore(NULL, NULL, NULL); jpayne@69: Py_INCREF(Py_None); jpayne@69: value = Py_None; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: *pvalue = value; jpayne@69: return 0; jpayne@69: } jpayne@69: static CYTHON_INLINE jpayne@69: void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { jpayne@69: #if PY_VERSION_HEX >= 0x030B00a4 jpayne@69: Py_CLEAR(exc_state->exc_value); jpayne@69: #else jpayne@69: PyObject *t, *v, *tb; jpayne@69: t = exc_state->exc_type; jpayne@69: v = exc_state->exc_value; jpayne@69: tb = exc_state->exc_traceback; jpayne@69: exc_state->exc_type = NULL; jpayne@69: exc_state->exc_value = NULL; jpayne@69: exc_state->exc_traceback = NULL; jpayne@69: Py_XDECREF(t); jpayne@69: Py_XDECREF(v); jpayne@69: Py_XDECREF(tb); jpayne@69: #endif jpayne@69: } jpayne@69: #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) jpayne@69: static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { jpayne@69: const char *msg; jpayne@69: CYTHON_MAYBE_UNUSED_VAR(gen); jpayne@69: if ((0)) { jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { jpayne@69: msg = "coroutine already executing"; jpayne@69: #endif jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { jpayne@69: msg = "async generator already executing"; jpayne@69: #endif jpayne@69: } else { jpayne@69: msg = "generator already executing"; jpayne@69: } jpayne@69: PyErr_SetString(PyExc_ValueError, msg); jpayne@69: } jpayne@69: #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) jpayne@69: static void __Pyx__Coroutine_NotStartedError(PyObject *gen) { jpayne@69: const char *msg; jpayne@69: CYTHON_MAYBE_UNUSED_VAR(gen); jpayne@69: if ((0)) { jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: } else if (__Pyx_Coroutine_Check(gen)) { jpayne@69: msg = "can't send non-None value to a just-started coroutine"; jpayne@69: #endif jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: } else if (__Pyx_AsyncGen_CheckExact(gen)) { jpayne@69: msg = "can't send non-None value to a just-started async generator"; jpayne@69: #endif jpayne@69: } else { jpayne@69: msg = "can't send non-None value to a just-started generator"; jpayne@69: } jpayne@69: PyErr_SetString(PyExc_TypeError, msg); jpayne@69: } jpayne@69: #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) jpayne@69: static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { jpayne@69: CYTHON_MAYBE_UNUSED_VAR(gen); jpayne@69: CYTHON_MAYBE_UNUSED_VAR(closing); jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: if (!closing && __Pyx_Coroutine_Check(gen)) { jpayne@69: PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); jpayne@69: } else jpayne@69: #endif jpayne@69: if (value) { jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: if (__Pyx_AsyncGen_CheckExact(gen)) jpayne@69: PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); jpayne@69: else jpayne@69: #endif jpayne@69: PyErr_SetNone(PyExc_StopIteration); jpayne@69: } jpayne@69: } jpayne@69: static jpayne@69: PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: PyThreadState *tstate; jpayne@69: __Pyx_ExcInfoStruct *exc_state; jpayne@69: PyObject *retval; jpayne@69: assert(!self->is_running); jpayne@69: if (unlikely(self->resume_label == 0)) { jpayne@69: if (unlikely(value && value != Py_None)) { jpayne@69: return __Pyx_Coroutine_NotStartedError((PyObject*)self); jpayne@69: } jpayne@69: } jpayne@69: if (unlikely(self->resume_label == -1)) { jpayne@69: return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); jpayne@69: } jpayne@69: #if CYTHON_FAST_THREAD_STATE jpayne@69: __Pyx_PyThreadState_assign jpayne@69: tstate = __pyx_tstate; jpayne@69: #else jpayne@69: tstate = __Pyx_PyThreadState_Current; jpayne@69: #endif jpayne@69: exc_state = &self->gi_exc_state; jpayne@69: if (exc_state->exc_value) { jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: #else jpayne@69: PyObject *exc_tb; jpayne@69: #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON jpayne@69: exc_tb = PyException_GetTraceback(exc_state->exc_value); jpayne@69: #elif PY_VERSION_HEX >= 0x030B00a4 jpayne@69: exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; jpayne@69: #else jpayne@69: exc_tb = exc_state->exc_traceback; jpayne@69: #endif jpayne@69: if (exc_tb) { jpayne@69: PyTracebackObject *tb = (PyTracebackObject *) exc_tb; jpayne@69: PyFrameObject *f = tb->tb_frame; jpayne@69: assert(f->f_back == NULL); jpayne@69: #if PY_VERSION_HEX >= 0x030B00A1 jpayne@69: f->f_back = PyThreadState_GetFrame(tstate); jpayne@69: #else jpayne@69: Py_XINCREF(tstate->frame); jpayne@69: f->f_back = tstate->frame; jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON jpayne@69: Py_DECREF(exc_tb); jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: #if CYTHON_USE_EXC_INFO_STACK jpayne@69: exc_state->previous_item = tstate->exc_info; jpayne@69: tstate->exc_info = exc_state; jpayne@69: #else jpayne@69: if (exc_state->exc_type) { jpayne@69: __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); jpayne@69: } else { jpayne@69: __Pyx_Coroutine_ExceptionClear(exc_state); jpayne@69: __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); jpayne@69: } jpayne@69: #endif jpayne@69: self->is_running = 1; jpayne@69: retval = self->body(self, tstate, value); jpayne@69: self->is_running = 0; jpayne@69: #if CYTHON_USE_EXC_INFO_STACK jpayne@69: exc_state = &self->gi_exc_state; jpayne@69: tstate->exc_info = exc_state->previous_item; jpayne@69: exc_state->previous_item = NULL; jpayne@69: __Pyx_Coroutine_ResetFrameBackpointer(exc_state); jpayne@69: #endif jpayne@69: return retval; jpayne@69: } jpayne@69: static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: CYTHON_UNUSED_VAR(exc_state); jpayne@69: #else jpayne@69: PyObject *exc_tb; jpayne@69: #if PY_VERSION_HEX >= 0x030B00a4 jpayne@69: if (!exc_state->exc_value) return; jpayne@69: exc_tb = PyException_GetTraceback(exc_state->exc_value); jpayne@69: #else jpayne@69: exc_tb = exc_state->exc_traceback; jpayne@69: #endif jpayne@69: if (likely(exc_tb)) { jpayne@69: PyTracebackObject *tb = (PyTracebackObject *) exc_tb; jpayne@69: PyFrameObject *f = tb->tb_frame; jpayne@69: Py_CLEAR(f->f_back); jpayne@69: #if PY_VERSION_HEX >= 0x030B00a4 jpayne@69: Py_DECREF(exc_tb); jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: static CYTHON_INLINE jpayne@69: PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) { jpayne@69: CYTHON_MAYBE_UNUSED_VAR(gen); jpayne@69: if (unlikely(!retval)) { jpayne@69: __Pyx_PyThreadState_declare jpayne@69: __Pyx_PyThreadState_assign jpayne@69: if (!__Pyx_PyErr_Occurred()) { jpayne@69: PyObject *exc = PyExc_StopIteration; jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: if (__Pyx_AsyncGen_CheckExact(gen)) jpayne@69: exc = __Pyx_PyExc_StopAsyncIteration; jpayne@69: #endif jpayne@69: __Pyx_PyErr_SetNone(exc); jpayne@69: } jpayne@69: } jpayne@69: return retval; jpayne@69: } jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) jpayne@69: static CYTHON_INLINE jpayne@69: PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { jpayne@69: #if PY_VERSION_HEX <= 0x030A00A1 jpayne@69: return _PyGen_Send(gen, arg); jpayne@69: #else jpayne@69: PyObject *result; jpayne@69: if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { jpayne@69: if (PyAsyncGen_CheckExact(gen)) { jpayne@69: assert(result == Py_None); jpayne@69: PyErr_SetNone(PyExc_StopAsyncIteration); jpayne@69: } jpayne@69: else if (result == Py_None) { jpayne@69: PyErr_SetNone(PyExc_StopIteration); jpayne@69: } jpayne@69: else { jpayne@69: #if PY_VERSION_HEX < 0x030d00A1 jpayne@69: _PyGen_SetStopIterationValue(result); jpayne@69: #else jpayne@69: if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { jpayne@69: PyErr_SetObject(PyExc_StopIteration, result); jpayne@69: } else { jpayne@69: PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); jpayne@69: if (likely(exc != NULL)) { jpayne@69: PyErr_SetObject(PyExc_StopIteration, exc); jpayne@69: Py_DECREF(exc); jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: } jpayne@69: Py_DECREF(result); jpayne@69: result = NULL; jpayne@69: } jpayne@69: return result; jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: static CYTHON_INLINE jpayne@69: PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { jpayne@69: PyObject *ret; jpayne@69: PyObject *val = NULL; jpayne@69: __Pyx_Coroutine_Undelegate(gen); jpayne@69: __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); jpayne@69: ret = __Pyx_Coroutine_SendEx(gen, val, 0); jpayne@69: Py_XDECREF(val); jpayne@69: return ret; jpayne@69: } jpayne@69: static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { jpayne@69: PyObject *retval; jpayne@69: __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; jpayne@69: PyObject *yf = gen->yieldfrom; jpayne@69: if (unlikely(gen->is_running)) jpayne@69: return __Pyx_Coroutine_AlreadyRunningError(gen); jpayne@69: if (yf) { jpayne@69: PyObject *ret; jpayne@69: gen->is_running = 1; jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: if (__Pyx_Generator_CheckExact(yf)) { jpayne@69: ret = __Pyx_Coroutine_Send(yf, value); jpayne@69: } else jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: if (__Pyx_Coroutine_Check(yf)) { jpayne@69: ret = __Pyx_Coroutine_Send(yf, value); jpayne@69: } else jpayne@69: #endif jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: if (__pyx_PyAsyncGenASend_CheckExact(yf)) { jpayne@69: ret = __Pyx_async_gen_asend_send(yf, value); jpayne@69: } else jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) jpayne@69: if (PyGen_CheckExact(yf)) { jpayne@69: ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); jpayne@69: } else jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) jpayne@69: if (PyCoro_CheckExact(yf)) { jpayne@69: ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); jpayne@69: } else jpayne@69: #endif jpayne@69: { jpayne@69: if (value == Py_None) jpayne@69: ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf); jpayne@69: else jpayne@69: ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); jpayne@69: } jpayne@69: gen->is_running = 0; jpayne@69: if (likely(ret)) { jpayne@69: return ret; jpayne@69: } jpayne@69: retval = __Pyx_Coroutine_FinishDelegation(gen); jpayne@69: } else { jpayne@69: retval = __Pyx_Coroutine_SendEx(gen, value, 0); jpayne@69: } jpayne@69: return __Pyx_Coroutine_MethodReturn(self, retval); jpayne@69: } jpayne@69: static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { jpayne@69: PyObject *retval = NULL; jpayne@69: int err = 0; jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: if (__Pyx_Generator_CheckExact(yf)) { jpayne@69: retval = __Pyx_Coroutine_Close(yf); jpayne@69: if (!retval) jpayne@69: return -1; jpayne@69: } else jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: if (__Pyx_Coroutine_Check(yf)) { jpayne@69: retval = __Pyx_Coroutine_Close(yf); jpayne@69: if (!retval) jpayne@69: return -1; jpayne@69: } else jpayne@69: if (__Pyx_CoroutineAwait_CheckExact(yf)) { jpayne@69: retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); jpayne@69: if (!retval) jpayne@69: return -1; jpayne@69: } else jpayne@69: #endif jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: if (__pyx_PyAsyncGenASend_CheckExact(yf)) { jpayne@69: retval = __Pyx_async_gen_asend_close(yf, NULL); jpayne@69: } else jpayne@69: if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { jpayne@69: retval = __Pyx_async_gen_athrow_close(yf, NULL); jpayne@69: } else jpayne@69: #endif jpayne@69: { jpayne@69: PyObject *meth; jpayne@69: gen->is_running = 1; jpayne@69: meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_close); jpayne@69: if (unlikely(!meth)) { jpayne@69: if (unlikely(PyErr_Occurred())) { jpayne@69: PyErr_WriteUnraisable(yf); jpayne@69: } jpayne@69: } else { jpayne@69: retval = __Pyx_PyObject_CallNoArg(meth); jpayne@69: Py_DECREF(meth); jpayne@69: if (unlikely(!retval)) jpayne@69: err = -1; jpayne@69: } jpayne@69: gen->is_running = 0; jpayne@69: } jpayne@69: Py_XDECREF(retval); jpayne@69: return err; jpayne@69: } jpayne@69: static PyObject *__Pyx_Generator_Next(PyObject *self) { jpayne@69: __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; jpayne@69: PyObject *yf = gen->yieldfrom; jpayne@69: if (unlikely(gen->is_running)) jpayne@69: return __Pyx_Coroutine_AlreadyRunningError(gen); jpayne@69: if (yf) { jpayne@69: PyObject *ret; jpayne@69: gen->is_running = 1; jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: if (__Pyx_Generator_CheckExact(yf)) { jpayne@69: ret = __Pyx_Generator_Next(yf); jpayne@69: } else jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) jpayne@69: if (PyGen_CheckExact(yf)) { jpayne@69: ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); jpayne@69: } else jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: if (__Pyx_Coroutine_Check(yf)) { jpayne@69: ret = __Pyx_Coroutine_Send(yf, Py_None); jpayne@69: } else jpayne@69: #endif jpayne@69: ret = __Pyx_PyObject_GetIterNextFunc(yf)(yf); jpayne@69: gen->is_running = 0; jpayne@69: if (likely(ret)) { jpayne@69: return ret; jpayne@69: } jpayne@69: return __Pyx_Coroutine_FinishDelegation(gen); jpayne@69: } jpayne@69: return __Pyx_Coroutine_SendEx(gen, Py_None, 0); jpayne@69: } jpayne@69: static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { jpayne@69: CYTHON_UNUSED_VAR(arg); jpayne@69: return __Pyx_Coroutine_Close(self); jpayne@69: } jpayne@69: static PyObject *__Pyx_Coroutine_Close(PyObject *self) { jpayne@69: __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; jpayne@69: PyObject *retval, *raised_exception; jpayne@69: PyObject *yf = gen->yieldfrom; jpayne@69: int err = 0; jpayne@69: if (unlikely(gen->is_running)) jpayne@69: return __Pyx_Coroutine_AlreadyRunningError(gen); jpayne@69: if (yf) { jpayne@69: Py_INCREF(yf); jpayne@69: err = __Pyx_Coroutine_CloseIter(gen, yf); jpayne@69: __Pyx_Coroutine_Undelegate(gen); jpayne@69: Py_DECREF(yf); jpayne@69: } jpayne@69: if (err == 0) jpayne@69: PyErr_SetNone(PyExc_GeneratorExit); jpayne@69: retval = __Pyx_Coroutine_SendEx(gen, NULL, 1); jpayne@69: if (unlikely(retval)) { jpayne@69: const char *msg; jpayne@69: Py_DECREF(retval); jpayne@69: if ((0)) { jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: } else if (__Pyx_Coroutine_Check(self)) { jpayne@69: msg = "coroutine ignored GeneratorExit"; jpayne@69: #endif jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: } else if (__Pyx_AsyncGen_CheckExact(self)) { jpayne@69: #if PY_VERSION_HEX < 0x03060000 jpayne@69: msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)"; jpayne@69: #else jpayne@69: msg = "async generator ignored GeneratorExit"; jpayne@69: #endif jpayne@69: #endif jpayne@69: } else { jpayne@69: msg = "generator ignored GeneratorExit"; jpayne@69: } jpayne@69: PyErr_SetString(PyExc_RuntimeError, msg); jpayne@69: return NULL; jpayne@69: } jpayne@69: raised_exception = PyErr_Occurred(); jpayne@69: if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) { jpayne@69: if (raised_exception) PyErr_Clear(); jpayne@69: Py_INCREF(Py_None); jpayne@69: return Py_None; jpayne@69: } jpayne@69: return NULL; jpayne@69: } jpayne@69: static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, jpayne@69: PyObject *args, int close_on_genexit) { jpayne@69: __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; jpayne@69: PyObject *yf = gen->yieldfrom; jpayne@69: if (unlikely(gen->is_running)) jpayne@69: return __Pyx_Coroutine_AlreadyRunningError(gen); jpayne@69: if (yf) { jpayne@69: PyObject *ret; jpayne@69: Py_INCREF(yf); jpayne@69: if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { jpayne@69: int err = __Pyx_Coroutine_CloseIter(gen, yf); jpayne@69: Py_DECREF(yf); jpayne@69: __Pyx_Coroutine_Undelegate(gen); jpayne@69: if (err < 0) jpayne@69: return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); jpayne@69: goto throw_here; jpayne@69: } jpayne@69: gen->is_running = 1; jpayne@69: if (0 jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: || __Pyx_Generator_CheckExact(yf) jpayne@69: #endif jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: || __Pyx_Coroutine_Check(yf) jpayne@69: #endif jpayne@69: ) { jpayne@69: ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { jpayne@69: ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); jpayne@69: #endif jpayne@69: } else { jpayne@69: PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_n_s_throw); jpayne@69: if (unlikely(!meth)) { jpayne@69: Py_DECREF(yf); jpayne@69: if (unlikely(PyErr_Occurred())) { jpayne@69: gen->is_running = 0; jpayne@69: return NULL; jpayne@69: } jpayne@69: __Pyx_Coroutine_Undelegate(gen); jpayne@69: gen->is_running = 0; jpayne@69: goto throw_here; jpayne@69: } jpayne@69: if (likely(args)) { jpayne@69: ret = __Pyx_PyObject_Call(meth, args, NULL); jpayne@69: } else { jpayne@69: PyObject *cargs[4] = {NULL, typ, val, tb}; jpayne@69: ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); jpayne@69: } jpayne@69: Py_DECREF(meth); jpayne@69: } jpayne@69: gen->is_running = 0; jpayne@69: Py_DECREF(yf); jpayne@69: if (!ret) { jpayne@69: ret = __Pyx_Coroutine_FinishDelegation(gen); jpayne@69: } jpayne@69: return __Pyx_Coroutine_MethodReturn(self, ret); jpayne@69: } jpayne@69: throw_here: jpayne@69: __Pyx_Raise(typ, val, tb, NULL); jpayne@69: return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); jpayne@69: } jpayne@69: static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { jpayne@69: PyObject *typ; jpayne@69: PyObject *val = NULL; jpayne@69: PyObject *tb = NULL; jpayne@69: if (unlikely(!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))) jpayne@69: return NULL; jpayne@69: return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { jpayne@69: #if PY_VERSION_HEX >= 0x030B00a4 jpayne@69: Py_VISIT(exc_state->exc_value); jpayne@69: #else jpayne@69: Py_VISIT(exc_state->exc_type); jpayne@69: Py_VISIT(exc_state->exc_value); jpayne@69: Py_VISIT(exc_state->exc_traceback); jpayne@69: #endif jpayne@69: return 0; jpayne@69: } jpayne@69: static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { jpayne@69: Py_VISIT(gen->closure); jpayne@69: Py_VISIT(gen->classobj); jpayne@69: Py_VISIT(gen->yieldfrom); jpayne@69: return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); jpayne@69: } jpayne@69: static int __Pyx_Coroutine_clear(PyObject *self) { jpayne@69: __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; jpayne@69: Py_CLEAR(gen->closure); jpayne@69: Py_CLEAR(gen->classobj); jpayne@69: Py_CLEAR(gen->yieldfrom); jpayne@69: __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: if (__Pyx_AsyncGen_CheckExact(self)) { jpayne@69: Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); jpayne@69: } jpayne@69: #endif jpayne@69: Py_CLEAR(gen->gi_code); jpayne@69: Py_CLEAR(gen->gi_frame); jpayne@69: Py_CLEAR(gen->gi_name); jpayne@69: Py_CLEAR(gen->gi_qualname); jpayne@69: Py_CLEAR(gen->gi_modulename); jpayne@69: return 0; jpayne@69: } jpayne@69: static void __Pyx_Coroutine_dealloc(PyObject *self) { jpayne@69: __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; jpayne@69: PyObject_GC_UnTrack(gen); jpayne@69: if (gen->gi_weakreflist != NULL) jpayne@69: PyObject_ClearWeakRefs(self); jpayne@69: if (gen->resume_label >= 0) { jpayne@69: PyObject_GC_Track(self); jpayne@69: #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE jpayne@69: if (unlikely(PyObject_CallFinalizerFromDealloc(self))) jpayne@69: #else jpayne@69: Py_TYPE(gen)->tp_del(self); jpayne@69: if (unlikely(Py_REFCNT(self) > 0)) jpayne@69: #endif jpayne@69: { jpayne@69: return; jpayne@69: } jpayne@69: PyObject_GC_UnTrack(self); jpayne@69: } jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: if (__Pyx_AsyncGen_CheckExact(self)) { jpayne@69: /* We have to handle this case for asynchronous generators jpayne@69: right here, because this code has to be between UNTRACK jpayne@69: and GC_Del. */ jpayne@69: Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); jpayne@69: } jpayne@69: #endif jpayne@69: __Pyx_Coroutine_clear(self); jpayne@69: __Pyx_PyHeapTypeObject_GC_Del(gen); jpayne@69: } jpayne@69: static void __Pyx_Coroutine_del(PyObject *self) { jpayne@69: PyObject *error_type, *error_value, *error_traceback; jpayne@69: __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; jpayne@69: __Pyx_PyThreadState_declare jpayne@69: if (gen->resume_label < 0) { jpayne@69: return; jpayne@69: } jpayne@69: #if !CYTHON_USE_TP_FINALIZE jpayne@69: assert(self->ob_refcnt == 0); jpayne@69: __Pyx_SET_REFCNT(self, 1); jpayne@69: #endif jpayne@69: __Pyx_PyThreadState_assign jpayne@69: __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); jpayne@69: #ifdef __Pyx_AsyncGen_USED jpayne@69: if (__Pyx_AsyncGen_CheckExact(self)) { jpayne@69: __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; jpayne@69: PyObject *finalizer = agen->ag_finalizer; jpayne@69: if (finalizer && !agen->ag_closed) { jpayne@69: PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); jpayne@69: if (unlikely(!res)) { jpayne@69: PyErr_WriteUnraisable(self); jpayne@69: } else { jpayne@69: Py_DECREF(res); jpayne@69: } jpayne@69: __Pyx_ErrRestore(error_type, error_value, error_traceback); jpayne@69: return; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: if (unlikely(gen->resume_label == 0 && !error_value)) { jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: if (!__Pyx_Generator_CheckExact(self)) jpayne@69: #endif jpayne@69: { jpayne@69: PyObject_GC_UnTrack(self); jpayne@69: #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat) jpayne@69: if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) jpayne@69: PyErr_WriteUnraisable(self); jpayne@69: #else jpayne@69: {PyObject *msg; jpayne@69: char *cmsg; jpayne@69: #if CYTHON_COMPILING_IN_PYPY jpayne@69: msg = NULL; jpayne@69: cmsg = (char*) "coroutine was never awaited"; jpayne@69: #else jpayne@69: char *cname; jpayne@69: PyObject *qualname; jpayne@69: qualname = gen->gi_qualname; jpayne@69: cname = PyString_AS_STRING(qualname); jpayne@69: msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname); jpayne@69: if (unlikely(!msg)) { jpayne@69: PyErr_Clear(); jpayne@69: cmsg = (char*) "coroutine was never awaited"; jpayne@69: } else { jpayne@69: cmsg = PyString_AS_STRING(msg); jpayne@69: } jpayne@69: #endif jpayne@69: if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0)) jpayne@69: PyErr_WriteUnraisable(self); jpayne@69: Py_XDECREF(msg);} jpayne@69: #endif jpayne@69: PyObject_GC_Track(self); jpayne@69: } jpayne@69: #endif jpayne@69: } else { jpayne@69: PyObject *res = __Pyx_Coroutine_Close(self); jpayne@69: if (unlikely(!res)) { jpayne@69: if (PyErr_Occurred()) jpayne@69: PyErr_WriteUnraisable(self); jpayne@69: } else { jpayne@69: Py_DECREF(res); jpayne@69: } jpayne@69: } jpayne@69: __Pyx_ErrRestore(error_type, error_value, error_traceback); jpayne@69: #if !CYTHON_USE_TP_FINALIZE jpayne@69: assert(Py_REFCNT(self) > 0); jpayne@69: if (likely(--self->ob_refcnt == 0)) { jpayne@69: return; jpayne@69: } jpayne@69: { jpayne@69: Py_ssize_t refcnt = Py_REFCNT(self); jpayne@69: _Py_NewReference(self); jpayne@69: __Pyx_SET_REFCNT(self, refcnt); jpayne@69: } jpayne@69: #if CYTHON_COMPILING_IN_CPYTHON jpayne@69: assert(PyType_IS_GC(Py_TYPE(self)) && jpayne@69: _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); jpayne@69: _Py_DEC_REFTOTAL; jpayne@69: #endif jpayne@69: #ifdef COUNT_ALLOCS jpayne@69: --Py_TYPE(self)->tp_frees; jpayne@69: --Py_TYPE(self)->tp_allocs; jpayne@69: #endif jpayne@69: #endif jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) jpayne@69: { jpayne@69: PyObject *name = self->gi_name; jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (unlikely(!name)) name = Py_None; jpayne@69: Py_INCREF(name); jpayne@69: return name; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: if (unlikely(value == NULL || !PyUnicode_Check(value))) jpayne@69: #else jpayne@69: if (unlikely(value == NULL || !PyString_Check(value))) jpayne@69: #endif jpayne@69: { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "__name__ must be set to a string object"); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_INCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(self->gi_name, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) jpayne@69: { jpayne@69: PyObject *name = self->gi_qualname; jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (unlikely(!name)) name = Py_None; jpayne@69: Py_INCREF(name); jpayne@69: return name; jpayne@69: } jpayne@69: static int jpayne@69: __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) jpayne@69: { jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: if (unlikely(value == NULL || !PyUnicode_Check(value))) jpayne@69: #else jpayne@69: if (unlikely(value == NULL || !PyString_Check(value))) jpayne@69: #endif jpayne@69: { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "__qualname__ must be set to a string object"); jpayne@69: return -1; jpayne@69: } jpayne@69: Py_INCREF(value); jpayne@69: __Pyx_Py_XDECREF_SET(self->gi_qualname, value); jpayne@69: return 0; jpayne@69: } jpayne@69: static PyObject * jpayne@69: __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) jpayne@69: { jpayne@69: PyObject *frame = self->gi_frame; jpayne@69: CYTHON_UNUSED_VAR(context); jpayne@69: if (!frame) { jpayne@69: if (unlikely(!self->gi_code)) { jpayne@69: Py_RETURN_NONE; jpayne@69: } jpayne@69: frame = (PyObject *) PyFrame_New( jpayne@69: PyThreadState_Get(), /*PyThreadState *tstate,*/ jpayne@69: (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ jpayne@69: __pyx_d, /*PyObject *globals,*/ jpayne@69: 0 /*PyObject *locals*/ jpayne@69: ); jpayne@69: if (unlikely(!frame)) jpayne@69: return NULL; jpayne@69: self->gi_frame = frame; jpayne@69: } jpayne@69: Py_INCREF(frame); jpayne@69: return frame; jpayne@69: } jpayne@69: static __pyx_CoroutineObject *__Pyx__Coroutine_New( jpayne@69: PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, jpayne@69: PyObject *name, PyObject *qualname, PyObject *module_name) { jpayne@69: __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); jpayne@69: if (unlikely(!gen)) jpayne@69: return NULL; jpayne@69: return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); jpayne@69: } jpayne@69: static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( jpayne@69: __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, jpayne@69: PyObject *name, PyObject *qualname, PyObject *module_name) { jpayne@69: gen->body = body; jpayne@69: gen->closure = closure; jpayne@69: Py_XINCREF(closure); jpayne@69: gen->is_running = 0; jpayne@69: gen->resume_label = 0; jpayne@69: gen->classobj = NULL; jpayne@69: gen->yieldfrom = NULL; jpayne@69: #if PY_VERSION_HEX >= 0x030B00a4 jpayne@69: gen->gi_exc_state.exc_value = NULL; jpayne@69: #else jpayne@69: gen->gi_exc_state.exc_type = NULL; jpayne@69: gen->gi_exc_state.exc_value = NULL; jpayne@69: gen->gi_exc_state.exc_traceback = NULL; jpayne@69: #endif jpayne@69: #if CYTHON_USE_EXC_INFO_STACK jpayne@69: gen->gi_exc_state.previous_item = NULL; jpayne@69: #endif jpayne@69: gen->gi_weakreflist = NULL; jpayne@69: Py_XINCREF(qualname); jpayne@69: gen->gi_qualname = qualname; jpayne@69: Py_XINCREF(name); jpayne@69: gen->gi_name = name; jpayne@69: Py_XINCREF(module_name); jpayne@69: gen->gi_modulename = module_name; jpayne@69: Py_XINCREF(code); jpayne@69: gen->gi_code = code; jpayne@69: gen->gi_frame = NULL; jpayne@69: PyObject_GC_Track(gen); jpayne@69: return gen; jpayne@69: } jpayne@69: jpayne@69: /* PatchModuleWithCoroutine */ jpayne@69: static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { jpayne@69: #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) jpayne@69: int result; jpayne@69: PyObject *globals, *result_obj; jpayne@69: globals = PyDict_New(); if (unlikely(!globals)) goto ignore; jpayne@69: result = PyDict_SetItemString(globals, "_cython_coroutine_type", jpayne@69: #ifdef __Pyx_Coroutine_USED jpayne@69: (PyObject*)__pyx_CoroutineType); jpayne@69: #else jpayne@69: Py_None); jpayne@69: #endif jpayne@69: if (unlikely(result < 0)) goto ignore; jpayne@69: result = PyDict_SetItemString(globals, "_cython_generator_type", jpayne@69: #ifdef __Pyx_Generator_USED jpayne@69: (PyObject*)__pyx_GeneratorType); jpayne@69: #else jpayne@69: Py_None); jpayne@69: #endif jpayne@69: if (unlikely(result < 0)) goto ignore; jpayne@69: if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; jpayne@69: if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; jpayne@69: result_obj = PyRun_String(py_code, Py_file_input, globals, globals); jpayne@69: if (unlikely(!result_obj)) goto ignore; jpayne@69: Py_DECREF(result_obj); jpayne@69: Py_DECREF(globals); jpayne@69: return module; jpayne@69: ignore: jpayne@69: Py_XDECREF(globals); jpayne@69: PyErr_WriteUnraisable(module); jpayne@69: if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { jpayne@69: Py_DECREF(module); jpayne@69: module = NULL; jpayne@69: } jpayne@69: #else jpayne@69: py_code++; jpayne@69: #endif jpayne@69: return module; jpayne@69: } jpayne@69: jpayne@69: /* PatchGeneratorABC */ jpayne@69: #ifndef CYTHON_REGISTER_ABCS jpayne@69: #define CYTHON_REGISTER_ABCS 1 jpayne@69: #endif jpayne@69: #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) jpayne@69: static PyObject* __Pyx_patch_abc_module(PyObject *module); jpayne@69: static PyObject* __Pyx_patch_abc_module(PyObject *module) { jpayne@69: module = __Pyx_Coroutine_patch_module( jpayne@69: module, "" jpayne@69: "if _cython_generator_type is not None:\n" jpayne@69: " try: Generator = _module.Generator\n" jpayne@69: " except AttributeError: pass\n" jpayne@69: " else: Generator.register(_cython_generator_type)\n" jpayne@69: "if _cython_coroutine_type is not None:\n" jpayne@69: " try: Coroutine = _module.Coroutine\n" jpayne@69: " except AttributeError: pass\n" jpayne@69: " else: Coroutine.register(_cython_coroutine_type)\n" jpayne@69: ); jpayne@69: return module; jpayne@69: } jpayne@69: #endif jpayne@69: static int __Pyx_patch_abc(void) { jpayne@69: #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) jpayne@69: static int abc_patched = 0; jpayne@69: if (CYTHON_REGISTER_ABCS && !abc_patched) { jpayne@69: PyObject *module; jpayne@69: module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections"); jpayne@69: if (unlikely(!module)) { jpayne@69: PyErr_WriteUnraisable(NULL); jpayne@69: if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, jpayne@69: ((PY_MAJOR_VERSION >= 3) ? jpayne@69: "Cython module failed to register with collections.abc module" : jpayne@69: "Cython module failed to register with collections module"), 1) < 0)) { jpayne@69: return -1; jpayne@69: } jpayne@69: } else { jpayne@69: module = __Pyx_patch_abc_module(module); jpayne@69: abc_patched = 1; jpayne@69: if (unlikely(!module)) jpayne@69: return -1; jpayne@69: Py_DECREF(module); jpayne@69: } jpayne@69: module = PyImport_ImportModule("backports_abc"); jpayne@69: if (module) { jpayne@69: module = __Pyx_patch_abc_module(module); jpayne@69: Py_XDECREF(module); jpayne@69: } jpayne@69: if (!module) { jpayne@69: PyErr_Clear(); jpayne@69: } jpayne@69: } jpayne@69: #else jpayne@69: if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL); jpayne@69: #endif jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: /* Generator */ jpayne@69: static PyMethodDef __pyx_Generator_methods[] = { jpayne@69: {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, jpayne@69: (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, jpayne@69: {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, jpayne@69: (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, jpayne@69: {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, jpayne@69: (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, jpayne@69: {0, 0, 0, 0} jpayne@69: }; jpayne@69: static PyMemberDef __pyx_Generator_memberlist[] = { jpayne@69: {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, jpayne@69: {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, jpayne@69: (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, jpayne@69: {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, jpayne@69: {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, jpayne@69: #endif jpayne@69: {0, 0, 0, 0, 0} jpayne@69: }; jpayne@69: static PyGetSetDef __pyx_Generator_getsets[] = { jpayne@69: {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, jpayne@69: (char*) PyDoc_STR("name of the generator"), 0}, jpayne@69: {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, jpayne@69: (char*) PyDoc_STR("qualified name of the generator"), 0}, jpayne@69: {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, jpayne@69: (char*) PyDoc_STR("Frame of the generator"), 0}, jpayne@69: {0, 0, 0, 0, 0} jpayne@69: }; jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: static PyType_Slot __pyx_GeneratorType_slots[] = { jpayne@69: {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, jpayne@69: {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, jpayne@69: {Py_tp_iter, (void *)PyObject_SelfIter}, jpayne@69: {Py_tp_iternext, (void *)__Pyx_Generator_Next}, jpayne@69: {Py_tp_methods, (void *)__pyx_Generator_methods}, jpayne@69: {Py_tp_members, (void *)__pyx_Generator_memberlist}, jpayne@69: {Py_tp_getset, (void *)__pyx_Generator_getsets}, jpayne@69: {Py_tp_getattro, (void *) __Pyx_PyObject_GenericGetAttrNoDict}, jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, jpayne@69: #endif jpayne@69: {0, 0}, jpayne@69: }; jpayne@69: static PyType_Spec __pyx_GeneratorType_spec = { jpayne@69: __PYX_TYPE_MODULE_PREFIX "generator", jpayne@69: sizeof(__pyx_CoroutineObject), jpayne@69: 0, jpayne@69: Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, jpayne@69: __pyx_GeneratorType_slots jpayne@69: }; jpayne@69: #else jpayne@69: static PyTypeObject __pyx_GeneratorType_type = { jpayne@69: PyVarObject_HEAD_INIT(0, 0) jpayne@69: __PYX_TYPE_MODULE_PREFIX "generator", jpayne@69: sizeof(__pyx_CoroutineObject), jpayne@69: 0, jpayne@69: (destructor) __Pyx_Coroutine_dealloc, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, jpayne@69: 0, jpayne@69: (traverseproc) __Pyx_Coroutine_traverse, jpayne@69: 0, jpayne@69: 0, jpayne@69: offsetof(__pyx_CoroutineObject, gi_weakreflist), jpayne@69: 0, jpayne@69: (iternextfunc) __Pyx_Generator_Next, jpayne@69: __pyx_Generator_methods, jpayne@69: __pyx_Generator_memberlist, jpayne@69: __pyx_Generator_getsets, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: 0, jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: 0, jpayne@69: #else jpayne@69: __Pyx_Coroutine_del, jpayne@69: #endif jpayne@69: 0, jpayne@69: #if CYTHON_USE_TP_FINALIZE jpayne@69: __Pyx_Coroutine_del, jpayne@69: #elif PY_VERSION_HEX >= 0x030400a1 jpayne@69: 0, jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) jpayne@69: 0, jpayne@69: #endif jpayne@69: #if __PYX_NEED_TP_PRINT_SLOT jpayne@69: 0, jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030C0000 jpayne@69: 0, jpayne@69: #endif jpayne@69: #if PY_VERSION_HEX >= 0x030d00A4 jpayne@69: 0, jpayne@69: #endif jpayne@69: #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 jpayne@69: 0, jpayne@69: #endif jpayne@69: }; jpayne@69: #endif jpayne@69: static int __pyx_Generator_init(PyObject *module) { jpayne@69: #if CYTHON_USE_TYPE_SPECS jpayne@69: __pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_GeneratorType_spec, NULL); jpayne@69: #else jpayne@69: CYTHON_UNUSED_VAR(module); jpayne@69: __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; jpayne@69: __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; jpayne@69: __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); jpayne@69: #endif jpayne@69: if (unlikely(!__pyx_GeneratorType)) { jpayne@69: return -1; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: /* CheckBinaryVersion */ jpayne@69: static unsigned long __Pyx_get_runtime_version(void) { jpayne@69: #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 jpayne@69: return Py_Version & ~0xFFUL; jpayne@69: #else jpayne@69: const char* rt_version = Py_GetVersion(); jpayne@69: unsigned long version = 0; jpayne@69: unsigned long factor = 0x01000000UL; jpayne@69: unsigned int digit = 0; jpayne@69: int i = 0; jpayne@69: while (factor) { jpayne@69: while ('0' <= rt_version[i] && rt_version[i] <= '9') { jpayne@69: digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); jpayne@69: ++i; jpayne@69: } jpayne@69: version += factor * digit; jpayne@69: if (rt_version[i] != '.') jpayne@69: break; jpayne@69: digit = 0; jpayne@69: factor >>= 8; jpayne@69: ++i; jpayne@69: } jpayne@69: return version; jpayne@69: #endif jpayne@69: } jpayne@69: static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { jpayne@69: const unsigned long MAJOR_MINOR = 0xFFFF0000UL; jpayne@69: if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) jpayne@69: return 0; jpayne@69: if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) jpayne@69: return 1; jpayne@69: { jpayne@69: char message[200]; jpayne@69: PyOS_snprintf(message, sizeof(message), jpayne@69: "compile time Python version %d.%d " jpayne@69: "of module '%.100s' " jpayne@69: "%s " jpayne@69: "runtime version %d.%d", jpayne@69: (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), jpayne@69: __Pyx_MODULE_NAME, jpayne@69: (allow_newer) ? "was newer than" : "does not match", jpayne@69: (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) jpayne@69: ); jpayne@69: return PyErr_WarnEx(NULL, message, 1); jpayne@69: } jpayne@69: } jpayne@69: jpayne@69: /* FunctionImport */ jpayne@69: #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11 jpayne@69: #define __PYX_HAVE_RT_ImportFunction_3_0_11 jpayne@69: static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { jpayne@69: PyObject *d = 0; jpayne@69: PyObject *cobj = 0; jpayne@69: union { jpayne@69: void (*fp)(void); jpayne@69: void *p; jpayne@69: } tmp; jpayne@69: d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); jpayne@69: if (!d) jpayne@69: goto bad; jpayne@69: cobj = PyDict_GetItemString(d, funcname); jpayne@69: if (!cobj) { jpayne@69: PyErr_Format(PyExc_ImportError, jpayne@69: "%.200s does not export expected C function %.200s", jpayne@69: PyModule_GetName(module), funcname); jpayne@69: goto bad; jpayne@69: } jpayne@69: if (!PyCapsule_IsValid(cobj, sig)) { jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", jpayne@69: PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); jpayne@69: goto bad; jpayne@69: } jpayne@69: tmp.p = PyCapsule_GetPointer(cobj, sig); jpayne@69: *f = tmp.fp; jpayne@69: if (!(*f)) jpayne@69: goto bad; jpayne@69: Py_DECREF(d); jpayne@69: return 0; jpayne@69: bad: jpayne@69: Py_XDECREF(d); jpayne@69: return -1; jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: /* InitStrings */ jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { jpayne@69: if (t.is_unicode | t.is_str) { jpayne@69: if (t.intern) { jpayne@69: *str = PyUnicode_InternFromString(t.s); jpayne@69: } else if (t.encoding) { jpayne@69: *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); jpayne@69: } else { jpayne@69: *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); jpayne@69: } jpayne@69: } else { jpayne@69: *str = PyBytes_FromStringAndSize(t.s, t.n - 1); jpayne@69: } jpayne@69: if (!*str) jpayne@69: return -1; jpayne@69: if (PyObject_Hash(*str) == -1) jpayne@69: return -1; jpayne@69: return 0; jpayne@69: } jpayne@69: #endif jpayne@69: static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { jpayne@69: while (t->p) { jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: __Pyx_InitString(*t, t->p); jpayne@69: #else jpayne@69: if (t->is_unicode) { jpayne@69: *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); jpayne@69: } else if (t->intern) { jpayne@69: *t->p = PyString_InternFromString(t->s); jpayne@69: } else { jpayne@69: *t->p = PyString_FromStringAndSize(t->s, t->n - 1); jpayne@69: } jpayne@69: if (!*t->p) jpayne@69: return -1; jpayne@69: if (PyObject_Hash(*t->p) == -1) jpayne@69: return -1; jpayne@69: #endif jpayne@69: ++t; jpayne@69: } jpayne@69: return 0; jpayne@69: } jpayne@69: jpayne@69: #include jpayne@69: static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { jpayne@69: size_t len = strlen(s); jpayne@69: if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { jpayne@69: PyErr_SetString(PyExc_OverflowError, "byte string is too long"); jpayne@69: return -1; jpayne@69: } jpayne@69: return (Py_ssize_t) len; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { jpayne@69: Py_ssize_t len = __Pyx_ssize_strlen(c_str); jpayne@69: if (unlikely(len < 0)) return NULL; jpayne@69: return __Pyx_PyUnicode_FromStringAndSize(c_str, len); jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { jpayne@69: Py_ssize_t len = __Pyx_ssize_strlen(c_str); jpayne@69: if (unlikely(len < 0)) return NULL; jpayne@69: return PyByteArray_FromStringAndSize(c_str, len); jpayne@69: } jpayne@69: static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { jpayne@69: Py_ssize_t ignore; jpayne@69: return __Pyx_PyObject_AsStringAndSize(o, &ignore); jpayne@69: } jpayne@69: #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT jpayne@69: #if !CYTHON_PEP393_ENABLED jpayne@69: static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { jpayne@69: char* defenc_c; jpayne@69: PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); jpayne@69: if (!defenc) return NULL; jpayne@69: defenc_c = PyBytes_AS_STRING(defenc); jpayne@69: #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII jpayne@69: { jpayne@69: char* end = defenc_c + PyBytes_GET_SIZE(defenc); jpayne@69: char* c; jpayne@69: for (c = defenc_c; c < end; c++) { jpayne@69: if ((unsigned char) (*c) >= 128) { jpayne@69: PyUnicode_AsASCIIString(o); jpayne@69: return NULL; jpayne@69: } jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: *length = PyBytes_GET_SIZE(defenc); jpayne@69: return defenc_c; jpayne@69: } jpayne@69: #else jpayne@69: static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { jpayne@69: if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; jpayne@69: #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII jpayne@69: if (likely(PyUnicode_IS_ASCII(o))) { jpayne@69: *length = PyUnicode_GET_LENGTH(o); jpayne@69: return PyUnicode_AsUTF8(o); jpayne@69: } else { jpayne@69: PyUnicode_AsASCIIString(o); jpayne@69: return NULL; jpayne@69: } jpayne@69: #else jpayne@69: return PyUnicode_AsUTF8AndSize(o, length); jpayne@69: #endif jpayne@69: } jpayne@69: #endif jpayne@69: #endif jpayne@69: static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { jpayne@69: #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT jpayne@69: if ( jpayne@69: #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII jpayne@69: __Pyx_sys_getdefaultencoding_not_ascii && jpayne@69: #endif jpayne@69: PyUnicode_Check(o)) { jpayne@69: return __Pyx_PyUnicode_AsStringAndSize(o, length); jpayne@69: } else jpayne@69: #endif jpayne@69: #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) jpayne@69: if (PyByteArray_Check(o)) { jpayne@69: *length = PyByteArray_GET_SIZE(o); jpayne@69: return PyByteArray_AS_STRING(o); jpayne@69: } else jpayne@69: #endif jpayne@69: { jpayne@69: char* result; jpayne@69: int r = PyBytes_AsStringAndSize(o, &result, length); jpayne@69: if (unlikely(r < 0)) { jpayne@69: return NULL; jpayne@69: } else { jpayne@69: return result; jpayne@69: } jpayne@69: } jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { jpayne@69: int is_true = x == Py_True; jpayne@69: if (is_true | (x == Py_False) | (x == Py_None)) return is_true; jpayne@69: else return PyObject_IsTrue(x); jpayne@69: } jpayne@69: static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { jpayne@69: int retval; jpayne@69: if (unlikely(!x)) return -1; jpayne@69: retval = __Pyx_PyObject_IsTrue(x); jpayne@69: Py_DECREF(x); jpayne@69: return retval; jpayne@69: } jpayne@69: static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { jpayne@69: __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); jpayne@69: #if PY_MAJOR_VERSION >= 3 jpayne@69: if (PyLong_Check(result)) { jpayne@69: if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, jpayne@69: "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " jpayne@69: "The ability to return an instance of a strict subclass of int is deprecated, " jpayne@69: "and may be removed in a future version of Python.", jpayne@69: result_type_name)) { jpayne@69: __Pyx_DECREF_TypeName(result_type_name); jpayne@69: Py_DECREF(result); jpayne@69: return NULL; jpayne@69: } jpayne@69: __Pyx_DECREF_TypeName(result_type_name); jpayne@69: return result; jpayne@69: } jpayne@69: #endif jpayne@69: PyErr_Format(PyExc_TypeError, jpayne@69: "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", jpayne@69: type_name, type_name, result_type_name); jpayne@69: __Pyx_DECREF_TypeName(result_type_name); jpayne@69: Py_DECREF(result); jpayne@69: return NULL; jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: PyNumberMethods *m; jpayne@69: #endif jpayne@69: const char *name = NULL; jpayne@69: PyObject *res = NULL; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_Check(x) || PyLong_Check(x))) jpayne@69: #else jpayne@69: if (likely(PyLong_Check(x))) jpayne@69: #endif jpayne@69: return __Pyx_NewRef(x); jpayne@69: #if CYTHON_USE_TYPE_SLOTS jpayne@69: m = Py_TYPE(x)->tp_as_number; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (m && m->nb_int) { jpayne@69: name = "int"; jpayne@69: res = m->nb_int(x); jpayne@69: } jpayne@69: else if (m && m->nb_long) { jpayne@69: name = "long"; jpayne@69: res = m->nb_long(x); jpayne@69: } jpayne@69: #else jpayne@69: if (likely(m && m->nb_int)) { jpayne@69: name = "int"; jpayne@69: res = m->nb_int(x); jpayne@69: } jpayne@69: #endif jpayne@69: #else jpayne@69: if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { jpayne@69: res = PyNumber_Int(x); jpayne@69: } jpayne@69: #endif jpayne@69: if (likely(res)) { jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { jpayne@69: #else jpayne@69: if (unlikely(!PyLong_CheckExact(res))) { jpayne@69: #endif jpayne@69: return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); jpayne@69: } jpayne@69: } jpayne@69: else if (!PyErr_Occurred()) { jpayne@69: PyErr_SetString(PyExc_TypeError, jpayne@69: "an integer is required"); jpayne@69: } jpayne@69: return res; jpayne@69: } jpayne@69: static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { jpayne@69: Py_ssize_t ival; jpayne@69: PyObject *x; jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: if (likely(PyInt_CheckExact(b))) { jpayne@69: if (sizeof(Py_ssize_t) >= sizeof(long)) jpayne@69: return PyInt_AS_LONG(b); jpayne@69: else jpayne@69: return PyInt_AsSsize_t(b); jpayne@69: } jpayne@69: #endif jpayne@69: if (likely(PyLong_CheckExact(b))) { jpayne@69: #if CYTHON_USE_PYLONG_INTERNALS jpayne@69: if (likely(__Pyx_PyLong_IsCompact(b))) { jpayne@69: return __Pyx_PyLong_CompactValue(b); jpayne@69: } else { jpayne@69: const digit* digits = __Pyx_PyLong_Digits(b); jpayne@69: const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); jpayne@69: switch (size) { jpayne@69: case 2: jpayne@69: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { jpayne@69: return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); jpayne@69: } jpayne@69: break; jpayne@69: case -2: jpayne@69: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { jpayne@69: return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); jpayne@69: } jpayne@69: break; jpayne@69: case 3: jpayne@69: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { jpayne@69: return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); jpayne@69: } jpayne@69: break; jpayne@69: case -3: jpayne@69: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { jpayne@69: return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); jpayne@69: } jpayne@69: break; jpayne@69: case 4: jpayne@69: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: } jpayne@69: break; jpayne@69: case -4: jpayne@69: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { jpayne@69: 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])); jpayne@69: } jpayne@69: break; jpayne@69: } jpayne@69: } jpayne@69: #endif jpayne@69: return PyLong_AsSsize_t(b); jpayne@69: } jpayne@69: x = PyNumber_Index(b); jpayne@69: if (!x) return -1; jpayne@69: ival = PyInt_AsSsize_t(x); jpayne@69: Py_DECREF(x); jpayne@69: return ival; jpayne@69: } jpayne@69: static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { jpayne@69: if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { jpayne@69: return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); jpayne@69: #if PY_MAJOR_VERSION < 3 jpayne@69: } else if (likely(PyInt_CheckExact(o))) { jpayne@69: return PyInt_AS_LONG(o); jpayne@69: #endif jpayne@69: } else { jpayne@69: Py_ssize_t ival; jpayne@69: PyObject *x; jpayne@69: x = PyNumber_Index(o); jpayne@69: if (!x) return -1; jpayne@69: ival = PyInt_AsLong(x); jpayne@69: Py_DECREF(x); jpayne@69: return ival; jpayne@69: } jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { jpayne@69: return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); jpayne@69: } jpayne@69: static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { jpayne@69: return PyInt_FromSize_t(ival); jpayne@69: } jpayne@69: jpayne@69: jpayne@69: /* #### Code section: utility_code_pragmas_end ### */ jpayne@69: #ifdef _MSC_VER jpayne@69: #pragma warning( pop ) jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: jpayne@69: /* #### Code section: end ### */ jpayne@69: #endif /* Py_PYTHON_H */