/* Generated by Cython 0.17.2 on Mon Sep 30 14:00:16 2013 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__vcfutils #define __PYX_HAVE_API__vcfutils #include "string.h" #include "stdlib.h" #include "stdio.h" #include "ctype.h" #include "unistd.h" #include "razf.h" #include "stdint.h" #include "bam.h" #include "sam.h" #include "pysam_util.h" #include "math.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif /* inline attribute */ #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif /* unused attribute */ #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ /* Type Conversion Predeclarations */ #define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) #define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "vcfutils.pyx", "fastafile.pxd", "samtoolsWrapper.pxd", "variant.pxd", "cwindow.pxd", "cpopulation.pxd", "bamfileutils.pxd", "chaplotype.pxd", "cgenotype.pxd", }; /*--- Type declarations ---*/ struct __pyx_obj_7variant_VariantCandidateGenerator; struct __pyx_obj_10chaplotype_Haplotype; struct __pyx_obj_9fastafile_FastaFile; struct __pyx_obj_15samtoolsWrapper_AlignedRead; struct __pyx_obj_7cwindow_ReadArray; struct __pyx_obj_15samtoolsWrapper_IteratorRow; struct __pyx_obj_9cgenotype_HaploidGenotype; struct __pyx_obj_11cpopulation_Population; struct __pyx_obj_15samtoolsWrapper_Samfile; struct __pyx_obj_15samtoolsWrapper_IteratorRowAll; struct __pyx_obj_9cgenotype_DiploidGenotype; struct __pyx_obj_9fastafile_FastaIndex; struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding; struct __pyx_obj_12bamfileutils_MultiBamFileReader; struct __pyx_obj_12bamfileutils_MultiBamFileIterator; struct __pyx_obj_7cwindow_bamReadBuffer; struct __pyx_obj_7variant_Variant; struct __pyx_obj_12bamfileutils_BamFileIterator; struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr; struct __pyx_opt_args_15samtoolsWrapper_7Samfile__open; struct __pyx_opt_args_15samtoolsWrapper_7Samfile__parseRegion; struct __pyx_t_15samtoolsWrapper_cAlignedRead; typedef struct __pyx_t_15samtoolsWrapper_cAlignedRead __pyx_t_15samtoolsWrapper_cAlignedRead; /* "samtoolsWrapper.pxd":254 * cdef int _isOpen( self ) * cdef _hasIndex( self ) * cpdef _open(self, mode, loadIndex=*) # <<<<<<<<<<<<<< * cdef char* getrname(self, int tid) * cdef _parseRegion(self, reference=*, start=*, end=*, region=*) */ struct __pyx_opt_args_15samtoolsWrapper_7Samfile__open { int __pyx_n; PyObject *loadIndex; }; /* "samtoolsWrapper.pxd":256 * cpdef _open(self, mode, loadIndex=*) * cdef char* getrname(self, int tid) * cdef _parseRegion(self, reference=*, start=*, end=*, region=*) # <<<<<<<<<<<<<< * cpdef IteratorRow fetch(self, char* reference, int start, int end) * cpdef IteratorRowAll fetchAllReads(self) */ struct __pyx_opt_args_15samtoolsWrapper_7Samfile__parseRegion { int __pyx_n; PyObject *reference; PyObject *start; PyObject *end; PyObject *region; }; /* "samtoolsWrapper.pxd":311 * ################################################################################################### * * ctypedef struct cAlignedRead: # <<<<<<<<<<<<<< * char* seq * char* qual */ struct __pyx_t_15samtoolsWrapper_cAlignedRead { char *seq; char *qual; short *cigarOps; short *hash; short mateChromID; short cigarLen; short chromID; short rlen; int pos; int end; int insertSize; int matePos; int bitFlag; char mapq; }; struct __pyx_opt_args_10chaplotype_9Haplotype_getReferenceSequence; /* "chaplotype.pxd":47 * double* alignReads(self, int individualIndex, cAlignedRead** start, cAlignedRead** end, cAlignedRead** badReadStart, cAlignedRead** badReadsEnd, cAlignedRead** brokenReadsStart, cAlignedRead** brokenReadsEnd, int useMapQualCap, int printAlignments) * double alignSingleRead(self, cAlignedRead* theRead, int useMapQualCap, int printAlignments) * char* getReferenceSequence(self, prefix=*) # <<<<<<<<<<<<<< * char* getMutatedSequence(self) * dict vcfINFO(self) */ struct __pyx_opt_args_10chaplotype_9Haplotype_getReferenceSequence { int __pyx_n; PyObject *prefix; }; /* "variant.pxd":42 * ################################################################################################### * * cdef class VariantCandidateGenerator: # <<<<<<<<<<<<<< * cdef int CIGAR_M * cdef int CIGAR_I */ struct __pyx_obj_7variant_VariantCandidateGenerator { PyObject_HEAD struct __pyx_vtabstruct_7variant_VariantCandidateGenerator *__pyx_vtab; int CIGAR_M; int CIGAR_I; int CIGAR_D; int CIGAR_N; int CIGAR_S; int CIGAR_H; int CIGAR_P; int minMapQual; int minBaseQual; int minFlank; int refId; int maxCoverage; int verbosity; int genSNPs; int genIndels; int maxReadLength; long rStart; long rEnd; long refSeqStart; long refSeqEnd; char *refSeq; PyObject *variantHeap; PyObject *pyRefSeq; PyObject *rname; struct __pyx_obj_9fastafile_FastaFile *refFile; PyObject *options; int qualBinSize; }; /* "chaplotype.pxd":14 * cdef int computeOverlapOfReadAndHaplotype(int hapStart, int hapEnd, cAlignedRead* theRead) * * cdef class Haplotype: # <<<<<<<<<<<<<< * cdef: * bytes refName */ struct __pyx_obj_10chaplotype_Haplotype { PyObject_HEAD struct __pyx_vtabstruct_10chaplotype_Haplotype *__pyx_vtab; PyObject *refName; int startPos; int endPos; int maxReadLength; int minVarPos; int maxVarPos; PyObject *variants; PyObject *haplotypeSequence; char *cHaplotypeSequence; struct __pyx_obj_9fastafile_FastaFile *refFile; PyObject *options; double *likelihoodCache; int lenCache; int lastIndividualIndex; PyObject *referenceSequence; int hash; int hapLen; int hasIndel; int nBaseChangesFromRef; int verbosity; int endBufferSize; char *cHomopolQ; short *localGapOpen; short *hapSequenceHash; short *hapSequenceNextArray; PyObject *indelErrorModel; int useIndelErrorModel; PyObject *localGapOpenQ; char *cLocalGapOpenQ; }; /* "fastafile.pxd":5 * cdef dict getRefs(self, int parseNCBI) * * cdef class FastaFile(object): # <<<<<<<<<<<<<< * cdef object theFile * cdef FastaIndex theIndex */ struct __pyx_obj_9fastafile_FastaFile { PyObject_HEAD struct __pyx_vtabstruct_9fastafile_FastaFile *__pyx_vtab; PyObject *theFile; struct __pyx_obj_9fastafile_FastaIndex *theIndex; PyObject *refs; PyObject *cache; PyObject *cacheRefName; PY_LONG_LONG cacheStartPos; PY_LONG_LONG cacheEndPos; }; /* "samtoolsWrapper.pxd":266 * ################################################################################################### * * cdef class AlignedRead: # <<<<<<<<<<<<<< * cdef bam1_t* _delegate * cdef int hashValue */ struct __pyx_obj_15samtoolsWrapper_AlignedRead { PyObject_HEAD struct __pyx_vtabstruct_15samtoolsWrapper_AlignedRead *__pyx_vtab; bam1_t *_delegate; int hashValue; int readEnd; char *_seq; char *_qual; }; /* "cwindow.pxd":14 * ################################################################################################### * * cdef class ReadArray: # <<<<<<<<<<<<<< * cdef cAlignedRead** array * cdef cAlignedRead** windowStart */ struct __pyx_obj_7cwindow_ReadArray { PyObject_HEAD struct __pyx_vtabstruct_7cwindow_ReadArray *__pyx_vtab; __pyx_t_15samtoolsWrapper_cAlignedRead **array; __pyx_t_15samtoolsWrapper_cAlignedRead **windowStart; __pyx_t_15samtoolsWrapper_cAlignedRead **windowEnd; int __pyx___size; int __pyx___capacity; int __pyx___longestRead; }; /* "samtoolsWrapper.pxd":225 * cdef class Samfile * * cdef class IteratorRow: # <<<<<<<<<<<<<< * cdef bam_fetch_iterator_t* bam_iter # iterator state object * cdef bam1_t* b */ struct __pyx_obj_15samtoolsWrapper_IteratorRow { PyObject_HEAD struct __pyx_vtabstruct_15samtoolsWrapper_IteratorRow *__pyx_vtab; bam_fetch_iterator_t *bam_iter; bam1_t *b; int useIndex; }; /* "cgenotype.pxd":15 * cdef double calculateDataLikelihood(DiploidGenotype self, cAlignedRead** start, cAlignedRead** end, cAlignedRead** badReadsStart, cAlignedRead** badReadsEnd, cAlignedRead** brokenMatesStart, cAlignedRead** brokenMatesEnd, int individualIndex, int nIndividuals, double* gof, int printAlignments) * * cdef class HaploidGenotype: # <<<<<<<<<<<<<< * cdef Haplotype hap1 * cdef double calculateDataLikelihood(self, cAlignedRead** start, cAlignedRead** end, int individualIndex, int nIndividuals) */ struct __pyx_obj_9cgenotype_HaploidGenotype { PyObject_HEAD struct __pyx_vtabstruct_9cgenotype_HaploidGenotype *__pyx_vtab; struct __pyx_obj_10chaplotype_Haplotype *hap1; }; /* "cpopulation.pxd":12 * ################################################################################################### * * cdef class Population: # <<<<<<<<<<<<<< * * # Class variables */ struct __pyx_obj_11cpopulation_Population { PyObject_HEAD struct __pyx_vtabstruct_11cpopulation_Population *__pyx_vtab; PyObject *vcfInfo; PyObject *vcfFilter; PyObject *varsByPos; PyObject *variantPosteriors; PyObject *genotypeCalls; PyObject *variants; PyObject *haplotypes; PyObject *genotypes; double **genotypeLikelihoods; double **goodnessOfFitValues; double **EMLikelihoods; double *frequencies; double *newFrequencies; int **haplotypeIndexes; int *nReads; double *maxLogLikelihoods; double *freqsPrimeByHapIndex; int nVariants; int nHaplotypes; int nIndividuals; int maxHaplotypes; int maxGenotypes; int ploidy; int nGenotypes; int verbosity; int printAlignments; int useEMLikelihoods; PyObject *readBuffers; struct __pyx_obj_9fastafile_FastaFile *refFile; PyObject *options; }; /* "samtoolsWrapper.pxd":223 * * ################################################################################################### * cdef class Samfile # <<<<<<<<<<<<<< * * cdef class IteratorRow: */ struct __pyx_obj_15samtoolsWrapper_Samfile { PyObject_HEAD struct __pyx_vtabstruct_15samtoolsWrapper_Samfile *__pyx_vtab; char *filename; samfile_t *samfile; bam_index_t *index; int isbam; PyObject *indexesByRegion; PyObject *lock; }; /* "samtoolsWrapper.pxd":233 * ################################################################################################### * * cdef class IteratorRowAll: # <<<<<<<<<<<<<< * cdef bam1_t* b * cdef samfile_t* fp */ struct __pyx_obj_15samtoolsWrapper_IteratorRowAll { PyObject_HEAD struct __pyx_vtabstruct_15samtoolsWrapper_IteratorRowAll *__pyx_vtab; bam1_t *b; samfile_t *fp; }; /* "cgenotype.pxd":8 * from samtoolsWrapper cimport cAlignedRead * * cdef class DiploidGenotype: # <<<<<<<<<<<<<< * cdef Haplotype hap1 * cdef Haplotype hap2 */ struct __pyx_obj_9cgenotype_DiploidGenotype { PyObject_HEAD struct __pyx_vtabstruct_9cgenotype_DiploidGenotype *__pyx_vtab; struct __pyx_obj_10chaplotype_Haplotype *hap1; struct __pyx_obj_10chaplotype_Haplotype *hap2; double hap1Like; double hap2Like; }; /* "fastafile.pxd":1 * cdef class FastaIndex: # <<<<<<<<<<<<<< * cdef object theFile * cdef dict getRefs(self, int parseNCBI) */ struct __pyx_obj_9fastafile_FastaIndex { PyObject_HEAD struct __pyx_vtabstruct_9fastafile_FastaIndex *__pyx_vtab; PyObject *theFile; }; /* "vcfutils.pyx":584 * ################################################################################################### * * def trimLeftPadding(vcfDataLine): # <<<<<<<<<<<<<< * """ * This is a small hack to make sure that no un-needed left padding is left */ struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding { PyObject_HEAD PyObject *__pyx_v_alt; }; /* "bamfileutils.pxd":22 * ################################################################################################### * * cdef class MultiBamFileReader(object): # <<<<<<<<<<<<<< * cdef public object files * cpdef getRName(self, int refId) */ struct __pyx_obj_12bamfileutils_MultiBamFileReader { PyObject_HEAD struct __pyx_vtabstruct_12bamfileutils_MultiBamFileReader *__pyx_vtab; PyObject *files; }; /* "bamfileutils.pxd":14 * ################################################################################################### * * cdef class MultiBamFileIterator(object): # <<<<<<<<<<<<<< * cdef public list files * cdef list queue */ struct __pyx_obj_12bamfileutils_MultiBamFileIterator { PyObject_HEAD PyObject *files; PyObject *queue; int nReadsInQueue; struct __pyx_obj_15samtoolsWrapper_AlignedRead *lastRead; }; /* "cwindow.pxd":29 * ################################################################################################### * * cdef class bamReadBuffer: # <<<<<<<<<<<<<< * cdef char* chrom * cdef int chromID */ struct __pyx_obj_7cwindow_bamReadBuffer { PyObject_HEAD struct __pyx_vtabstruct_7cwindow_bamReadBuffer *__pyx_vtab; char *chrom; int chromID; int *filteredReadCountsByType; int isSorted; int startBase; int endBase; int windowStartBase; int windowEndBase; int maxReads; int minMapQual; int verbosity; int minGoodBases; __pyx_t_15samtoolsWrapper_cAlignedRead *lastRead; PyObject *sample; struct __pyx_obj_7cwindow_ReadArray *reads; struct __pyx_obj_7cwindow_ReadArray *badReads; struct __pyx_obj_7cwindow_ReadArray *brokenMates; }; /* "variant.pxd":16 * ################################################################################################### * * cdef class Variant: # <<<<<<<<<<<<<< * cdef: * public bytes refName */ struct __pyx_obj_7variant_Variant { PyObject_HEAD struct __pyx_vtabstruct_7variant_Variant *__pyx_vtab; PyObject *refName; PyObject *added; PyObject *removed; PyObject *bamAdded; PyObject *bamRemoved; int refPos; int bamMinPos; int bamMaxPos; int minRefPos; int maxRefPos; int nSupportingReads; int varSource; int hashValue; int nAdded; int nRemoved; int varType; }; /* "bamfileutils.pxd":7 * ################################################################################################### * * cdef class BamFileIterator(object): # <<<<<<<<<<<<<< * cdef public object iterator * cdef public AlignedRead currentValue */ struct __pyx_obj_12bamfileutils_BamFileIterator { PyObject_HEAD struct __pyx_vtabstruct_12bamfileutils_BamFileIterator *__pyx_vtab; PyObject *iterator; struct __pyx_obj_15samtoolsWrapper_AlignedRead *currentValue; }; /* "vcfutils.pyx":598 * else: * for i in range(1,min(len(ref),min(map(len,alt)))): * if len(set(allele[0].upper() for allele in alt)) > 1 or ref[0].upper() != alt[0][0].upper(): # <<<<<<<<<<<<<< * break * # ?? */ struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr { PyObject_HEAD struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *__pyx_outer_scope; PyObject *__pyx_v_allele; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "cwindow.pxd":14 * ################################################################################################### * * cdef class ReadArray: # <<<<<<<<<<<<<< * cdef cAlignedRead** array * cdef cAlignedRead** windowStart */ struct __pyx_vtabstruct_7cwindow_ReadArray { int (*getSize)(struct __pyx_obj_7cwindow_ReadArray *); void (*append)(struct __pyx_obj_7cwindow_ReadArray *, __pyx_t_15samtoolsWrapper_cAlignedRead *); void (*setWindowPointers)(struct __pyx_obj_7cwindow_ReadArray *, int, int); void (*setWindowPointersBasedOnMatePos)(struct __pyx_obj_7cwindow_ReadArray *, int, int); int (*getLengthOfLongestRead)(struct __pyx_obj_7cwindow_ReadArray *); }; static struct __pyx_vtabstruct_7cwindow_ReadArray *__pyx_vtabptr_7cwindow_ReadArray; /* "bamfileutils.pxd":22 * ################################################################################################### * * cdef class MultiBamFileReader(object): # <<<<<<<<<<<<<< * cdef public object files * cpdef getRName(self, int refId) */ struct __pyx_vtabstruct_12bamfileutils_MultiBamFileReader { PyObject *(*getRName)(struct __pyx_obj_12bamfileutils_MultiBamFileReader *, int, int __pyx_skip_dispatch); struct __pyx_obj_12bamfileutils_MultiBamFileIterator *(*fetch)(struct __pyx_obj_12bamfileutils_MultiBamFileReader *, char *, int, int, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_12bamfileutils_MultiBamFileReader *__pyx_vtabptr_12bamfileutils_MultiBamFileReader; /* "cwindow.pxd":29 * ################################################################################################### * * cdef class bamReadBuffer: # <<<<<<<<<<<<<< * cdef char* chrom * cdef int chromID */ struct __pyx_vtabstruct_7cwindow_bamReadBuffer { void (*setWindowPointers)(struct __pyx_obj_7cwindow_bamReadBuffer *, int, int, int, int, char *, int); void (*recompressReadsInCurrentWindow)(struct __pyx_obj_7cwindow_bamReadBuffer *, int, int, char *, int, int); void (*addReadToBuffer)(struct __pyx_obj_7cwindow_bamReadBuffer *, __pyx_t_15samtoolsWrapper_cAlignedRead *); int (*countImproperPairs)(struct __pyx_obj_7cwindow_bamReadBuffer *); int (*countAlignmentGaps)(struct __pyx_obj_7cwindow_bamReadBuffer *); void (*sortReads)(struct __pyx_obj_7cwindow_bamReadBuffer *); void (*sortBrokenMates)(struct __pyx_obj_7cwindow_bamReadBuffer *); void (*logFilterSummary)(struct __pyx_obj_7cwindow_bamReadBuffer *); }; static struct __pyx_vtabstruct_7cwindow_bamReadBuffer *__pyx_vtabptr_7cwindow_bamReadBuffer; /* "fastafile.pxd":1 * cdef class FastaIndex: # <<<<<<<<<<<<<< * cdef object theFile * cdef dict getRefs(self, int parseNCBI) */ struct __pyx_vtabstruct_9fastafile_FastaIndex { PyObject *(*getRefs)(struct __pyx_obj_9fastafile_FastaIndex *, int); }; static struct __pyx_vtabstruct_9fastafile_FastaIndex *__pyx_vtabptr_9fastafile_FastaIndex; /* "samtoolsWrapper.pxd":223 * * ################################################################################################### * cdef class Samfile # <<<<<<<<<<<<<< * * cdef class IteratorRow: */ struct __pyx_vtabstruct_15samtoolsWrapper_Samfile { void (*clearHeader)(struct __pyx_obj_15samtoolsWrapper_Samfile *); void (*clearIndex)(struct __pyx_obj_15samtoolsWrapper_Samfile *); void (*createCache)(struct __pyx_obj_15samtoolsWrapper_Samfile *); void (*clearCache)(struct __pyx_obj_15samtoolsWrapper_Samfile *); int (*_isOpen)(struct __pyx_obj_15samtoolsWrapper_Samfile *); PyObject *(*_hasIndex)(struct __pyx_obj_15samtoolsWrapper_Samfile *); PyObject *(*_open)(struct __pyx_obj_15samtoolsWrapper_Samfile *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_15samtoolsWrapper_7Samfile__open *__pyx_optional_args); char *(*getrname)(struct __pyx_obj_15samtoolsWrapper_Samfile *, int); PyObject *(*_parseRegion)(struct __pyx_obj_15samtoolsWrapper_Samfile *, struct __pyx_opt_args_15samtoolsWrapper_7Samfile__parseRegion *__pyx_optional_args); struct __pyx_obj_15samtoolsWrapper_IteratorRow *(*fetch)(struct __pyx_obj_15samtoolsWrapper_Samfile *, char *, int, int, int __pyx_skip_dispatch); struct __pyx_obj_15samtoolsWrapper_IteratorRowAll *(*fetchAllReads)(struct __pyx_obj_15samtoolsWrapper_Samfile *, int __pyx_skip_dispatch); PyObject *(*close)(struct __pyx_obj_15samtoolsWrapper_Samfile *, int __pyx_skip_dispatch); void (*loadOffsetsForRegions)(struct __pyx_obj_15samtoolsWrapper_Samfile *, PyObject *); void (*openBAMFile)(struct __pyx_obj_15samtoolsWrapper_Samfile *, PyObject *); }; static struct __pyx_vtabstruct_15samtoolsWrapper_Samfile *__pyx_vtabptr_15samtoolsWrapper_Samfile; /* "chaplotype.pxd":14 * cdef int computeOverlapOfReadAndHaplotype(int hapStart, int hapEnd, cAlignedRead* theRead) * * cdef class Haplotype: # <<<<<<<<<<<<<< * cdef: * bytes refName */ struct __pyx_vtabstruct_10chaplotype_Haplotype { double *(*alignReads)(struct __pyx_obj_10chaplotype_Haplotype *, int, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, int, int); double (*alignSingleRead)(struct __pyx_obj_10chaplotype_Haplotype *, __pyx_t_15samtoolsWrapper_cAlignedRead *, int, int); char *(*getReferenceSequence)(struct __pyx_obj_10chaplotype_Haplotype *, struct __pyx_opt_args_10chaplotype_9Haplotype_getReferenceSequence *__pyx_optional_args); char *(*getMutatedSequence)(struct __pyx_obj_10chaplotype_Haplotype *); PyObject *(*vcfINFO)(struct __pyx_obj_10chaplotype_Haplotype *); PyObject *(*getSequenceContext)(struct __pyx_obj_10chaplotype_Haplotype *, struct __pyx_obj_7variant_Variant *); int (*homopolymerLengthForOneVariant)(struct __pyx_obj_10chaplotype_Haplotype *, struct __pyx_obj_7variant_Variant *); PyObject *(*homopolymerLengths)(struct __pyx_obj_10chaplotype_Haplotype *); void (*annotateWithGapOpen)(struct __pyx_obj_10chaplotype_Haplotype *); }; static struct __pyx_vtabstruct_10chaplotype_Haplotype *__pyx_vtabptr_10chaplotype_Haplotype; /* "fastafile.pxd":5 * cdef dict getRefs(self, int parseNCBI) * * cdef class FastaFile(object): # <<<<<<<<<<<<<< * cdef object theFile * cdef FastaIndex theIndex */ struct __pyx_vtabstruct_9fastafile_FastaFile { PyObject *(*getCharacter)(struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PY_LONG_LONG); PyObject *(*getSequence)(struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PY_LONG_LONG, PY_LONG_LONG); void (*setCacheSequence)(struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PY_LONG_LONG, PY_LONG_LONG); }; static struct __pyx_vtabstruct_9fastafile_FastaFile *__pyx_vtabptr_9fastafile_FastaFile; /* "variant.pxd":42 * ################################################################################################### * * cdef class VariantCandidateGenerator: # <<<<<<<<<<<<<< * cdef int CIGAR_M * cdef int CIGAR_I */ struct __pyx_vtabstruct_7variant_VariantCandidateGenerator { void (*addVariantToList)(struct __pyx_obj_7variant_VariantCandidateGenerator *, struct __pyx_obj_7variant_Variant *); void (*getSnpCandidatesFromReadSegment)(struct __pyx_obj_7variant_VariantCandidateGenerator *, __pyx_t_15samtoolsWrapper_cAlignedRead *, char *, char *, int, int, int, int, int); void (*getVariantCandidatesFromSingleRead)(struct __pyx_obj_7variant_VariantCandidateGenerator *, __pyx_t_15samtoolsWrapper_cAlignedRead *); void (*addCandidatesFromReads)(struct __pyx_obj_7variant_VariantCandidateGenerator *, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **); PyObject *(*getCandidates)(struct __pyx_obj_7variant_VariantCandidateGenerator *, int); PyObject *(*getListOfSnpPositions)(struct __pyx_obj_7variant_VariantCandidateGenerator *, struct __pyx_obj_15samtoolsWrapper_AlignedRead *); PyObject *(*getListOfIndelPositions)(struct __pyx_obj_7variant_VariantCandidateGenerator *, struct __pyx_obj_15samtoolsWrapper_AlignedRead *); }; static struct __pyx_vtabstruct_7variant_VariantCandidateGenerator *__pyx_vtabptr_7variant_VariantCandidateGenerator; /* "cgenotype.pxd":8 * from samtoolsWrapper cimport cAlignedRead * * cdef class DiploidGenotype: # <<<<<<<<<<<<<< * cdef Haplotype hap1 * cdef Haplotype hap2 */ struct __pyx_vtabstruct_9cgenotype_DiploidGenotype { double (*calculateDataLikelihood)(struct __pyx_obj_9cgenotype_DiploidGenotype *, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, int, int, double *, int); }; static struct __pyx_vtabstruct_9cgenotype_DiploidGenotype *__pyx_vtabptr_9cgenotype_DiploidGenotype; /* "cpopulation.pxd":12 * ################################################################################################### * * cdef class Population: # <<<<<<<<<<<<<< * * # Class variables */ struct __pyx_vtabstruct_11cpopulation_Population { double (*calculatePosterior)(struct __pyx_obj_11cpopulation_Population *, struct __pyx_obj_7variant_Variant *); void (*computeVariantPosteriors)(struct __pyx_obj_11cpopulation_Population *); void (*computeVariantINFO)(struct __pyx_obj_11cpopulation_Population *); void (*reset)(struct __pyx_obj_11cpopulation_Population *); void (*computeVariantFILTER)(struct __pyx_obj_11cpopulation_Population *); void (*callGenotypes)(struct __pyx_obj_11cpopulation_Population *); void (*call)(struct __pyx_obj_11cpopulation_Population *, int, int); double (*EMiteration)(struct __pyx_obj_11cpopulation_Population *, double *, double *); void (*setup)(struct __pyx_obj_11cpopulation_Population *, PyObject *, PyObject *, PyObject *, int, int, int, PyObject *); }; static struct __pyx_vtabstruct_11cpopulation_Population *__pyx_vtabptr_11cpopulation_Population; /* "samtoolsWrapper.pxd":233 * ################################################################################################### * * cdef class IteratorRowAll: # <<<<<<<<<<<<<< * cdef bam1_t* b * cdef samfile_t* fp */ struct __pyx_vtabstruct_15samtoolsWrapper_IteratorRowAll { bam1_t *(*getCurrent)(struct __pyx_obj_15samtoolsWrapper_IteratorRowAll *); int (*cnext)(struct __pyx_obj_15samtoolsWrapper_IteratorRowAll *); }; static struct __pyx_vtabstruct_15samtoolsWrapper_IteratorRowAll *__pyx_vtabptr_15samtoolsWrapper_IteratorRowAll; /* "variant.pxd":16 * ################################################################################################### * * cdef class Variant: # <<<<<<<<<<<<<< * cdef: * public bytes refName */ struct __pyx_vtabstruct_7variant_Variant { double (*indelPrior)(struct __pyx_obj_7variant_Variant *, struct __pyx_obj_9fastafile_FastaFile *, int); double (*calculatePrior)(struct __pyx_obj_7variant_Variant *, struct __pyx_obj_9fastafile_FastaFile *); void (*addVariant)(struct __pyx_obj_7variant_Variant *, struct __pyx_obj_7variant_Variant *); int (*overlaps)(struct __pyx_obj_7variant_Variant *, struct __pyx_obj_7variant_Variant *); }; static struct __pyx_vtabstruct_7variant_Variant *__pyx_vtabptr_7variant_Variant; /* "samtoolsWrapper.pxd":266 * ################################################################################################### * * cdef class AlignedRead: # <<<<<<<<<<<<<< * cdef bam1_t* _delegate * cdef int hashValue */ struct __pyx_vtabstruct_15samtoolsWrapper_AlignedRead { PyObject *(*qname)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *, int __pyx_skip_dispatch); char *(*fastQName)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); char *(*seq)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); char *(*qual)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); PyObject *(*tags)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*flag)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*rname)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*getCigarLength)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*pos)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*end)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); PyObject *(*bin)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*getCigarOpCode)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *, int); int (*getCigarOpLength)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *, int); int (*rlen)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*mapq)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *, int __pyx_skip_dispatch); int (*mrnm)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*mpos)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*isize)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_paired)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_proper_pair)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_unmapped)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*mate_is_unmapped)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_reverse)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*mate_is_reverse)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_read1)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_read2)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_secondary)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_qcfail)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); int (*is_duplicate)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *); PyObject *(*opt)(struct __pyx_obj_15samtoolsWrapper_AlignedRead *, PyObject *); }; static struct __pyx_vtabstruct_15samtoolsWrapper_AlignedRead *__pyx_vtabptr_15samtoolsWrapper_AlignedRead; /* "bamfileutils.pxd":7 * ################################################################################################### * * cdef class BamFileIterator(object): # <<<<<<<<<<<<<< * cdef public object iterator * cdef public AlignedRead currentValue */ struct __pyx_vtabstruct_12bamfileutils_BamFileIterator { PyObject *(*next)(struct __pyx_obj_12bamfileutils_BamFileIterator *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_12bamfileutils_BamFileIterator *__pyx_vtabptr_12bamfileutils_BamFileIterator; /* "samtoolsWrapper.pxd":225 * cdef class Samfile * * cdef class IteratorRow: # <<<<<<<<<<<<<< * cdef bam_fetch_iterator_t* bam_iter # iterator state object * cdef bam1_t* b */ struct __pyx_vtabstruct_15samtoolsWrapper_IteratorRow { int (*cnext)(struct __pyx_obj_15samtoolsWrapper_IteratorRow *); }; static struct __pyx_vtabstruct_15samtoolsWrapper_IteratorRow *__pyx_vtabptr_15samtoolsWrapper_IteratorRow; /* "cgenotype.pxd":15 * cdef double calculateDataLikelihood(DiploidGenotype self, cAlignedRead** start, cAlignedRead** end, cAlignedRead** badReadsStart, cAlignedRead** badReadsEnd, cAlignedRead** brokenMatesStart, cAlignedRead** brokenMatesEnd, int individualIndex, int nIndividuals, double* gof, int printAlignments) * * cdef class HaploidGenotype: # <<<<<<<<<<<<<< * cdef Haplotype hap1 * cdef double calculateDataLikelihood(self, cAlignedRead** start, cAlignedRead** end, int individualIndex, int nIndividuals) */ struct __pyx_vtabstruct_9cgenotype_HaploidGenotype { double (*calculateDataLikelihood)(struct __pyx_obj_9cgenotype_HaploidGenotype *, __pyx_t_15samtoolsWrapper_cAlignedRead **, __pyx_t_15samtoolsWrapper_cAlignedRead **, int, int); }; static struct __pyx_vtabstruct_9cgenotype_HaploidGenotype *__pyx_vtabptr_9cgenotype_HaploidGenotype; #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil) \ if (acquire_gil) { \ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ PyGILState_Release(__pyx_gilstate_save); \ } else { \ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil) \ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext() \ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif /* CYTHON_REFNANNY */ #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) PyErr_SetObject(PyExc_KeyError, key); return NULL; } Py_INCREF(value); return value; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod(set, (char *)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } #define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_List_Fast(o, i) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Tuple_Fast(o, i) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } #define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Fast(o, i) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON if (PyList_CheckExact(o)) { Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { /* inlined PySequence_GetItem() */ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (unlikely(l < 0)) return NULL; i += l; } return m->sq_item(o, i); } } #else if (PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(PyList_Append(L, x) < 0)) return NULL; Py_INCREF(Py_None); return Py_None; /* this is just to have an accurate signature */ } else { PyObject *r, *m; m = __Pyx_GetAttrString(L, "append"); if (!m) return NULL; r = PyObject_CallFunctionObjArgs(m, x, NULL); Py_DECREF(m); return r; } } static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_SetItemInt_Fast(o, i, v) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) { #if CYTHON_COMPILING_IN_CPYTHON if (PyList_CheckExact(o)) { Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { /* inlined PySequence_SetItem() */ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (unlikely(l < 0)) return -1; i += l; } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (PySequence_Check(o) && !PyDict_Check(o)) { #else if (PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj) \ (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \ likely(PyInt_CheckExact(obj)) ? \ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) #else #define __Pyx_PyObject_AsDouble(obj) \ ((likely(PyFloat_CheckExact(obj))) ? \ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (unlikely(PyErr_Occurred())) return NULL; value = default_value; } Py_INCREF(value); #else if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { value = PyDict_GetItem(d, key); if (unlikely(!value)) { value = default_value; } Py_INCREF(value); } else { PyObject *m; m = __Pyx_GetAttrString(d, "get"); if (!m) return NULL; value = PyObject_CallFunctionObjArgs(m, key, (default_value == Py_None) ? NULL : default_value, NULL); Py_DECREF(m); } #endif return value; } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/ static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_Generator_USED #include #include typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *); typedef struct { PyObject_HEAD __pyx_generator_body_t body; PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; int resume_label; char is_running; // using T_BOOL for property below requires char value } __pyx_GeneratorObject; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure); static int __pyx_Generator_init(void); static int __Pyx_Generator_clear(PyObject* self); #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) #endif static int __Pyx_check_binary_version(void); static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/ #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig); /*proto*/ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'fastafile' */ static PyTypeObject *__pyx_ptype_9fastafile_FastaIndex = 0; static PyTypeObject *__pyx_ptype_9fastafile_FastaFile = 0; /* Module declarations from 'samtoolsWrapper' */ static PyTypeObject *__pyx_ptype_15samtoolsWrapper_Samfile = 0; static PyTypeObject *__pyx_ptype_15samtoolsWrapper_IteratorRow = 0; static PyTypeObject *__pyx_ptype_15samtoolsWrapper_IteratorRowAll = 0; static PyTypeObject *__pyx_ptype_15samtoolsWrapper_AlignedRead = 0; static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsReverse(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsPaired(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsProperPair(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsDuplicate(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsUnmapped(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_MateIsUnmapped(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_MateIsReverse(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsQCFail(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsReadOne(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsSecondaryAlignment(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ static CYTHON_INLINE void __pyx_f_15samtoolsWrapper_Read_SetQCFail(__pyx_t_15samtoolsWrapper_cAlignedRead *); /*proto*/ /* Module declarations from 'variant' */ static PyTypeObject *__pyx_ptype_7variant_Variant = 0; static PyTypeObject *__pyx_ptype_7variant_VariantCandidateGenerator = 0; static int *__pyx_vp_7variant_PLATYPUS_VAR = 0; #define __pyx_v_7variant_PLATYPUS_VAR (*__pyx_vp_7variant_PLATYPUS_VAR) static int *__pyx_vp_7variant_FILE_VAR = 0; #define __pyx_v_7variant_FILE_VAR (*__pyx_vp_7variant_FILE_VAR) static int *__pyx_vp_7variant_ASSEMBLER_VAR = 0; #define __pyx_v_7variant_ASSEMBLER_VAR (*__pyx_vp_7variant_ASSEMBLER_VAR) /* Module declarations from 'cython' */ /* Module declarations from 'cwindow' */ static PyTypeObject *__pyx_ptype_7cwindow_ReadArray = 0; static PyTypeObject *__pyx_ptype_7cwindow_bamReadBuffer = 0; /* Module declarations from 'cpopulation' */ static PyTypeObject *__pyx_ptype_11cpopulation_Population = 0; /* Module declarations from 'bamfileutils' */ static PyTypeObject *__pyx_ptype_12bamfileutils_BamFileIterator = 0; static PyTypeObject *__pyx_ptype_12bamfileutils_MultiBamFileIterator = 0; static PyTypeObject *__pyx_ptype_12bamfileutils_MultiBamFileReader = 0; /* Module declarations from 'chaplotype' */ static PyTypeObject *__pyx_ptype_10chaplotype_Haplotype = 0; /* Module declarations from 'cgenotype' */ static PyTypeObject *__pyx_ptype_9cgenotype_DiploidGenotype = 0; static PyTypeObject *__pyx_ptype_9cgenotype_HaploidGenotype = 0; /* Module declarations from 'platypusutils' */ static double (*__pyx_f_13platypusutils_binomial)(int, int, double); /*proto*/ static double (*__pyx_f_13platypusutils_betaBinomialCDF)(int, int, int, int); /*proto*/ /* Module declarations from 'vcfutils' */ static PyTypeObject *__pyx_ptype_8vcfutils___pyx_scope_struct__trimLeftPadding = 0; static PyTypeObject *__pyx_ptype_8vcfutils___pyx_scope_struct_1_genexpr = 0; static double __pyx_v_8vcfutils_LOG10_E; static int __pyx_v_8vcfutils_CIGAR_M; static int __pyx_v_8vcfutils_CIGAR_I; static int __pyx_v_8vcfutils_CIGAR_D; static int __pyx_v_8vcfutils_CIGAR_N; static int __pyx_v_8vcfutils_CIGAR_S; static int __pyx_v_8vcfutils_CIGAR_H; static int __pyx_v_8vcfutils_CIGAR_P; static PyObject *__pyx_f_8vcfutils_refAndAlt(char *, int, PyObject *, struct __pyx_obj_9fastafile_FastaFile *); /*proto*/ static PyObject *__pyx_f_8vcfutils_computeGenotypeCallAndLikelihoods(int, PyObject *, PyObject *, int, double *, double **, double **, int **, int **, PyObject *, int *, int, PyObject *); /*proto*/ static int __pyx_f_8vcfutils_readOverlapsVariant(__pyx_t_15samtoolsWrapper_cAlignedRead *, int, int); /*proto*/ static int __pyx_f_8vcfutils_readQualIsGoodVariantPosition(__pyx_t_15samtoolsWrapper_cAlignedRead *, int, int, int); /*proto*/ static int __pyx_f_8vcfutils_variantSupportedByRead(__pyx_t_15samtoolsWrapper_cAlignedRead *, int, int, struct __pyx_obj_7variant_Variant *); /*proto*/ static int __pyx_f_8vcfutils_computeHaplotypeScore(PyObject *); /*proto*/ static PyObject *__pyx_f_8vcfutils_getHaplotypeInfo(PyObject *, PyObject *, double *, int); /*proto*/ static double __pyx_f_8vcfutils_computeAlleleBiasPValue(int, int); /*proto*/ static double __pyx_f_8vcfutils_computeStrandBiasPValue(int, int, int, int); /*proto*/ static double __pyx_f_8vcfutils_computeSCValue(PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "vcfutils" int __pyx_module_is_main_vcfutils = 0; /* Implementation of 'vcfutils' */ static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_sorted; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_max; static PyObject *__pyx_builtin_round; static PyObject *__pyx_builtin_min; static PyObject *__pyx_builtin_map; static PyObject *__pyx_builtin_xrange; static PyObject *__pyx_builtin_sum; static PyObject *__pyx_pf_8vcfutils_outputSingleLineOfVCF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_outputFile, PyObject *__pyx_v_vcfFile, CYTHON_UNUSED PyObject *__pyx_v_options); /* proto */ static PyObject *__pyx_pf_8vcfutils_15trimLeftPadding_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_8vcfutils_2trimLeftPadding(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vcfDataLine); /* proto */ static char __pyx_k_1[] = "Haps are %s"; static char __pyx_k_2[] = "Logging mutated sequences..."; static char __pyx_k_4[] = "Lengths are %s"; static char __pyx_k_5[] = "Unfiltered variants are %s"; static char __pyx_k_6[] = "Var info = %s"; static char __pyx_k_7[] = "Unfiltered variant info is %s"; static char __pyx_k_8[] = "NVariants = %s"; static char __pyx_k_9[] = "."; static char __pyx_k_10[] = "GT:GL:GOF:GQ:NR:NV"; static char __pyx_k_11[] = "/"; static char __pyx_k_12[] = "Sample %s has genotype posterior = %s. non-ref posterior = %s. Ref posterior = %s."; static char __pyx_k_16[] = "outputSingleLineOfVCF"; static char __pyx_k_17[] = ""; static char __pyx_k_18[] = "%.0f"; static char __pyx_k_19[] = "%1.4f"; static char __pyx_k_20[] = "\nUtility code for Platypus. This is mostly concerned with processing needed to produce\nVCF output from the various data structures used by Platypus.\n"; static char __pyx_k_22[] = "Estimated population frequency of variant"; static char __pyx_k_24[] = "Posterior probability (phred scaled) that this variant segregates"; static char __pyx_k_26[] = "Total coverage at this locus"; static char __pyx_k_28[] = "Starting position of calling window"; static char __pyx_k_30[] = "End position of calling window"; static char __pyx_k_32[] = "Total reverse strand coverage at this locus"; static char __pyx_k_34[] = "Total forward strand coverage at this locus"; static char __pyx_k_36[] = "Total number of reads containing this variant"; static char __pyx_k_38[] = "Total number of forward reads containing this variant"; static char __pyx_k_40[] = "Total number of reverse reads containing this variant"; static char __pyx_k_42[] = "Worst goodness-of-fit value reported across all samples"; static char __pyx_k_44[] = "Genomic sequence 10 bases either side of variant position"; static char __pyx_k_46[] = "Homopolymer run length around variant locus"; static char __pyx_k_48[] = "Fraction of reads around this variant that failed filters"; static char __pyx_k_50[] = "Median minimum base quality for bases around variant"; static char __pyx_k_52[] = "Variant-quality/read-depth for this variant"; static char __pyx_k_54[] = "Was this variant suggested by Playtypus, Assembler, or from a VCF?"; static char __pyx_k_56[] = "Start position of reference call block"; static char __pyx_k_58[] = "End position of reference call block"; static char __pyx_k_60[] = "Size of reference call block"; static char __pyx_k_62[] = "Haplotype score measuring the number of haplotypes the variant is segregating into in a window"; static char __pyx_k_64[] = "Root mean square of mapping qualities of reads at the variant position"; static char __pyx_k_66[] = "Fisher's exact test for strand bias (Phred scale)"; static char __pyx_k_68[] = "Binomial P-value for strand bias test"; static char __pyx_k_70[] = "Mann-Whitney Rank sum test for difference between in positions of variants in reads from ref and alt"; static char __pyx_k_72[] = "Variant frequency is lower than expected for het"; static char __pyx_k_74[] = "Variant fails strand-bias filter"; static char __pyx_k_76[] = "Variant supported only by reads with low quality bases close to variant position, and not present on both strands."; static char __pyx_k_78[] = "Root-mean-square mapping quality across calling region is low."; static char __pyx_k_80[] = "Variant quality is below 20."; static char __pyx_k_82[] = "Too many haplotypes are supported by the data in this region."; static char __pyx_k_84[] = "Variant quality/Read depth ratio is low."; static char __pyx_k_86[] = "Variant fails goodness-of-fit test."; static char __pyx_k_88[] = "Flanking sequence contains homopolymer of length 10 or greater"; static char __pyx_k_90[] = "This line represents a homozygous reference call"; static char __pyx_k_92[] = "Variants fail quality/depth filter."; static char __pyx_k_94[] = "Variants fail sequence-context filter. Surrounding sequence is low-complexity"; static char __pyx_k_96[] = "Unphased genotypes"; static char __pyx_k_98[] = "Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites"; static char __pyx_k__0[] = "0"; static char __pyx_k__i[] = "i"; static char __pyx_k_100[] = "Genotype quality as phred score"; static char __pyx_k_102[] = "Goodness of fit value"; static char __pyx_k_104[] = "Number of reads covering variant location in this sample"; static char __pyx_k_106[] = "Number of reads containing variant in this sample"; static char __pyx_k_110[] = "/home/rimmer/nethome/Code/Trunk/Platypus/src/cython/vcfutils.pyx"; static char __pyx_k__BE[] = "BE"; static char __pyx_k__BS[] = "BS"; static char __pyx_k__FR[] = "FR"; static char __pyx_k__FS[] = "FS"; static char __pyx_k__GL[] = "GL"; static char __pyx_k__GQ[] = "GQ"; static char __pyx_k__GT[] = "GT"; static char __pyx_k__HP[] = "HP"; static char __pyx_k__MQ[] = "MQ"; static char __pyx_k__NF[] = "NF"; static char __pyx_k__NR[] = "NR"; static char __pyx_k__NV[] = "NV"; static char __pyx_k__PP[] = "PP"; static char __pyx_k__QD[] = "QD"; static char __pyx_k__SC[] = "SC"; static char __pyx_k__TC[] = "TC"; static char __pyx_k__TR[] = "TR"; static char __pyx_k__WE[] = "WE"; static char __pyx_k__WS[] = "WS"; static char __pyx_k__id[] = "id"; static char __pyx_k__BRF[] = "BRF"; static char __pyx_k__GOF[] = "GOF"; static char __pyx_k__Log[] = "Log"; static char __pyx_k__Q20[] = "Q20"; static char __pyx_k__TCF[] = "TCF"; static char __pyx_k__TCR[] = "TCR"; static char __pyx_k__alt[] = "alt"; static char __pyx_k__len[] = "len"; static char __pyx_k__map[] = "map"; static char __pyx_k__max[] = "max"; static char __pyx_k__min[] = "min"; static char __pyx_k__pop[] = "pop"; static char __pyx_k__pos[] = "pos"; static char __pyx_k__ref[] = "ref"; static char __pyx_k__sum[] = "sum"; static char __pyx_k__ABPV[] = "ABPV"; static char __pyx_k__File[] = "File"; static char __pyx_k__Flag[] = "Flag"; static char __pyx_k__MGOF[] = "MGOF"; static char __pyx_k__MMLQ[] = "MMLQ"; static char __pyx_k__Size[] = "Size"; static char __pyx_k__data[] = "data"; static char __pyx_k__hp10[] = "hp10"; static char __pyx_k__info[] = "info"; static char __pyx_k__join[] = "join"; static char __pyx_k__qual[] = "qual"; static char __pyx_k__Float[] = "Float"; static char __pyx_k__chrom[] = "chrom"; static char __pyx_k__debug[] = "debug"; static char __pyx_k__index[] = "index"; static char __pyx_k__pyvcf[] = "pyvcf"; static char __pyx_k__range[] = "range"; static char __pyx_k__round[] = "round"; static char __pyx_k__upper[] = "upper"; static char __pyx_k__FORMAT[] = "FORMAT"; static char __pyx_k__SbPval[] = "SbPval"; static char __pyx_k__Source[] = "Source"; static char __pyx_k__String[] = "String"; static char __pyx_k__allele[] = "allele"; static char __pyx_k__extend[] = "extend"; static char __pyx_k__filter[] = "filter"; static char __pyx_k__format[] = "format"; static char __pyx_k__logger[] = "logger"; static char __pyx_k__maxGOF[] = "maxGOF"; static char __pyx_k__sorted[] = "sorted"; static char __pyx_k__xrange[] = "xrange"; static char __pyx_k__Integer[] = "Integer"; static char __pyx_k__REFCALL[] = "REFCALL"; static char __pyx_k__genexpr[] = "genexpr"; static char __pyx_k__logging[] = "logging"; static char __pyx_k__options[] = "options"; static char __pyx_k__refName[] = "refName"; static char __pyx_k__reverse[] = "reverse"; static char __pyx_k__vcfFile[] = "vcfFile"; static char __pyx_k__HapScore[] = "HapScore"; static char __pyx_k__Platypus[] = "Platypus"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__badReads[] = "badReads"; static char __pyx_k__minReads[] = "minReads"; static char __pyx_k__vcfutils[] = "vcfutils"; static char __pyx_k__Assembler[] = "Assembler"; static char __pyx_k__QualDepth[] = "QualDepth"; static char __pyx_k__enumerate[] = "enumerate"; static char __pyx_k__getLogger[] = "getLogger"; static char __pyx_k__getfilter[] = "getfilter"; static char __pyx_k__iteritems[] = "iteritems"; static char __pyx_k__maxRefPos[] = "maxRefPos"; static char __pyx_k__minRefPos[] = "minRefPos"; static char __pyx_k__verbosity[] = "verbosity"; static char __pyx_k__alleleBias[] = "alleleBias"; static char __pyx_k__minMapQual[] = "minMapQual"; static char __pyx_k__outputFile[] = "outputFile"; static char __pyx_k__strandBias[] = "strandBias"; static char __pyx_k__write_data[] = "write_data"; static char __pyx_k__abThreshold[] = "abThreshold"; static char __pyx_k__minBaseQual[] = "minBaseQual"; static char __pyx_k__qdThreshold[] = "qdThreshold"; static char __pyx_k__sbThreshold[] = "sbThreshold"; static char __pyx_k__scThreshold[] = "scThreshold"; static char __pyx_k__vcfDataLine[] = "vcfDataLine"; static char __pyx_k__minPosterior[] = "minPosterior"; static char __pyx_k__ReadPosRankSum[] = "ReadPosRankSum"; static char __pyx_k__badReadsWindow[] = "badReadsWindow"; static char __pyx_k__outputRefCalls[] = "outputRefCalls"; static char __pyx_k__rmsmqThreshold[] = "rmsmqThreshold"; static char __pyx_k__nReadsPerSample[] = "nReadsPerSample"; static char __pyx_k__trimLeftPadding[] = "trimLeftPadding"; static char __pyx_k__vcfInfoSignature[] = "vcfInfoSignature"; static char __pyx_k__badReadsThreshold[] = "badReadsThreshold"; static char __pyx_k__filteredReadsFrac[] = "filteredReadsFrac"; static char __pyx_k__hapScoreThreshold[] = "hapScoreThreshold"; static char __pyx_k__nVarReadsPerSample[] = "nVarReadsPerSample"; static char __pyx_k__vcfFilterSignature[] = "vcfFilterSignature"; static char __pyx_k__vcfFormatSignature[] = "vcfFormatSignature"; static PyObject *__pyx_kp_s_1; static PyObject *__pyx_kp_s_10; static PyObject *__pyx_kp_s_100; static PyObject *__pyx_kp_s_102; static PyObject *__pyx_kp_s_104; static PyObject *__pyx_kp_s_106; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_kp_s_110; static PyObject *__pyx_kp_s_12; static PyObject *__pyx_n_s_16; static PyObject *__pyx_kp_s_17; static PyObject *__pyx_kp_s_18; static PyObject *__pyx_kp_s_19; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_kp_s_22; static PyObject *__pyx_kp_s_24; static PyObject *__pyx_kp_s_26; static PyObject *__pyx_kp_s_28; static PyObject *__pyx_kp_s_30; static PyObject *__pyx_kp_s_32; static PyObject *__pyx_kp_s_34; static PyObject *__pyx_kp_s_36; static PyObject *__pyx_kp_s_38; static PyObject *__pyx_kp_s_4; static PyObject *__pyx_kp_s_40; static PyObject *__pyx_kp_s_42; static PyObject *__pyx_kp_s_44; static PyObject *__pyx_kp_s_46; static PyObject *__pyx_kp_s_48; static PyObject *__pyx_kp_s_5; static PyObject *__pyx_kp_s_50; static PyObject *__pyx_kp_s_52; static PyObject *__pyx_kp_s_54; static PyObject *__pyx_kp_s_56; static PyObject *__pyx_kp_s_58; static PyObject *__pyx_kp_s_6; static PyObject *__pyx_kp_s_60; static PyObject *__pyx_kp_s_62; static PyObject *__pyx_kp_s_64; static PyObject *__pyx_kp_s_66; static PyObject *__pyx_kp_s_68; static PyObject *__pyx_kp_s_7; static PyObject *__pyx_kp_s_70; static PyObject *__pyx_kp_s_72; static PyObject *__pyx_kp_s_74; static PyObject *__pyx_kp_s_76; static PyObject *__pyx_kp_s_78; static PyObject *__pyx_kp_s_8; static PyObject *__pyx_kp_s_80; static PyObject *__pyx_kp_s_82; static PyObject *__pyx_kp_s_84; static PyObject *__pyx_kp_s_86; static PyObject *__pyx_kp_s_88; static PyObject *__pyx_kp_s_9; static PyObject *__pyx_kp_s_90; static PyObject *__pyx_kp_s_92; static PyObject *__pyx_kp_s_94; static PyObject *__pyx_kp_s_96; static PyObject *__pyx_kp_s_98; static PyObject *__pyx_kp_s__0; static PyObject *__pyx_n_s__ABPV; static PyObject *__pyx_n_s__Assembler; static PyObject *__pyx_n_s__BE; static PyObject *__pyx_n_s__BRF; static PyObject *__pyx_n_s__BS; static PyObject *__pyx_n_s__FORMAT; static PyObject *__pyx_n_s__FR; static PyObject *__pyx_n_s__FS; static PyObject *__pyx_n_s__File; static PyObject *__pyx_n_s__Flag; static PyObject *__pyx_n_s__Float; static PyObject *__pyx_n_s__GL; static PyObject *__pyx_n_s__GOF; static PyObject *__pyx_n_s__GQ; static PyObject *__pyx_n_s__GT; static PyObject *__pyx_n_s__HP; static PyObject *__pyx_n_s__HapScore; static PyObject *__pyx_n_s__Integer; static PyObject *__pyx_n_s__Log; static PyObject *__pyx_n_s__MGOF; static PyObject *__pyx_n_s__MMLQ; static PyObject *__pyx_n_s__MQ; static PyObject *__pyx_n_s__NF; static PyObject *__pyx_n_s__NR; static PyObject *__pyx_n_s__NV; static PyObject *__pyx_n_s__PP; static PyObject *__pyx_n_s__Platypus; static PyObject *__pyx_n_s__Q20; static PyObject *__pyx_n_s__QD; static PyObject *__pyx_n_s__QualDepth; static PyObject *__pyx_n_s__REFCALL; static PyObject *__pyx_n_s__ReadPosRankSum; static PyObject *__pyx_n_s__SC; static PyObject *__pyx_n_s__SbPval; static PyObject *__pyx_n_s__Size; static PyObject *__pyx_n_s__Source; static PyObject *__pyx_n_s__String; static PyObject *__pyx_n_s__TC; static PyObject *__pyx_n_s__TCF; static PyObject *__pyx_n_s__TCR; static PyObject *__pyx_n_s__TR; static PyObject *__pyx_n_s__WE; static PyObject *__pyx_n_s__WS; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__abThreshold; static PyObject *__pyx_n_s__allele; static PyObject *__pyx_n_s__alleleBias; static PyObject *__pyx_n_s__alt; static PyObject *__pyx_n_s__badReads; static PyObject *__pyx_n_s__badReadsThreshold; static PyObject *__pyx_n_s__badReadsWindow; static PyObject *__pyx_n_s__chrom; static PyObject *__pyx_n_s__data; static PyObject *__pyx_n_s__debug; static PyObject *__pyx_n_s__enumerate; static PyObject *__pyx_n_s__extend; static PyObject *__pyx_n_s__filter; static PyObject *__pyx_n_s__filteredReadsFrac; static PyObject *__pyx_n_s__format; static PyObject *__pyx_n_s__genexpr; static PyObject *__pyx_n_s__getLogger; static PyObject *__pyx_n_s__getfilter; static PyObject *__pyx_n_s__hapScoreThreshold; static PyObject *__pyx_n_s__hp10; static PyObject *__pyx_n_s__i; static PyObject *__pyx_n_s__id; static PyObject *__pyx_n_s__index; static PyObject *__pyx_n_s__info; static PyObject *__pyx_n_s__iteritems; static PyObject *__pyx_n_s__join; static PyObject *__pyx_n_s__len; static PyObject *__pyx_n_s__logger; static PyObject *__pyx_n_s__logging; static PyObject *__pyx_n_s__map; static PyObject *__pyx_n_s__max; static PyObject *__pyx_n_s__maxGOF; static PyObject *__pyx_n_s__maxRefPos; static PyObject *__pyx_n_s__min; static PyObject *__pyx_n_s__minBaseQual; static PyObject *__pyx_n_s__minMapQual; static PyObject *__pyx_n_s__minPosterior; static PyObject *__pyx_n_s__minReads; static PyObject *__pyx_n_s__minRefPos; static PyObject *__pyx_n_s__nReadsPerSample; static PyObject *__pyx_n_s__nVarReadsPerSample; static PyObject *__pyx_n_s__options; static PyObject *__pyx_n_s__outputFile; static PyObject *__pyx_n_s__outputRefCalls; static PyObject *__pyx_n_s__pop; static PyObject *__pyx_n_s__pos; static PyObject *__pyx_n_s__pyvcf; static PyObject *__pyx_n_s__qdThreshold; static PyObject *__pyx_n_s__qual; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__ref; static PyObject *__pyx_n_s__refName; static PyObject *__pyx_n_s__reverse; static PyObject *__pyx_n_s__rmsmqThreshold; static PyObject *__pyx_n_s__round; static PyObject *__pyx_n_s__sbThreshold; static PyObject *__pyx_n_s__scThreshold; static PyObject *__pyx_n_s__sorted; static PyObject *__pyx_n_s__strandBias; static PyObject *__pyx_n_s__sum; static PyObject *__pyx_n_s__trimLeftPadding; static PyObject *__pyx_n_s__upper; static PyObject *__pyx_n_s__vcfDataLine; static PyObject *__pyx_n_s__vcfFile; static PyObject *__pyx_n_s__vcfFilterSignature; static PyObject *__pyx_n_s__vcfFormatSignature; static PyObject *__pyx_n_s__vcfInfoSignature; static PyObject *__pyx_n_s__vcfutils; static PyObject *__pyx_n_s__verbosity; static PyObject *__pyx_n_s__write_data; static PyObject *__pyx_n_s__xrange; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_10; static PyObject *__pyx_int_20; static PyObject *__pyx_int_50; static PyObject *__pyx_int_100; static PyObject *__pyx_k_tuple_3; static PyObject *__pyx_k_tuple_13; static PyObject *__pyx_k_tuple_14; static PyObject *__pyx_k_tuple_15; static PyObject *__pyx_k_tuple_21; static PyObject *__pyx_k_tuple_23; static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_tuple_27; static PyObject *__pyx_k_tuple_29; static PyObject *__pyx_k_tuple_31; static PyObject *__pyx_k_tuple_33; static PyObject *__pyx_k_tuple_35; static PyObject *__pyx_k_tuple_37; static PyObject *__pyx_k_tuple_39; static PyObject *__pyx_k_tuple_41; static PyObject *__pyx_k_tuple_43; static PyObject *__pyx_k_tuple_45; static PyObject *__pyx_k_tuple_47; static PyObject *__pyx_k_tuple_49; static PyObject *__pyx_k_tuple_51; static PyObject *__pyx_k_tuple_53; static PyObject *__pyx_k_tuple_55; static PyObject *__pyx_k_tuple_57; static PyObject *__pyx_k_tuple_59; static PyObject *__pyx_k_tuple_61; static PyObject *__pyx_k_tuple_63; static PyObject *__pyx_k_tuple_65; static PyObject *__pyx_k_tuple_67; static PyObject *__pyx_k_tuple_69; static PyObject *__pyx_k_tuple_71; static PyObject *__pyx_k_tuple_73; static PyObject *__pyx_k_tuple_75; static PyObject *__pyx_k_tuple_77; static PyObject *__pyx_k_tuple_79; static PyObject *__pyx_k_tuple_81; static PyObject *__pyx_k_tuple_83; static PyObject *__pyx_k_tuple_85; static PyObject *__pyx_k_tuple_87; static PyObject *__pyx_k_tuple_89; static PyObject *__pyx_k_tuple_91; static PyObject *__pyx_k_tuple_93; static PyObject *__pyx_k_tuple_95; static PyObject *__pyx_k_tuple_97; static PyObject *__pyx_k_tuple_99; static PyObject *__pyx_k_tuple_101; static PyObject *__pyx_k_tuple_103; static PyObject *__pyx_k_tuple_105; static PyObject *__pyx_k_tuple_107; static PyObject *__pyx_k_tuple_108; static PyObject *__pyx_k_tuple_111; static PyObject *__pyx_k_codeobj_109; static PyObject *__pyx_k_codeobj_112; /* Python wrapper */ static PyObject *__pyx_pw_8vcfutils_1outputSingleLineOfVCF(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8vcfutils_outputSingleLineOfVCF[] = "\n "; static PyMethodDef __pyx_mdef_8vcfutils_1outputSingleLineOfVCF = {__Pyx_NAMESTR("outputSingleLineOfVCF"), (PyCFunction)__pyx_pw_8vcfutils_1outputSingleLineOfVCF, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8vcfutils_outputSingleLineOfVCF)}; static PyObject *__pyx_pw_8vcfutils_1outputSingleLineOfVCF(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_outputFile = 0; PyObject *__pyx_v_vcfFile = 0; CYTHON_UNUSED PyObject *__pyx_v_options = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outputSingleLineOfVCF (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__outputFile,&__pyx_n_s__vcfFile,&__pyx_n_s__options,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__outputFile)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputSingleLineOfVCF", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vcfFile)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputSingleLineOfVCF", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__options)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputSingleLineOfVCF", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outputSingleLineOfVCF") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_data = ((PyObject*)values[0]); __pyx_v_outputFile = values[1]; __pyx_v_vcfFile = values[2]; __pyx_v_options = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outputSingleLineOfVCF", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("vcfutils.outputSingleLineOfVCF", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyDict_Type), 1, "data", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_8vcfutils_outputSingleLineOfVCF(__pyx_self, __pyx_v_data, __pyx_v_outputFile, __pyx_v_vcfFile, __pyx_v_options); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":123 * ################################################################################################### * * def outputSingleLineOfVCF(dict data, object outputFile, object vcfFile, options): # <<<<<<<<<<<<<< * """ * """ */ static PyObject *__pyx_pf_8vcfutils_outputSingleLineOfVCF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_outputFile, PyObject *__pyx_v_vcfFile, CYTHON_UNUSED PyObject *__pyx_v_options) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outputSingleLineOfVCF", 0); /* "vcfutils.pyx":129 * # Write variant call info to VCF file. * * vcfFile.write_data(outputFile, data) # <<<<<<<<<<<<<< * * #theChrom = data['chrom'] */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_vcfFile, __pyx_n_s__write_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_outputFile); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_outputFile); __Pyx_GIVEREF(__pyx_v_outputFile); __Pyx_INCREF(((PyObject *)__pyx_v_data)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_data)); __Pyx_GIVEREF(((PyObject *)__pyx_v_data)); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("vcfutils.outputSingleLineOfVCF", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":143 * ################################################################################################### * * cdef int testGenotype(Variant var, int hapIsRefAtVarPos, set varsInHap): # <<<<<<<<<<<<<< * * if var is None: */ static int __pyx_f_8vcfutils_testGenotype(struct __pyx_obj_7variant_Variant *__pyx_v_var, int __pyx_v_hapIsRefAtVarPos, PyObject *__pyx_v_varsInHap) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("testGenotype", 0); /* "vcfutils.pyx":145 * cdef int testGenotype(Variant var, int hapIsRefAtVarPos, set varsInHap): * * if var is None: # <<<<<<<<<<<<<< * * if hapIsRefAtVarPos: */ __pyx_t_1 = (((PyObject *)__pyx_v_var) == Py_None); if (__pyx_t_1) { /* "vcfutils.pyx":147 * if var is None: * * if hapIsRefAtVarPos: # <<<<<<<<<<<<<< * return True * else: */ if (__pyx_v_hapIsRefAtVarPos) { /* "vcfutils.pyx":148 * * if hapIsRefAtVarPos: * return True # <<<<<<<<<<<<<< * else: * return False */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "vcfutils.pyx":150 * return True * else: * return False # <<<<<<<<<<<<<< * else: * if var in varsInHap: */ __pyx_r = 0; goto __pyx_L0; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "vcfutils.pyx":152 * return False * else: * if var in varsInHap: # <<<<<<<<<<<<<< * return True * else: */ __pyx_t_1 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_var), ((PyObject *)__pyx_v_varsInHap), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "vcfutils.pyx":153 * else: * if var in varsInHap: * return True # <<<<<<<<<<<<<< * else: * return False */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L5; } /*else*/ { /* "vcfutils.pyx":155 * return True * else: * return False # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = 0; goto __pyx_L0; } __pyx_L5:; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("vcfutils.testGenotype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":159 * ################################################################################################### * * cdef tuple computeGenotypeCallAndLikelihoods(int variantPosition, list haplotypes, list genotypes, int sampleIndex, double* haplotypeFrequencies, double** genotypeLikelihoods, double** gofValues, int** haplotypeIndexes, int** varInHap, list variantsThisPos, int* haplotypeIsRefAtThisPos, int nIndividuals, thisSample): # <<<<<<<<<<<<<< * """ * """ */ static PyObject *__pyx_f_8vcfutils_computeGenotypeCallAndLikelihoods(CYTHON_UNUSED int __pyx_v_variantPosition, PyObject *__pyx_v_haplotypes, PyObject *__pyx_v_genotypes, int __pyx_v_sampleIndex, double *__pyx_v_haplotypeFrequencies, double **__pyx_v_genotypeLikelihoods, double **__pyx_v_gofValues, int **__pyx_v_haplotypeIndexes, int **__pyx_v_varInHap, PyObject *__pyx_v_variantsThisPos, int *__pyx_v_haplotypeIsRefAtThisPos, int __pyx_v_nIndividuals, CYTHON_UNUSED PyObject *__pyx_v_thisSample) { double __pyx_v_marginalGenotypeLikelihood; double __pyx_v_currentLikelihood; double __pyx_v_sumLikelihoods; double __pyx_v_factor; double __pyx_v_bestGoodnessOfFitValue; double __pyx_v_haplotypeFrequency1; double __pyx_v_haplotypeFrequency2; double __pyx_v_bestLikelihood; double __pyx_v_nonRefPosterior; double __pyx_v_refPosterior; CYTHON_UNUSED int __pyx_v_bestVarIndex1; CYTHON_UNUSED int __pyx_v_bestVarIndex2; int __pyx_v_index1; int __pyx_v_index2; int __pyx_v_genotypeIndex; int __pyx_v_hap1Index; int __pyx_v_hap2Index; int __pyx_v_hap1IsRefAtVarPos; int __pyx_v_hap2IsRefAtVarPos; CYTHON_UNUSED struct __pyx_obj_9cgenotype_DiploidGenotype *__pyx_v_genotype = 0; CYTHON_UNUSED struct __pyx_obj_7variant_Variant *__pyx_v_variant = 0; CYTHON_UNUSED struct __pyx_obj_10chaplotype_Haplotype *__pyx_v_hap2 = 0; PyObject *__pyx_v_likelihoods = 0; int __pyx_v_matchingGenotype; int __pyx_v_var1InHap1; int __pyx_v_var1InHap2; int __pyx_v_var2InHap1; int __pyx_v_var2InHap2; int __pyx_v_nVariants; int __pyx_v_nGenotypes; CYTHON_UNUSED int __pyx_v_nHaplotypes; int __pyx_v_phasedIndex1; int __pyx_v_phasedIndex2; double __pyx_v_phasedMaxLike; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; long __pyx_t_3; int __pyx_t_4; long __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("computeGenotypeCallAndLikelihoods", 0); /* "vcfutils.pyx":166 * # in VCF. * * cdef double marginalGenotypeLikelihood = 0.0 # <<<<<<<<<<<<<< * cdef double currentLikelihood = 0.0 * cdef double sumLikelihoods = 0.0 */ __pyx_v_marginalGenotypeLikelihood = 0.0; /* "vcfutils.pyx":167 * * cdef double marginalGenotypeLikelihood = 0.0 * cdef double currentLikelihood = 0.0 # <<<<<<<<<<<<<< * cdef double sumLikelihoods = 0.0 * cdef double factor = 0.0 */ __pyx_v_currentLikelihood = 0.0; /* "vcfutils.pyx":168 * cdef double marginalGenotypeLikelihood = 0.0 * cdef double currentLikelihood = 0.0 * cdef double sumLikelihoods = 0.0 # <<<<<<<<<<<<<< * cdef double factor = 0.0 * cdef double bestGoodnessOfFitValue = 1e6 */ __pyx_v_sumLikelihoods = 0.0; /* "vcfutils.pyx":169 * cdef double currentLikelihood = 0.0 * cdef double sumLikelihoods = 0.0 * cdef double factor = 0.0 # <<<<<<<<<<<<<< * cdef double bestGoodnessOfFitValue = 1e6 * cdef double haplotypeFrequency1 = 1.0 # Leave as 1.0 until we fix the EM calculations */ __pyx_v_factor = 0.0; /* "vcfutils.pyx":170 * cdef double sumLikelihoods = 0.0 * cdef double factor = 0.0 * cdef double bestGoodnessOfFitValue = 1e6 # <<<<<<<<<<<<<< * cdef double haplotypeFrequency1 = 1.0 # Leave as 1.0 until we fix the EM calculations * cdef double haplotypeFrequency2 = 1.0 # Leave as 1.0 until we fix the EM calculations */ __pyx_v_bestGoodnessOfFitValue = 1e6; /* "vcfutils.pyx":171 * cdef double factor = 0.0 * cdef double bestGoodnessOfFitValue = 1e6 * cdef double haplotypeFrequency1 = 1.0 # Leave as 1.0 until we fix the EM calculations # <<<<<<<<<<<<<< * cdef double haplotypeFrequency2 = 1.0 # Leave as 1.0 until we fix the EM calculations * cdef double bestLikelihood = -1.0 */ __pyx_v_haplotypeFrequency1 = 1.0; /* "vcfutils.pyx":172 * cdef double bestGoodnessOfFitValue = 1e6 * cdef double haplotypeFrequency1 = 1.0 # Leave as 1.0 until we fix the EM calculations * cdef double haplotypeFrequency2 = 1.0 # Leave as 1.0 until we fix the EM calculations # <<<<<<<<<<<<<< * cdef double bestLikelihood = -1.0 * cdef double nonRefPosterior = 0.0 # Sum of 1/0 and 1/1 posteriors for bi-allelic sites */ __pyx_v_haplotypeFrequency2 = 1.0; /* "vcfutils.pyx":173 * cdef double haplotypeFrequency1 = 1.0 # Leave as 1.0 until we fix the EM calculations * cdef double haplotypeFrequency2 = 1.0 # Leave as 1.0 until we fix the EM calculations * cdef double bestLikelihood = -1.0 # <<<<<<<<<<<<<< * cdef double nonRefPosterior = 0.0 # Sum of 1/0 and 1/1 posteriors for bi-allelic sites * cdef double refPosterior = 0.0 # 0/0 posterior for bi-allelic sites */ __pyx_v_bestLikelihood = -1.0; /* "vcfutils.pyx":174 * cdef double haplotypeFrequency2 = 1.0 # Leave as 1.0 until we fix the EM calculations * cdef double bestLikelihood = -1.0 * cdef double nonRefPosterior = 0.0 # Sum of 1/0 and 1/1 posteriors for bi-allelic sites # <<<<<<<<<<<<<< * cdef double refPosterior = 0.0 # 0/0 posterior for bi-allelic sites * cdef int bestVarIndex1 = -1 */ __pyx_v_nonRefPosterior = 0.0; /* "vcfutils.pyx":175 * cdef double bestLikelihood = -1.0 * cdef double nonRefPosterior = 0.0 # Sum of 1/0 and 1/1 posteriors for bi-allelic sites * cdef double refPosterior = 0.0 # 0/0 posterior for bi-allelic sites # <<<<<<<<<<<<<< * cdef int bestVarIndex1 = -1 * cdef int bestVarIndex2 = -1 */ __pyx_v_refPosterior = 0.0; /* "vcfutils.pyx":176 * cdef double nonRefPosterior = 0.0 # Sum of 1/0 and 1/1 posteriors for bi-allelic sites * cdef double refPosterior = 0.0 # 0/0 posterior for bi-allelic sites * cdef int bestVarIndex1 = -1 # <<<<<<<<<<<<<< * cdef int bestVarIndex2 = -1 * cdef int index1,index2,genotypeIndex,hap1Index,hap2Index = -1 */ __pyx_v_bestVarIndex1 = -1; /* "vcfutils.pyx":177 * cdef double refPosterior = 0.0 # 0/0 posterior for bi-allelic sites * cdef int bestVarIndex1 = -1 * cdef int bestVarIndex2 = -1 # <<<<<<<<<<<<<< * cdef int index1,index2,genotypeIndex,hap1Index,hap2Index = -1 * cdef int hap1IsRefAtVarPos = -1 */ __pyx_v_bestVarIndex2 = -1; /* "vcfutils.pyx":178 * cdef int bestVarIndex1 = -1 * cdef int bestVarIndex2 = -1 * cdef int index1,index2,genotypeIndex,hap1Index,hap2Index = -1 # <<<<<<<<<<<<<< * cdef int hap1IsRefAtVarPos = -1 * cdef int hap2IsRefAtVarPos = -1 */ __pyx_v_hap2Index = -1; /* "vcfutils.pyx":179 * cdef int bestVarIndex2 = -1 * cdef int index1,index2,genotypeIndex,hap1Index,hap2Index = -1 * cdef int hap1IsRefAtVarPos = -1 # <<<<<<<<<<<<<< * cdef int hap2IsRefAtVarPos = -1 * */ __pyx_v_hap1IsRefAtVarPos = -1; /* "vcfutils.pyx":180 * cdef int index1,index2,genotypeIndex,hap1Index,hap2Index = -1 * cdef int hap1IsRefAtVarPos = -1 * cdef int hap2IsRefAtVarPos = -1 # <<<<<<<<<<<<<< * * cdef DiploidGenotype genotype = None */ __pyx_v_hap2IsRefAtVarPos = -1; /* "vcfutils.pyx":182 * cdef int hap2IsRefAtVarPos = -1 * * cdef DiploidGenotype genotype = None # <<<<<<<<<<<<<< * cdef Variant var1,var2,variant = None * cdef Haplotype haplotype,hap1,hap2 = None */ __Pyx_INCREF(Py_None); __pyx_v_genotype = ((struct __pyx_obj_9cgenotype_DiploidGenotype *)Py_None); /* "vcfutils.pyx":183 * * cdef DiploidGenotype genotype = None * cdef Variant var1,var2,variant = None # <<<<<<<<<<<<<< * cdef Haplotype haplotype,hap1,hap2 = None * cdef list likelihoods = [] */ __Pyx_INCREF(Py_None); __pyx_v_variant = ((struct __pyx_obj_7variant_Variant *)Py_None); /* "vcfutils.pyx":184 * cdef DiploidGenotype genotype = None * cdef Variant var1,var2,variant = None * cdef Haplotype haplotype,hap1,hap2 = None # <<<<<<<<<<<<<< * cdef list likelihoods = [] * cdef set varsHap1 */ __Pyx_INCREF(Py_None); __pyx_v_hap2 = ((struct __pyx_obj_10chaplotype_Haplotype *)Py_None); /* "vcfutils.pyx":185 * cdef Variant var1,var2,variant = None * cdef Haplotype haplotype,hap1,hap2 = None * cdef list likelihoods = [] # <<<<<<<<<<<<<< * cdef set varsHap1 * cdef set varsHap2 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_likelihoods = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":189 * cdef set varsHap2 * * cdef bint matchingGenotype = False # <<<<<<<<<<<<<< * cdef bint var1InHap1 = False * cdef bint var1InHap2 = False */ __pyx_v_matchingGenotype = 0; /* "vcfutils.pyx":190 * * cdef bint matchingGenotype = False * cdef bint var1InHap1 = False # <<<<<<<<<<<<<< * cdef bint var1InHap2 = False * cdef bint var2InHap1 = False */ __pyx_v_var1InHap1 = 0; /* "vcfutils.pyx":191 * cdef bint matchingGenotype = False * cdef bint var1InHap1 = False * cdef bint var1InHap2 = False # <<<<<<<<<<<<<< * cdef bint var2InHap1 = False * cdef bint var2InHap2 = False */ __pyx_v_var1InHap2 = 0; /* "vcfutils.pyx":192 * cdef bint var1InHap1 = False * cdef bint var1InHap2 = False * cdef bint var2InHap1 = False # <<<<<<<<<<<<<< * cdef bint var2InHap2 = False * */ __pyx_v_var2InHap1 = 0; /* "vcfutils.pyx":193 * cdef bint var1InHap2 = False * cdef bint var2InHap1 = False * cdef bint var2InHap2 = False # <<<<<<<<<<<<<< * * cdef int nVariants = len(variantsThisPos) */ __pyx_v_var2InHap2 = 0; /* "vcfutils.pyx":195 * cdef bint var2InHap2 = False * * cdef int nVariants = len(variantsThisPos) # <<<<<<<<<<<<<< * cdef int nGenotypes = len(genotypes) * cdef int nHaplotypes = len(haplotypes) */ if (unlikely(((PyObject *)__pyx_v_variantsThisPos) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_variantsThisPos)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nVariants = __pyx_t_2; /* "vcfutils.pyx":196 * * cdef int nVariants = len(variantsThisPos) * cdef int nGenotypes = len(genotypes) # <<<<<<<<<<<<<< * cdef int nHaplotypes = len(haplotypes) * */ if (unlikely(((PyObject *)__pyx_v_genotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_genotypes)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nGenotypes = __pyx_t_2; /* "vcfutils.pyx":197 * cdef int nVariants = len(variantsThisPos) * cdef int nGenotypes = len(genotypes) * cdef int nHaplotypes = len(haplotypes) # <<<<<<<<<<<<<< * * cdef int phasedIndex1 = -1 */ if (unlikely(((PyObject *)__pyx_v_haplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_haplotypes)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nHaplotypes = __pyx_t_2; /* "vcfutils.pyx":199 * cdef int nHaplotypes = len(haplotypes) * * cdef int phasedIndex1 = -1 # <<<<<<<<<<<<<< * cdef int phasedIndex2 = -1 * cdef double phasedMaxLike = -1e6 */ __pyx_v_phasedIndex1 = -1; /* "vcfutils.pyx":200 * * cdef int phasedIndex1 = -1 * cdef int phasedIndex2 = -1 # <<<<<<<<<<<<<< * cdef double phasedMaxLike = -1e6 * */ __pyx_v_phasedIndex2 = -1; /* "vcfutils.pyx":201 * cdef int phasedIndex1 = -1 * cdef int phasedIndex2 = -1 * cdef double phasedMaxLike = -1e6 # <<<<<<<<<<<<<< * * for index1 in range(nVariants + 1): */ __pyx_v_phasedMaxLike = -1e6; /* "vcfutils.pyx":203 * cdef double phasedMaxLike = -1e6 * * for index1 in range(nVariants + 1): # <<<<<<<<<<<<<< * for index2 in range(nVariants + 1): * */ __pyx_t_3 = (__pyx_v_nVariants + 1); for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index1 = __pyx_t_4; /* "vcfutils.pyx":204 * * for index1 in range(nVariants + 1): * for index2 in range(nVariants + 1): # <<<<<<<<<<<<<< * * if index2 > index1: */ __pyx_t_5 = (__pyx_v_nVariants + 1); for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_index2 = __pyx_t_6; /* "vcfutils.pyx":206 * for index2 in range(nVariants + 1): * * if index2 > index1: # <<<<<<<<<<<<<< * break * */ __pyx_t_7 = (__pyx_v_index2 > __pyx_v_index1); if (__pyx_t_7) { /* "vcfutils.pyx":207 * * if index2 > index1: * break # <<<<<<<<<<<<<< * * marginalGenotypeLikelihood = 0.0 */ goto __pyx_L6_break; goto __pyx_L7; } __pyx_L7:; /* "vcfutils.pyx":209 * break * * marginalGenotypeLikelihood = 0.0 # <<<<<<<<<<<<<< * * if index1 != index2: */ __pyx_v_marginalGenotypeLikelihood = 0.0; /* "vcfutils.pyx":211 * marginalGenotypeLikelihood = 0.0 * * if index1 != index2: # <<<<<<<<<<<<<< * factor = 2.0 * else: */ __pyx_t_7 = (__pyx_v_index1 != __pyx_v_index2); if (__pyx_t_7) { /* "vcfutils.pyx":212 * * if index1 != index2: * factor = 2.0 # <<<<<<<<<<<<<< * else: * factor = 1.0 */ __pyx_v_factor = 2.0; goto __pyx_L8; } /*else*/ { /* "vcfutils.pyx":214 * factor = 2.0 * else: * factor = 1.0 # <<<<<<<<<<<<<< * * for genotypeIndex in range(nGenotypes): */ __pyx_v_factor = 1.0; } __pyx_L8:; /* "vcfutils.pyx":216 * factor = 1.0 * * for genotypeIndex in range(nGenotypes): # <<<<<<<<<<<<<< * * # Use pre-cached haplotype indices */ __pyx_t_8 = __pyx_v_nGenotypes; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_genotypeIndex = __pyx_t_9; /* "vcfutils.pyx":219 * * # Use pre-cached haplotype indices * hap1Index = haplotypeIndexes[genotypeIndex][0] # <<<<<<<<<<<<<< * hap2Index = haplotypeIndexes[genotypeIndex][1] * hap1IsRefAtVarPos = haplotypeIsRefAtThisPos[hap1Index] */ __pyx_v_hap1Index = ((__pyx_v_haplotypeIndexes[__pyx_v_genotypeIndex])[0]); /* "vcfutils.pyx":220 * # Use pre-cached haplotype indices * hap1Index = haplotypeIndexes[genotypeIndex][0] * hap2Index = haplotypeIndexes[genotypeIndex][1] # <<<<<<<<<<<<<< * hap1IsRefAtVarPos = haplotypeIsRefAtThisPos[hap1Index] * hap2IsRefAtVarPos = haplotypeIsRefAtThisPos[hap2Index] */ __pyx_v_hap2Index = ((__pyx_v_haplotypeIndexes[__pyx_v_genotypeIndex])[1]); /* "vcfutils.pyx":221 * hap1Index = haplotypeIndexes[genotypeIndex][0] * hap2Index = haplotypeIndexes[genotypeIndex][1] * hap1IsRefAtVarPos = haplotypeIsRefAtThisPos[hap1Index] # <<<<<<<<<<<<<< * hap2IsRefAtVarPos = haplotypeIsRefAtThisPos[hap2Index] * */ __pyx_v_hap1IsRefAtVarPos = (__pyx_v_haplotypeIsRefAtThisPos[__pyx_v_hap1Index]); /* "vcfutils.pyx":222 * hap2Index = haplotypeIndexes[genotypeIndex][1] * hap1IsRefAtVarPos = haplotypeIsRefAtThisPos[hap1Index] * hap2IsRefAtVarPos = haplotypeIsRefAtThisPos[hap2Index] # <<<<<<<<<<<<<< * * # Use EM frequencies */ __pyx_v_hap2IsRefAtVarPos = (__pyx_v_haplotypeIsRefAtThisPos[__pyx_v_hap2Index]); /* "vcfutils.pyx":225 * * # Use EM frequencies * haplotypeFrequency1 = haplotypeFrequencies[hap1Index] # <<<<<<<<<<<<<< * haplotypeFrequency2 = haplotypeFrequencies[hap2Index] * */ __pyx_v_haplotypeFrequency1 = (__pyx_v_haplotypeFrequencies[__pyx_v_hap1Index]); /* "vcfutils.pyx":226 * # Use EM frequencies * haplotypeFrequency1 = haplotypeFrequencies[hap1Index] * haplotypeFrequency2 = haplotypeFrequencies[hap2Index] # <<<<<<<<<<<<<< * * matchingGenotype = False */ __pyx_v_haplotypeFrequency2 = (__pyx_v_haplotypeFrequencies[__pyx_v_hap2Index]); /* "vcfutils.pyx":228 * haplotypeFrequency2 = haplotypeFrequencies[hap2Index] * * matchingGenotype = False # <<<<<<<<<<<<<< * * # Ref/Ref genotype */ __pyx_v_matchingGenotype = 0; /* "vcfutils.pyx":231 * * # Ref/Ref genotype * if index1 == 0 and index2 == 0: # <<<<<<<<<<<<<< * if (hap1IsRefAtVarPos and hap2IsRefAtVarPos): * #logger.debug("hom ref genotype = %s. Pos = %s." %(genotypes[genotypeIndex], variantPosition)) */ __pyx_t_7 = (__pyx_v_index1 == 0); if (__pyx_t_7) { __pyx_t_10 = (__pyx_v_index2 == 0); __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_7; } if (__pyx_t_11) { /* "vcfutils.pyx":232 * # Ref/Ref genotype * if index1 == 0 and index2 == 0: * if (hap1IsRefAtVarPos and hap2IsRefAtVarPos): # <<<<<<<<<<<<<< * #logger.debug("hom ref genotype = %s. Pos = %s." %(genotypes[genotypeIndex], variantPosition)) * matchingGenotype = True */ if (__pyx_v_hap1IsRefAtVarPos) { __pyx_t_11 = __pyx_v_hap2IsRefAtVarPos; } else { __pyx_t_11 = __pyx_v_hap1IsRefAtVarPos; } if (__pyx_t_11) { /* "vcfutils.pyx":234 * if (hap1IsRefAtVarPos and hap2IsRefAtVarPos): * #logger.debug("hom ref genotype = %s. Pos = %s." %(genotypes[genotypeIndex], variantPosition)) * matchingGenotype = True # <<<<<<<<<<<<<< * * # Het genotype (always 1/0, 2/0 etc) */ __pyx_v_matchingGenotype = 1; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } /* "vcfutils.pyx":237 * * # Het genotype (always 1/0, 2/0 etc) * elif index2 == 0: # <<<<<<<<<<<<<< * * var1InHap1 = varInHap[hap1Index][index1-1] */ __pyx_t_11 = (__pyx_v_index2 == 0); if (__pyx_t_11) { /* "vcfutils.pyx":239 * elif index2 == 0: * * var1InHap1 = varInHap[hap1Index][index1-1] # <<<<<<<<<<<<<< * var1InHap2 = varInHap[hap2Index][index1-1] * */ __pyx_v_var1InHap1 = ((__pyx_v_varInHap[__pyx_v_hap1Index])[(__pyx_v_index1 - 1)]); /* "vcfutils.pyx":240 * * var1InHap1 = varInHap[hap1Index][index1-1] * var1InHap2 = varInHap[hap2Index][index1-1] # <<<<<<<<<<<<<< * * if (hap2IsRefAtVarPos and var1InHap1) or (hap1IsRefAtVarPos and var1InHap2): */ __pyx_v_var1InHap2 = ((__pyx_v_varInHap[__pyx_v_hap2Index])[(__pyx_v_index1 - 1)]); /* "vcfutils.pyx":242 * var1InHap2 = varInHap[hap2Index][index1-1] * * if (hap2IsRefAtVarPos and var1InHap1) or (hap1IsRefAtVarPos and var1InHap2): # <<<<<<<<<<<<<< * #logger.debug("het ref genotype = %s. Pos = %s." %(genotypes[genotypeIndex], variantPosition)) * matchingGenotype = True */ if (__pyx_v_hap2IsRefAtVarPos) { __pyx_t_11 = __pyx_v_var1InHap1; __pyx_t_7 = __pyx_t_11; } else { __pyx_t_7 = __pyx_v_hap2IsRefAtVarPos; } if (!__pyx_t_7) { if (__pyx_v_hap1IsRefAtVarPos) { __pyx_t_11 = __pyx_v_var1InHap2; __pyx_t_10 = __pyx_t_11; } else { __pyx_t_10 = __pyx_v_hap1IsRefAtVarPos; } __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_7; } if (__pyx_t_11) { /* "vcfutils.pyx":244 * if (hap2IsRefAtVarPos and var1InHap1) or (hap1IsRefAtVarPos and var1InHap2): * #logger.debug("het ref genotype = %s. Pos = %s." %(genotypes[genotypeIndex], variantPosition)) * matchingGenotype = True # <<<<<<<<<<<<<< * * # Both alleles are non-ref */ __pyx_v_matchingGenotype = 1; goto __pyx_L13; } __pyx_L13:; goto __pyx_L11; } /*else*/ { /* "vcfutils.pyx":248 * # Both alleles are non-ref * else: * var1InHap1 = varInHap[hap1Index][index1-1] # <<<<<<<<<<<<<< * var1InHap2 = varInHap[hap2Index][index1-1] * var2InHap1 = varInHap[hap1Index][index2-1] */ __pyx_v_var1InHap1 = ((__pyx_v_varInHap[__pyx_v_hap1Index])[(__pyx_v_index1 - 1)]); /* "vcfutils.pyx":249 * else: * var1InHap1 = varInHap[hap1Index][index1-1] * var1InHap2 = varInHap[hap2Index][index1-1] # <<<<<<<<<<<<<< * var2InHap1 = varInHap[hap1Index][index2-1] * var2InHap2 = varInHap[hap2Index][index2-1] */ __pyx_v_var1InHap2 = ((__pyx_v_varInHap[__pyx_v_hap2Index])[(__pyx_v_index1 - 1)]); /* "vcfutils.pyx":250 * var1InHap1 = varInHap[hap1Index][index1-1] * var1InHap2 = varInHap[hap2Index][index1-1] * var2InHap1 = varInHap[hap1Index][index2-1] # <<<<<<<<<<<<<< * var2InHap2 = varInHap[hap2Index][index2-1] * */ __pyx_v_var2InHap1 = ((__pyx_v_varInHap[__pyx_v_hap1Index])[(__pyx_v_index2 - 1)]); /* "vcfutils.pyx":251 * var1InHap2 = varInHap[hap2Index][index1-1] * var2InHap1 = varInHap[hap1Index][index2-1] * var2InHap2 = varInHap[hap2Index][index2-1] # <<<<<<<<<<<<<< * * if (var1InHap1 and var2InHap2) or (var2InHap1 and var1InHap2): */ __pyx_v_var2InHap2 = ((__pyx_v_varInHap[__pyx_v_hap2Index])[(__pyx_v_index2 - 1)]); /* "vcfutils.pyx":253 * var2InHap2 = varInHap[hap2Index][index2-1] * * if (var1InHap1 and var2InHap2) or (var2InHap1 and var1InHap2): # <<<<<<<<<<<<<< * #logger.debug("hom var genotype = %s. Pos = %s." %(genotypes[genotypeIndex], variantPosition)) * matchingGenotype = True */ if (__pyx_v_var1InHap1) { __pyx_t_11 = __pyx_v_var2InHap2; } else { __pyx_t_11 = __pyx_v_var1InHap1; } if (!__pyx_t_11) { if (__pyx_v_var2InHap1) { __pyx_t_7 = __pyx_v_var1InHap2; } else { __pyx_t_7 = __pyx_v_var2InHap1; } __pyx_t_10 = __pyx_t_7; } else { __pyx_t_10 = __pyx_t_11; } if (__pyx_t_10) { /* "vcfutils.pyx":255 * if (var1InHap1 and var2InHap2) or (var2InHap1 and var1InHap2): * #logger.debug("hom var genotype = %s. Pos = %s." %(genotypes[genotypeIndex], variantPosition)) * matchingGenotype = True # <<<<<<<<<<<<<< * * # Accumulate likelihoods for matching genotypes */ __pyx_v_matchingGenotype = 1; goto __pyx_L14; } __pyx_L14:; } __pyx_L11:; /* "vcfutils.pyx":258 * * # Accumulate likelihoods for matching genotypes * if matchingGenotype: # <<<<<<<<<<<<<< * * # TODO: Fix this properly. */ if (__pyx_v_matchingGenotype) { /* "vcfutils.pyx":262 * # TODO: Fix this properly. * # Only use EM frequencies for large-ish populations. * if nIndividuals > 25: # <<<<<<<<<<<<<< * currentLikelihood = (factor*haplotypeFrequency1*haplotypeFrequency2*genotypeLikelihoods[sampleIndex][genotypeIndex]) * else: */ __pyx_t_10 = (__pyx_v_nIndividuals > 25); if (__pyx_t_10) { /* "vcfutils.pyx":263 * # Only use EM frequencies for large-ish populations. * if nIndividuals > 25: * currentLikelihood = (factor*haplotypeFrequency1*haplotypeFrequency2*genotypeLikelihoods[sampleIndex][genotypeIndex]) # <<<<<<<<<<<<<< * else: * currentLikelihood = (factor*genotypeLikelihoods[sampleIndex][genotypeIndex]) */ __pyx_v_currentLikelihood = (((__pyx_v_factor * __pyx_v_haplotypeFrequency1) * __pyx_v_haplotypeFrequency2) * ((__pyx_v_genotypeLikelihoods[__pyx_v_sampleIndex])[__pyx_v_genotypeIndex])); goto __pyx_L16; } /*else*/ { /* "vcfutils.pyx":265 * currentLikelihood = (factor*haplotypeFrequency1*haplotypeFrequency2*genotypeLikelihoods[sampleIndex][genotypeIndex]) * else: * currentLikelihood = (factor*genotypeLikelihoods[sampleIndex][genotypeIndex]) # <<<<<<<<<<<<<< * * marginalGenotypeLikelihood += currentLikelihood */ __pyx_v_currentLikelihood = (__pyx_v_factor * ((__pyx_v_genotypeLikelihoods[__pyx_v_sampleIndex])[__pyx_v_genotypeIndex])); } __pyx_L16:; /* "vcfutils.pyx":267 * currentLikelihood = (factor*genotypeLikelihoods[sampleIndex][genotypeIndex]) * * marginalGenotypeLikelihood += currentLikelihood # <<<<<<<<<<<<<< * * # Phase using maximum likelihood genotypes */ __pyx_v_marginalGenotypeLikelihood = (__pyx_v_marginalGenotypeLikelihood + __pyx_v_currentLikelihood); /* "vcfutils.pyx":270 * * # Phase using maximum likelihood genotypes * if currentLikelihood > phasedMaxLike: # <<<<<<<<<<<<<< * phasedMaxLike = currentLikelihood * */ __pyx_t_10 = (__pyx_v_currentLikelihood > __pyx_v_phasedMaxLike); if (__pyx_t_10) { /* "vcfutils.pyx":271 * # Phase using maximum likelihood genotypes * if currentLikelihood > phasedMaxLike: * phasedMaxLike = currentLikelihood # <<<<<<<<<<<<<< * * # Hom Ref */ __pyx_v_phasedMaxLike = __pyx_v_currentLikelihood; /* "vcfutils.pyx":274 * * # Hom Ref * if index1 == 0 and index2 == 0: # <<<<<<<<<<<<<< * phasedIndex1 = index1 * phasedIndex2 = index2 */ __pyx_t_10 = (__pyx_v_index1 == 0); if (__pyx_t_10) { __pyx_t_11 = (__pyx_v_index2 == 0); __pyx_t_7 = __pyx_t_11; } else { __pyx_t_7 = __pyx_t_10; } if (__pyx_t_7) { /* "vcfutils.pyx":275 * # Hom Ref * if index1 == 0 and index2 == 0: * phasedIndex1 = index1 # <<<<<<<<<<<<<< * phasedIndex2 = index2 * */ __pyx_v_phasedIndex1 = __pyx_v_index1; /* "vcfutils.pyx":276 * if index1 == 0 and index2 == 0: * phasedIndex1 = index1 * phasedIndex2 = index2 # <<<<<<<<<<<<<< * * # Het. Make sure genotype call is phased correctly. */ __pyx_v_phasedIndex2 = __pyx_v_index2; goto __pyx_L18; } /* "vcfutils.pyx":279 * * # Het. Make sure genotype call is phased correctly. * elif index2 == 0 and index1 != 0: # <<<<<<<<<<<<<< * * if var1InHap1: */ __pyx_t_7 = (__pyx_v_index2 == 0); if (__pyx_t_7) { __pyx_t_10 = (__pyx_v_index1 != 0); __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_7; } if (__pyx_t_11) { /* "vcfutils.pyx":281 * elif index2 == 0 and index1 != 0: * * if var1InHap1: # <<<<<<<<<<<<<< * phasedIndex1 = index1 * phasedIndex2 = index2 */ if (__pyx_v_var1InHap1) { /* "vcfutils.pyx":282 * * if var1InHap1: * phasedIndex1 = index1 # <<<<<<<<<<<<<< * phasedIndex2 = index2 * elif var1InHap2: */ __pyx_v_phasedIndex1 = __pyx_v_index1; /* "vcfutils.pyx":283 * if var1InHap1: * phasedIndex1 = index1 * phasedIndex2 = index2 # <<<<<<<<<<<<<< * elif var1InHap2: * phasedIndex1 = index2 */ __pyx_v_phasedIndex2 = __pyx_v_index2; goto __pyx_L19; } /* "vcfutils.pyx":284 * phasedIndex1 = index1 * phasedIndex2 = index2 * elif var1InHap2: # <<<<<<<<<<<<<< * phasedIndex1 = index2 * phasedIndex2 = index1 */ if (__pyx_v_var1InHap2) { /* "vcfutils.pyx":285 * phasedIndex2 = index2 * elif var1InHap2: * phasedIndex1 = index2 # <<<<<<<<<<<<<< * phasedIndex2 = index1 * # This will happen on the way */ __pyx_v_phasedIndex1 = __pyx_v_index2; /* "vcfutils.pyx":286 * elif var1InHap2: * phasedIndex1 = index2 * phasedIndex2 = index1 # <<<<<<<<<<<<<< * # This will happen on the way * else: */ __pyx_v_phasedIndex2 = __pyx_v_index1; goto __pyx_L19; } /*else*/ { } __pyx_L19:; goto __pyx_L18; } /* "vcfutils.pyx":292 * * # Hom Var. Don't need to phase * elif index2 == index1 and index1 > 0: # <<<<<<<<<<<<<< * phasedIndex1 = index1 * phasedIndex2 = index2 */ __pyx_t_11 = (__pyx_v_index2 == __pyx_v_index1); if (__pyx_t_11) { __pyx_t_7 = (__pyx_v_index1 > 0); __pyx_t_10 = __pyx_t_7; } else { __pyx_t_10 = __pyx_t_11; } if (__pyx_t_10) { /* "vcfutils.pyx":293 * # Hom Var. Don't need to phase * elif index2 == index1 and index1 > 0: * phasedIndex1 = index1 # <<<<<<<<<<<<<< * phasedIndex2 = index2 * */ __pyx_v_phasedIndex1 = __pyx_v_index1; /* "vcfutils.pyx":294 * elif index2 == index1 and index1 > 0: * phasedIndex1 = index1 * phasedIndex2 = index2 # <<<<<<<<<<<<<< * * # Multi-allelic het. Make sure call is phased correctly. */ __pyx_v_phasedIndex2 = __pyx_v_index2; goto __pyx_L18; } /* "vcfutils.pyx":297 * * # Multi-allelic het. Make sure call is phased correctly. * elif index2 > 0 and index1 > 0 and index2 != index1: # <<<<<<<<<<<<<< * * if var1InHap1 and var2InHap2: */ __pyx_t_10 = (__pyx_v_index2 > 0); if (__pyx_t_10) { __pyx_t_11 = (__pyx_v_index1 > 0); if (__pyx_t_11) { __pyx_t_7 = (__pyx_v_index2 != __pyx_v_index1); __pyx_t_12 = __pyx_t_7; } else { __pyx_t_12 = __pyx_t_11; } __pyx_t_11 = __pyx_t_12; } else { __pyx_t_11 = __pyx_t_10; } if (__pyx_t_11) { /* "vcfutils.pyx":299 * elif index2 > 0 and index1 > 0 and index2 != index1: * * if var1InHap1 and var2InHap2: # <<<<<<<<<<<<<< * phasedIndex1 = index1 * phasedIndex2 = index2 */ if (__pyx_v_var1InHap1) { __pyx_t_11 = __pyx_v_var2InHap2; } else { __pyx_t_11 = __pyx_v_var1InHap1; } if (__pyx_t_11) { /* "vcfutils.pyx":300 * * if var1InHap1 and var2InHap2: * phasedIndex1 = index1 # <<<<<<<<<<<<<< * phasedIndex2 = index2 * elif var1InHap2 and var2InHap1: */ __pyx_v_phasedIndex1 = __pyx_v_index1; /* "vcfutils.pyx":301 * if var1InHap1 and var2InHap2: * phasedIndex1 = index1 * phasedIndex2 = index2 # <<<<<<<<<<<<<< * elif var1InHap2 and var2InHap1: * phasedIndex1 = index2 */ __pyx_v_phasedIndex2 = __pyx_v_index2; goto __pyx_L20; } /* "vcfutils.pyx":302 * phasedIndex1 = index1 * phasedIndex2 = index2 * elif var1InHap2 and var2InHap1: # <<<<<<<<<<<<<< * phasedIndex1 = index2 * phasedIndex2 = index1 */ if (__pyx_v_var1InHap2) { __pyx_t_11 = __pyx_v_var2InHap1; } else { __pyx_t_11 = __pyx_v_var1InHap2; } if (__pyx_t_11) { /* "vcfutils.pyx":303 * phasedIndex2 = index2 * elif var1InHap2 and var2InHap1: * phasedIndex1 = index2 # <<<<<<<<<<<<<< * phasedIndex2 = index1 * # This will happen on the way */ __pyx_v_phasedIndex1 = __pyx_v_index2; /* "vcfutils.pyx":304 * elif var1InHap2 and var2InHap1: * phasedIndex1 = index2 * phasedIndex2 = index1 # <<<<<<<<<<<<<< * # This will happen on the way * else: */ __pyx_v_phasedIndex2 = __pyx_v_index1; goto __pyx_L20; } /*else*/ { } __pyx_L20:; goto __pyx_L18; } __pyx_L18:; goto __pyx_L17; } __pyx_L17:; /* "vcfutils.pyx":309 * pass * * if gofValues[genotypeIndex][sampleIndex] < bestGoodnessOfFitValue: # <<<<<<<<<<<<<< * bestGoodnessOfFitValue = gofValues[genotypeIndex][sampleIndex] * */ __pyx_t_11 = (((__pyx_v_gofValues[__pyx_v_genotypeIndex])[__pyx_v_sampleIndex]) < __pyx_v_bestGoodnessOfFitValue); if (__pyx_t_11) { /* "vcfutils.pyx":310 * * if gofValues[genotypeIndex][sampleIndex] < bestGoodnessOfFitValue: * bestGoodnessOfFitValue = gofValues[genotypeIndex][sampleIndex] # <<<<<<<<<<<<<< * * # Pick the best variant pair for this site */ __pyx_v_bestGoodnessOfFitValue = ((__pyx_v_gofValues[__pyx_v_genotypeIndex])[__pyx_v_sampleIndex]); goto __pyx_L21; } __pyx_L21:; goto __pyx_L15; } __pyx_L15:; } /* "vcfutils.pyx":313 * * # Pick the best variant pair for this site * if marginalGenotypeLikelihood > bestLikelihood: # <<<<<<<<<<<<<< * * bestLikelihood = marginalGenotypeLikelihood */ __pyx_t_11 = (__pyx_v_marginalGenotypeLikelihood > __pyx_v_bestLikelihood); if (__pyx_t_11) { /* "vcfutils.pyx":315 * if marginalGenotypeLikelihood > bestLikelihood: * * bestLikelihood = marginalGenotypeLikelihood # <<<<<<<<<<<<<< * bestVarIndex1 = index1 * bestVarIndex2 = index2 */ __pyx_v_bestLikelihood = __pyx_v_marginalGenotypeLikelihood; /* "vcfutils.pyx":316 * * bestLikelihood = marginalGenotypeLikelihood * bestVarIndex1 = index1 # <<<<<<<<<<<<<< * bestVarIndex2 = index2 * */ __pyx_v_bestVarIndex1 = __pyx_v_index1; /* "vcfutils.pyx":317 * bestLikelihood = marginalGenotypeLikelihood * bestVarIndex1 = index1 * bestVarIndex2 = index2 # <<<<<<<<<<<<<< * * if (index1 == 1 and index2 == 0) or (index1 == 1 and index2 == 1): */ __pyx_v_bestVarIndex2 = __pyx_v_index2; goto __pyx_L22; } __pyx_L22:; /* "vcfutils.pyx":319 * bestVarIndex2 = index2 * * if (index1 == 1 and index2 == 0) or (index1 == 1 and index2 == 1): # <<<<<<<<<<<<<< * nonRefPosterior += marginalGenotypeLikelihood * elif (index1 == 0 and index2 == 0): */ __pyx_t_11 = (__pyx_v_index1 == 1); if (__pyx_t_11) { __pyx_t_10 = (__pyx_v_index2 == 0); __pyx_t_12 = __pyx_t_10; } else { __pyx_t_12 = __pyx_t_11; } if (!__pyx_t_12) { __pyx_t_11 = (__pyx_v_index1 == 1); if (__pyx_t_11) { __pyx_t_10 = (__pyx_v_index2 == 1); __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_11; } __pyx_t_11 = __pyx_t_7; } else { __pyx_t_11 = __pyx_t_12; } if (__pyx_t_11) { /* "vcfutils.pyx":320 * * if (index1 == 1 and index2 == 0) or (index1 == 1 and index2 == 1): * nonRefPosterior += marginalGenotypeLikelihood # <<<<<<<<<<<<<< * elif (index1 == 0 and index2 == 0): * refPosterior += marginalGenotypeLikelihood */ __pyx_v_nonRefPosterior = (__pyx_v_nonRefPosterior + __pyx_v_marginalGenotypeLikelihood); goto __pyx_L23; } /* "vcfutils.pyx":321 * if (index1 == 1 and index2 == 0) or (index1 == 1 and index2 == 1): * nonRefPosterior += marginalGenotypeLikelihood * elif (index1 == 0 and index2 == 0): # <<<<<<<<<<<<<< * refPosterior += marginalGenotypeLikelihood * */ __pyx_t_11 = (__pyx_v_index1 == 0); if (__pyx_t_11) { __pyx_t_12 = (__pyx_v_index2 == 0); __pyx_t_7 = __pyx_t_12; } else { __pyx_t_7 = __pyx_t_11; } if (__pyx_t_7) { /* "vcfutils.pyx":322 * nonRefPosterior += marginalGenotypeLikelihood * elif (index1 == 0 and index2 == 0): * refPosterior += marginalGenotypeLikelihood # <<<<<<<<<<<<<< * * sumLikelihoods += marginalGenotypeLikelihood */ __pyx_v_refPosterior = (__pyx_v_refPosterior + __pyx_v_marginalGenotypeLikelihood); goto __pyx_L23; } __pyx_L23:; /* "vcfutils.pyx":324 * refPosterior += marginalGenotypeLikelihood * * sumLikelihoods += marginalGenotypeLikelihood # <<<<<<<<<<<<<< * likelihoods.append(marginalGenotypeLikelihood) * */ __pyx_v_sumLikelihoods = (__pyx_v_sumLikelihoods + __pyx_v_marginalGenotypeLikelihood); /* "vcfutils.pyx":325 * * sumLikelihoods += marginalGenotypeLikelihood * likelihoods.append(marginalGenotypeLikelihood) # <<<<<<<<<<<<<< * * #for genotypeIndex in range(nGenotypes): */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_marginalGenotypeLikelihood); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = PyList_Append(__pyx_v_likelihoods, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L6_break:; } /* "vcfutils.pyx":330 * # logger.debug("GL for sample %s, index %s = %s" %(sampleIndex, genotypeIndex, genotypeLikelihoods[sampleIndex][genotypeIndex])) * * return (phasedIndex1,phasedIndex2,likelihoods,bestLikelihood/sumLikelihoods,nonRefPosterior/sumLikelihoods,refPosterior/sumLikelihoods,bestGoodnessOfFitValue) # <<<<<<<<<<<<<< * * ################################################################################################### */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = PyInt_FromLong(__pyx_v_phasedIndex1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = PyInt_FromLong(__pyx_v_phasedIndex2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyFloat_FromDouble((__pyx_v_bestLikelihood / __pyx_v_sumLikelihoods)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyFloat_FromDouble((__pyx_v_nonRefPosterior / __pyx_v_sumLikelihoods)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = PyFloat_FromDouble((__pyx_v_refPosterior / __pyx_v_sumLikelihoods)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_bestGoodnessOfFitValue); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(7); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __Pyx_INCREF(((PyObject *)__pyx_v_likelihoods)); PyTuple_SET_ITEM(__pyx_t_19, 2, ((PyObject *)__pyx_v_likelihoods)); __Pyx_GIVEREF(((PyObject *)__pyx_v_likelihoods)); PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_19, 5, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 6, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_r = __pyx_t_19; __pyx_t_19 = 0; goto __pyx_L0; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_AddTraceback("vcfutils.computeGenotypeCallAndLikelihoods", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_genotype); __Pyx_XDECREF((PyObject *)__pyx_v_variant); __Pyx_XDECREF((PyObject *)__pyx_v_hap2); __Pyx_XDECREF(__pyx_v_likelihoods); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":334 * ################################################################################################### * * cdef void outputCallToVCF(dict varsByPos, dict vcfInfo, dict vcfFilter, list haplotypes, list genotypes, double* haplotypeFrequencies, double** genotypeLikelihoods, double** gofValues, int** haplotypeIndexes, list readBuffers, int nIndividuals, vcfFile, FastaFile refFile, outputFile, options, list allVariants, int windowStart, int windowEnd): # <<<<<<<<<<<<<< * """ * Output a call to a vcf file. Uses the signature of the callingModule. */ static void __pyx_f_8vcfutils_outputCallToVCF(PyObject *__pyx_v_varsByPos, PyObject *__pyx_v_vcfInfo, PyObject *__pyx_v_vcfFilter, PyObject *__pyx_v_haplotypes, PyObject *__pyx_v_genotypes, double *__pyx_v_haplotypeFrequencies, double **__pyx_v_genotypeLikelihoods, double **__pyx_v_gofValues, int **__pyx_v_haplotypeIndexes, PyObject *__pyx_v_readBuffers, int __pyx_v_nIndividuals, PyObject *__pyx_v_vcfFile, struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile, PyObject *__pyx_v_outputFile, PyObject *__pyx_v_options, PyObject *__pyx_v_allVariants, int __pyx_v_windowStart, int __pyx_v_windowEnd) { struct __pyx_obj_10chaplotype_Haplotype *__pyx_v_haplotype = 0; struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_theBuffer = 0; PyObject *__pyx_v_info = 0; PyObject *__pyx_v_lineinfo = 0; PyObject *__pyx_v_normalisedGLs = 0; PyObject *__pyx_v_FR = 0; PyObject *__pyx_v_PP = 0; PyObject *__pyx_v_NF = 0; PyObject *__pyx_v_NR = 0; PyObject *__pyx_v_TR = 0; PyObject *__pyx_v_GT = 0; PyObject *__pyx_v_linefilter = 0; int __pyx_v_gofThreshold; int __pyx_v_i; CYTHON_UNUSED int __pyx_v_variantIndex; int __pyx_v_nVariants; CYTHON_UNUSED int __pyx_v_nVarsHap1; CYTHON_UNUSED int __pyx_v_nVarsHap2; CYTHON_UNUSED int __pyx_v_tnReadsThisIndividual; int __pyx_v_index1; int __pyx_v_index2; int __pyx_v_hapIndex; CYTHON_UNUSED double __pyx_v_mLTOT; double __pyx_v_genotypePosterior; double __pyx_v_nonRefPosterior; double __pyx_v_refPosterior; double __pyx_v_maxLikelihood; double __pyx_v_gofValue; double __pyx_v_maxGofValue; double __pyx_v_minGofValue; PyObject *__pyx_v_thisSample = 0; PyObject *__pyx_v_sortedPositions = 0; PyObject *__pyx_v_variants = 0; PyObject *__pyx_v_likelihoods = 0; PyObject *__pyx_v_variantsThisPos = 0; int **__pyx_v_varThisPosInHap; int *__pyx_v_haplotypeIsRefAtThisPos; CYTHON_UNUSED int __pyx_v_hapIsRef; PyObject *__pyx_v_POS = NULL; PyObject *__pyx_v_variant = NULL; PyObject *__pyx_v_chrom = NULL; PyObject *__pyx_v_ref = NULL; PyObject *__pyx_v_alt = NULL; PyObject *__pyx_v_theId = NULL; PyObject *__pyx_v_qual = NULL; PyObject *__pyx_v_format = NULL; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_freq = NULL; PyObject *__pyx_v_posterior = NULL; PyObject *__pyx_v_varTR = NULL; PyObject *__pyx_v_varNF = NULL; PyObject *__pyx_v_varNR = NULL; PyObject *__pyx_v_vcfDataLine = NULL; CYTHON_UNUSED PyObject *__pyx_v_theVar = NULL; PyObject *__pyx_v_gofsThisPos = NULL; PyObject *__pyx_v_nNonRefCalls = NULL; PyObject *__pyx_v_phredPosterior = NULL; PyObject *__pyx_v_phredNonRefPosterior = NULL; PyObject *__pyx_v_phredRefPosterior = NULL; PyObject *__pyx_v_readsPerSample = NULL; PyObject *__pyx_v_varReadsPerSample = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_f = NULL; PyObject *__pyx_v_pp = NULL; PyObject *__pyx_v_x = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); char *__pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; int __pyx_t_21; double __pyx_t_22; double __pyx_t_23; double __pyx_t_24; double __pyx_t_25; int __pyx_t_26; int __pyx_t_27; int __pyx_t_28; long __pyx_t_29; int __pyx_t_30; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outputCallToVCF", 0); /* "vcfutils.pyx":349 * cdef cAlignedRead** endRead * * cdef dict info = vcfInfo # <<<<<<<<<<<<<< * cdef dict lineinfo * */ __Pyx_INCREF(((PyObject *)__pyx_v_vcfInfo)); __pyx_v_info = __pyx_v_vcfInfo; /* "vcfutils.pyx":363 * cdef list linefilter * * cdef int gofThreshold = options.maxGOF # <<<<<<<<<<<<<< * cdef int i = 0 * cdef int variantIndex = 0 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__maxGOF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_gofThreshold = __pyx_t_2; /* "vcfutils.pyx":364 * * cdef int gofThreshold = options.maxGOF * cdef int i = 0 # <<<<<<<<<<<<<< * cdef int variantIndex = 0 * cdef int nVariants = 0 */ __pyx_v_i = 0; /* "vcfutils.pyx":365 * cdef int gofThreshold = options.maxGOF * cdef int i = 0 * cdef int variantIndex = 0 # <<<<<<<<<<<<<< * cdef int nVariants = 0 * cdef int nVarsHap1 = 0 */ __pyx_v_variantIndex = 0; /* "vcfutils.pyx":366 * cdef int i = 0 * cdef int variantIndex = 0 * cdef int nVariants = 0 # <<<<<<<<<<<<<< * cdef int nVarsHap1 = 0 * cdef int nVarsHap2 = 0 */ __pyx_v_nVariants = 0; /* "vcfutils.pyx":367 * cdef int variantIndex = 0 * cdef int nVariants = 0 * cdef int nVarsHap1 = 0 # <<<<<<<<<<<<<< * cdef int nVarsHap2 = 0 * cdef int tnReadsThisIndividual = 0 */ __pyx_v_nVarsHap1 = 0; /* "vcfutils.pyx":368 * cdef int nVariants = 0 * cdef int nVarsHap1 = 0 * cdef int nVarsHap2 = 0 # <<<<<<<<<<<<<< * cdef int tnReadsThisIndividual = 0 * cdef int index1,index2,hapIndex = 0 */ __pyx_v_nVarsHap2 = 0; /* "vcfutils.pyx":369 * cdef int nVarsHap1 = 0 * cdef int nVarsHap2 = 0 * cdef int tnReadsThisIndividual = 0 # <<<<<<<<<<<<<< * cdef int index1,index2,hapIndex = 0 * */ __pyx_v_tnReadsThisIndividual = 0; /* "vcfutils.pyx":370 * cdef int nVarsHap2 = 0 * cdef int tnReadsThisIndividual = 0 * cdef int index1,index2,hapIndex = 0 # <<<<<<<<<<<<<< * * cdef double mLTOT = -0.23025850929940459 # Minus log ten over ten */ __pyx_v_hapIndex = 0; /* "vcfutils.pyx":372 * cdef int index1,index2,hapIndex = 0 * * cdef double mLTOT = -0.23025850929940459 # Minus log ten over ten # <<<<<<<<<<<<<< * cdef double genotypePosterior = 0.0 * cdef double nonRefPosterior = 0.0 */ __pyx_v_mLTOT = -0.23025850929940459; /* "vcfutils.pyx":373 * * cdef double mLTOT = -0.23025850929940459 # Minus log ten over ten * cdef double genotypePosterior = 0.0 # <<<<<<<<<<<<<< * cdef double nonRefPosterior = 0.0 * cdef double refPosterior = 0.0 */ __pyx_v_genotypePosterior = 0.0; /* "vcfutils.pyx":374 * cdef double mLTOT = -0.23025850929940459 # Minus log ten over ten * cdef double genotypePosterior = 0.0 * cdef double nonRefPosterior = 0.0 # <<<<<<<<<<<<<< * cdef double refPosterior = 0.0 * cdef double maxLikelihood = 0.0 */ __pyx_v_nonRefPosterior = 0.0; /* "vcfutils.pyx":375 * cdef double genotypePosterior = 0.0 * cdef double nonRefPosterior = 0.0 * cdef double refPosterior = 0.0 # <<<<<<<<<<<<<< * cdef double maxLikelihood = 0.0 * cdef double gofValue = 0.0 */ __pyx_v_refPosterior = 0.0; /* "vcfutils.pyx":376 * cdef double nonRefPosterior = 0.0 * cdef double refPosterior = 0.0 * cdef double maxLikelihood = 0.0 # <<<<<<<<<<<<<< * cdef double gofValue = 0.0 * cdef double maxGofValue = 0.0 */ __pyx_v_maxLikelihood = 0.0; /* "vcfutils.pyx":377 * cdef double refPosterior = 0.0 * cdef double maxLikelihood = 0.0 * cdef double gofValue = 0.0 # <<<<<<<<<<<<<< * cdef double maxGofValue = 0.0 * cdef double minGofValue = 1e6 */ __pyx_v_gofValue = 0.0; /* "vcfutils.pyx":378 * cdef double maxLikelihood = 0.0 * cdef double gofValue = 0.0 * cdef double maxGofValue = 0.0 # <<<<<<<<<<<<<< * cdef double minGofValue = 1e6 * */ __pyx_v_maxGofValue = 0.0; /* "vcfutils.pyx":379 * cdef double gofValue = 0.0 * cdef double maxGofValue = 0.0 * cdef double minGofValue = 1e6 # <<<<<<<<<<<<<< * * cdef bytes thisSample */ __pyx_v_minGofValue = 1e6; /* "vcfutils.pyx":382 * * cdef bytes thisSample * cdef list sortedPositions = sorted(varsByPos.keys()) # <<<<<<<<<<<<<< * cdef list variants * cdef list likelihoods = None */ if (unlikely(((PyObject *)__pyx_v_varsByPos) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyDict_Keys(__pyx_v_varsByPos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sortedPositions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":384 * cdef list sortedPositions = sorted(varsByPos.keys()) * cdef list variants * cdef list likelihoods = None # <<<<<<<<<<<<<< * cdef list variantsThisPos * */ __Pyx_INCREF(Py_None); __pyx_v_likelihoods = ((PyObject*)Py_None); /* "vcfutils.pyx":387 * cdef list variantsThisPos * * cdef int** varThisPosInHap = (calloc(len(haplotypes), sizeof(int*))) # <<<<<<<<<<<<<< * cdef int* haplotypeIsRefAtThisPos = (calloc(len(haplotypes), sizeof(int))) * cdef int hapIsRef = 0 */ if (unlikely(((PyObject *)__pyx_v_haplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_haplotypes)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_varThisPosInHap = ((int **)calloc(__pyx_t_4, (sizeof(int *)))); /* "vcfutils.pyx":388 * * cdef int** varThisPosInHap = (calloc(len(haplotypes), sizeof(int*))) * cdef int* haplotypeIsRefAtThisPos = (calloc(len(haplotypes), sizeof(int))) # <<<<<<<<<<<<<< * cdef int hapIsRef = 0 * */ if (unlikely(((PyObject *)__pyx_v_haplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_haplotypes)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_haplotypeIsRefAtThisPos = ((int *)calloc(__pyx_t_4, (sizeof(int)))); /* "vcfutils.pyx":389 * cdef int** varThisPosInHap = (calloc(len(haplotypes), sizeof(int*))) * cdef int* haplotypeIsRefAtThisPos = (calloc(len(haplotypes), sizeof(int))) * cdef int hapIsRef = 0 # <<<<<<<<<<<<<< * * for hapIndex in range(len(haplotypes)): */ __pyx_v_hapIsRef = 0; /* "vcfutils.pyx":391 * cdef int hapIsRef = 0 * * for hapIndex in range(len(haplotypes)): # <<<<<<<<<<<<<< * varThisPosInHap[hapIndex] = (calloc(len(allVariants), sizeof(int))) * */ if (unlikely(((PyObject *)__pyx_v_haplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_haplotypes)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_4; __pyx_t_2+=1) { __pyx_v_hapIndex = __pyx_t_2; /* "vcfutils.pyx":392 * * for hapIndex in range(len(haplotypes)): * varThisPosInHap[hapIndex] = (calloc(len(allVariants), sizeof(int))) # <<<<<<<<<<<<<< * * for POS in sortedPositions: */ if (unlikely(((PyObject *)__pyx_v_allVariants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_v_allVariants)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_varThisPosInHap[__pyx_v_hapIndex]) = ((int *)calloc(__pyx_t_5, (sizeof(int)))); } /* "vcfutils.pyx":394 * varThisPosInHap[hapIndex] = (calloc(len(allVariants), sizeof(int))) * * for POS in sortedPositions: # <<<<<<<<<<<<<< * * maxGofValue = 0.0 */ if (unlikely(((PyObject *)__pyx_v_sortedPositions) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_sortedPositions); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_POS); __pyx_v_POS = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":396 * for POS in sortedPositions: * * maxGofValue = 0.0 # <<<<<<<<<<<<<< * minGofValue = 1e6 * variants = varsByPos[POS] */ __pyx_v_maxGofValue = 0.0; /* "vcfutils.pyx":397 * * maxGofValue = 0.0 * minGofValue = 1e6 # <<<<<<<<<<<<<< * variants = varsByPos[POS] * variantsThisPos = variants */ __pyx_v_minGofValue = 1e6; /* "vcfutils.pyx":398 * maxGofValue = 0.0 * minGofValue = 1e6 * variants = varsByPos[POS] # <<<<<<<<<<<<<< * variantsThisPos = variants * nVariants = len(variants) */ if (unlikely(((PyObject *)__pyx_v_varsByPos) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_varsByPos), __pyx_v_POS); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_variants)); __pyx_v_variants = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":399 * minGofValue = 1e6 * variants = varsByPos[POS] * variantsThisPos = variants # <<<<<<<<<<<<<< * nVariants = len(variants) * */ __Pyx_INCREF(((PyObject *)__pyx_v_variants)); __Pyx_XDECREF(((PyObject *)__pyx_v_variantsThisPos)); __pyx_v_variantsThisPos = __pyx_v_variants; /* "vcfutils.pyx":400 * variants = varsByPos[POS] * variantsThisPos = variants * nVariants = len(variants) # <<<<<<<<<<<<<< * * # Store boolean flag saying if each haplotype is reference at this position, for use in genotype/likelihood computation */ if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_v_variants)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nVariants = __pyx_t_5; /* "vcfutils.pyx":403 * * # Store boolean flag saying if each haplotype is reference at this position, for use in genotype/likelihood computation * for hapIndex,haplotype in enumerate(haplotypes): # <<<<<<<<<<<<<< * * haplotypeIsRefAtThisPos[hapIndex] = 1 */ __pyx_t_2 = 0; __pyx_t_3 = ((PyObject *)__pyx_v_haplotypes); __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_10chaplotype_Haplotype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_haplotype)); __pyx_v_haplotype = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_6); __pyx_t_6 = 0; __pyx_v_hapIndex = __pyx_t_2; __pyx_t_2 = (__pyx_t_2 + 1); /* "vcfutils.pyx":405 * for hapIndex,haplotype in enumerate(haplotypes): * * haplotypeIsRefAtThisPos[hapIndex] = 1 # <<<<<<<<<<<<<< * * for variantIndex,variant in enumerate(variants): */ (__pyx_v_haplotypeIsRefAtThisPos[__pyx_v_hapIndex]) = 1; /* "vcfutils.pyx":407 * haplotypeIsRefAtThisPos[hapIndex] = 1 * * for variantIndex,variant in enumerate(variants): # <<<<<<<<<<<<<< * * if variant in haplotype.variants: */ __pyx_t_7 = 0; __pyx_t_6 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_variant); __pyx_v_variant = __pyx_t_9; __pyx_t_9 = 0; __pyx_v_variantIndex = __pyx_t_7; __pyx_t_7 = (__pyx_t_7 + 1); /* "vcfutils.pyx":409 * for variantIndex,variant in enumerate(variants): * * if variant in haplotype.variants: # <<<<<<<<<<<<<< * varThisPosInHap[hapIndex][variantsThisPos.index(variant)] = 1 * */ __pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_v_variant, ((PyObject *)__pyx_v_haplotype->variants), Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_10) { /* "vcfutils.pyx":410 * * if variant in haplotype.variants: * varThisPosInHap[hapIndex][variantsThisPos.index(variant)] = 1 # <<<<<<<<<<<<<< * * if variant.minRefPos <= POS <= variant.maxRefPos: */ __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_variantsThisPos), __pyx_n_s__index); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_variant); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_variant); __Pyx_GIVEREF(__pyx_v_variant); __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_12); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; ((__pyx_v_varThisPosInHap[__pyx_v_hapIndex])[__pyx_t_13]) = 1; /* "vcfutils.pyx":412 * varThisPosInHap[hapIndex][variantsThisPos.index(variant)] = 1 * * if variant.minRefPos <= POS <= variant.maxRefPos: # <<<<<<<<<<<<<< * haplotypeIsRefAtThisPos[hapIndex] = 0 * else: */ __pyx_t_12 = PyObject_GetAttr(__pyx_v_variant, __pyx_n_s__minRefPos); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_v_POS, Py_LE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_11)) { __Pyx_DECREF(__pyx_t_11); __pyx_t_9 = PyObject_GetAttr(__pyx_v_variant, __pyx_n_s__maxRefPos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyObject_RichCompare(__pyx_v_POS, __pyx_t_9, Py_LE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10) { /* "vcfutils.pyx":413 * * if variant.minRefPos <= POS <= variant.maxRefPos: * haplotypeIsRefAtThisPos[hapIndex] = 0 # <<<<<<<<<<<<<< * else: * varThisPosInHap[hapIndex][variantsThisPos.index(variant)] = 0 */ (__pyx_v_haplotypeIsRefAtThisPos[__pyx_v_hapIndex]) = 0; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } /*else*/ { /* "vcfutils.pyx":415 * haplotypeIsRefAtThisPos[hapIndex] = 0 * else: * varThisPosInHap[hapIndex][variantsThisPos.index(variant)] = 0 # <<<<<<<<<<<<<< * * for variantIndex,variant in enumerate(allVariants): */ __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_variantsThisPos), __pyx_n_s__index); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_variant); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_variant); __Pyx_GIVEREF(__pyx_v_variant); __pyx_t_9 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; ((__pyx_v_varThisPosInHap[__pyx_v_hapIndex])[__pyx_t_13]) = 0; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "vcfutils.pyx":417 * varThisPosInHap[hapIndex][variantsThisPos.index(variant)] = 0 * * for variantIndex,variant in enumerate(allVariants): # <<<<<<<<<<<<<< * * if variant in haplotype.variants: */ __pyx_t_7 = 0; __pyx_t_6 = ((PyObject *)__pyx_v_allVariants); __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_variant); __pyx_v_variant = __pyx_t_9; __pyx_t_9 = 0; __pyx_v_variantIndex = __pyx_t_7; __pyx_t_7 = (__pyx_t_7 + 1); /* "vcfutils.pyx":419 * for variantIndex,variant in enumerate(allVariants): * * if variant in haplotype.variants: # <<<<<<<<<<<<<< * if variant.minRefPos <= POS <= variant.maxRefPos: * haplotypeIsRefAtThisPos[hapIndex] = 0 */ __pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_v_variant, ((PyObject *)__pyx_v_haplotype->variants), Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_10) { /* "vcfutils.pyx":420 * * if variant in haplotype.variants: * if variant.minRefPos <= POS <= variant.maxRefPos: # <<<<<<<<<<<<<< * haplotypeIsRefAtThisPos[hapIndex] = 0 * */ __pyx_t_9 = PyObject_GetAttr(__pyx_v_variant, __pyx_n_s__minRefPos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = PyObject_RichCompare(__pyx_t_9, __pyx_v_POS, Py_LE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_12)) { __Pyx_DECREF(__pyx_t_12); __pyx_t_11 = PyObject_GetAttr(__pyx_v_variant, __pyx_n_s__maxRefPos); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyObject_RichCompare(__pyx_v_POS, __pyx_t_11, Py_LE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_10) { /* "vcfutils.pyx":421 * if variant in haplotype.variants: * if variant.minRefPos <= POS <= variant.maxRefPos: * haplotypeIsRefAtThisPos[hapIndex] = 0 # <<<<<<<<<<<<<< * * if options.verbosity >= 3: */ (__pyx_v_haplotypeIsRefAtThisPos[__pyx_v_hapIndex]) = 0; goto __pyx_L16; } __pyx_L16:; goto __pyx_L15; } __pyx_L15:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":423 * haplotypeIsRefAtThisPos[hapIndex] = 0 * * if options.verbosity >= 3: # <<<<<<<<<<<<<< * logger.debug("Haps are %s" %(haplotypes)) * logger.debug("Logging mutated sequences...") */ __pyx_t_3 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_10) { /* "vcfutils.pyx":424 * * if options.verbosity >= 3: * logger.debug("Haps are %s" %(haplotypes)) # <<<<<<<<<<<<<< * logger.debug("Logging mutated sequences...") * logger.debug("Lengths are %s" %([len(str(haplotype.getMutatedSequence())) for haplotype in haplotypes])) */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__debug); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), ((PyObject *)__pyx_v_haplotypes)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "vcfutils.pyx":425 * if options.verbosity >= 3: * logger.debug("Haps are %s" %(haplotypes)) * logger.debug("Logging mutated sequences...") # <<<<<<<<<<<<<< * logger.debug("Lengths are %s" %([len(str(haplotype.getMutatedSequence())) for haplotype in haplotypes])) * */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__debug); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "vcfutils.pyx":426 * logger.debug("Haps are %s" %(haplotypes)) * logger.debug("Logging mutated sequences...") * logger.debug("Lengths are %s" %([len(str(haplotype.getMutatedSequence())) for haplotype in haplotypes])) # <<<<<<<<<<<<<< * * for haplotype in haplotypes: */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__debug); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (unlikely(((PyObject *)__pyx_v_haplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = ((PyObject *)__pyx_v_haplotypes); __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_10chaplotype_Haplotype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_haplotype)); __pyx_v_haplotype = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyBytes_FromString(((struct __pyx_vtabstruct_10chaplotype_Haplotype *)__pyx_v_haplotype->__pyx_vtab)->getMutatedSequence(__pyx_v_haplotype)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_8 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (unlikely(__Pyx_PyList_Append(__pyx_t_6, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":428 * logger.debug("Lengths are %s" %([len(str(haplotype.getMutatedSequence())) for haplotype in haplotypes])) * * for haplotype in haplotypes: # <<<<<<<<<<<<<< * logger.debug(str(haplotype.getMutatedSequence())[50:-50]) * */ if (unlikely(((PyObject *)__pyx_v_haplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = ((PyObject *)__pyx_v_haplotypes); __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_10chaplotype_Haplotype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_haplotype)); __pyx_v_haplotype = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_6); __pyx_t_6 = 0; /* "vcfutils.pyx":429 * * for haplotype in haplotypes: * logger.debug(str(haplotype.getMutatedSequence())[50:-50]) # <<<<<<<<<<<<<< * * logger.debug("Unfiltered variants are %s" %(sorted(variants))) */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__debug); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyBytes_FromString(((struct __pyx_vtabstruct_10chaplotype_Haplotype *)__pyx_v_haplotype->__pyx_vtab)->getMutatedSequence(__pyx_v_haplotype)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_t_6, 50, -50); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":431 * logger.debug(str(haplotype.getMutatedSequence())[50:-50]) * * logger.debug("Unfiltered variants are %s" %(sorted(variants))) # <<<<<<<<<<<<<< * logger.debug("Var info = %s" %(info)) * logger.debug("Unfiltered variant info is %s" %([info[v] for v in sorted(variants)])) */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__debug); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_variants)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_variants)); __Pyx_GIVEREF(((PyObject *)__pyx_v_variants)); __pyx_t_6 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":432 * * logger.debug("Unfiltered variants are %s" %(sorted(variants))) * logger.debug("Var info = %s" %(info)) # <<<<<<<<<<<<<< * logger.debug("Unfiltered variant info is %s" %([info[v] for v in sorted(variants)])) * logger.debug("NVariants = %s" %(nVariants)) */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__debug); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), ((PyObject *)__pyx_v_info)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":433 * logger.debug("Unfiltered variants are %s" %(sorted(variants))) * logger.debug("Var info = %s" %(info)) * logger.debug("Unfiltered variant info is %s" %([info[v] for v in sorted(variants)])) # <<<<<<<<<<<<<< * logger.debug("NVariants = %s" %(nVariants)) * */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__debug); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_variants)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_variants)); __Pyx_GIVEREF(((PyObject *)__pyx_v_variants)); __pyx_t_12 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (PyList_CheckExact(__pyx_t_12) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_6 = __pyx_t_12; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; __pyx_t_14 = NULL; } else { __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { if (!__pyx_t_14 && PyList_CheckExact(__pyx_t_6)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_12); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_14 && PyTuple_CheckExact(__pyx_t_6)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_12); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_12 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_12)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_12); } __Pyx_XDECREF(__pyx_v_v); __pyx_v_v = __pyx_t_12; __pyx_t_12 = 0; if (unlikely(((PyObject *)__pyx_v_info) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_info), __pyx_v_v); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "vcfutils.pyx":434 * logger.debug("Var info = %s" %(info)) * logger.debug("Unfiltered variant info is %s" %([info[v] for v in sorted(variants)])) * logger.debug("NVariants = %s" %(nVariants)) # <<<<<<<<<<<<<< * * chrom = variants[0].refName */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__debug); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromLong(__pyx_v_nVariants); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L17; } __pyx_L17:; /* "vcfutils.pyx":436 * logger.debug("NVariants = %s" %(nVariants)) * * chrom = variants[0].refName # <<<<<<<<<<<<<< * ref,alt = refAndAlt(chrom, POS, variants, refFile) * theId = "." */ if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = PyObject_GetAttr(PyList_GET_ITEM(__pyx_v_variants, 0), __pyx_n_s__refName); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(__pyx_v_chrom); __pyx_v_chrom = __pyx_t_9; __pyx_t_9 = 0; /* "vcfutils.pyx":437 * * chrom = variants[0].refName * ref,alt = refAndAlt(chrom, POS, variants, refFile) # <<<<<<<<<<<<<< * theId = "." * #id = "."#str(-1) */ __pyx_t_15 = PyBytes_AsString(__pyx_v_chrom); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_v_POS); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((PyObject *)__pyx_f_8vcfutils_refAndAlt(__pyx_t_15, __pyx_t_2, __pyx_v_variants, __pyx_v_refFile)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (likely(PyTuple_CheckExact(__pyx_t_9))) { PyObject* sequence = __pyx_t_9; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_16(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L24_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_3 = __pyx_t_16(__pyx_t_12); if (unlikely(!__pyx_t_3)) goto __pyx_L24_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L25_unpacking_done; __pyx_L24_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L25_unpacking_done:; } __Pyx_XDECREF(__pyx_v_ref); __pyx_v_ref = __pyx_t_6; __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_alt); __pyx_v_alt = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":438 * chrom = variants[0].refName * ref,alt = refAndAlt(chrom, POS, variants, refFile) * theId = "." # <<<<<<<<<<<<<< * #id = "."#str(-1) * qual = -1 */ __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); __Pyx_XDECREF(__pyx_v_theId); __pyx_v_theId = ((PyObject *)__pyx_kp_s_9); /* "vcfutils.pyx":440 * theId = "." * #id = "."#str(-1) * qual = -1 # <<<<<<<<<<<<<< * format = ['GT:GL:GOF:GQ:NR:NV'] * linefilter = [] */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_XDECREF(__pyx_v_qual); __pyx_v_qual = __pyx_int_neg_1; /* "vcfutils.pyx":441 * #id = "."#str(-1) * qual = -1 * format = ['GT:GL:GOF:GQ:NR:NV'] # <<<<<<<<<<<<<< * linefilter = [] * lineinfo = info[variants[0]] */ __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_kp_s_10)); PyList_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_kp_s_10)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10)); __Pyx_XDECREF(((PyObject *)__pyx_v_format)); __pyx_v_format = __pyx_t_9; __pyx_t_9 = 0; /* "vcfutils.pyx":442 * qual = -1 * format = ['GT:GL:GOF:GQ:NR:NV'] * linefilter = [] # <<<<<<<<<<<<<< * lineinfo = info[variants[0]] * FR = [] # Can be generalised to all fields of variable length */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(((PyObject *)__pyx_v_linefilter)); __pyx_v_linefilter = __pyx_t_9; __pyx_t_9 = 0; /* "vcfutils.pyx":443 * format = ['GT:GL:GOF:GQ:NR:NV'] * linefilter = [] * lineinfo = info[variants[0]] # <<<<<<<<<<<<<< * FR = [] # Can be generalised to all fields of variable length * PP = [] */ if (unlikely(((PyObject *)__pyx_v_info) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_info), PyList_GET_ITEM(__pyx_v_variants, 0)); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (!(likely(PyDict_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_9)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_lineinfo)); __pyx_v_lineinfo = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; /* "vcfutils.pyx":444 * linefilter = [] * lineinfo = info[variants[0]] * FR = [] # Can be generalised to all fields of variable length # <<<<<<<<<<<<<< * PP = [] * NF = [] */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(((PyObject *)__pyx_v_FR)); __pyx_v_FR = __pyx_t_9; __pyx_t_9 = 0; /* "vcfutils.pyx":445 * lineinfo = info[variants[0]] * FR = [] # Can be generalised to all fields of variable length * PP = [] # <<<<<<<<<<<<<< * NF = [] * NR = [] */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(((PyObject *)__pyx_v_PP)); __pyx_v_PP = __pyx_t_9; __pyx_t_9 = 0; /* "vcfutils.pyx":446 * FR = [] # Can be generalised to all fields of variable length * PP = [] * NF = [] # <<<<<<<<<<<<<< * NR = [] * TR = [] */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(((PyObject *)__pyx_v_NF)); __pyx_v_NF = __pyx_t_9; __pyx_t_9 = 0; /* "vcfutils.pyx":447 * PP = [] * NF = [] * NR = [] # <<<<<<<<<<<<<< * TR = [] * */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(((PyObject *)__pyx_v_NR)); __pyx_v_NR = __pyx_t_9; __pyx_t_9 = 0; /* "vcfutils.pyx":448 * NF = [] * NR = [] * TR = [] # <<<<<<<<<<<<<< * * for var in variants: */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(((PyObject *)__pyx_v_TR)); __pyx_v_TR = __pyx_t_9; __pyx_t_9 = 0; /* "vcfutils.pyx":450 * TR = [] * * for var in variants: # <<<<<<<<<<<<<< * * #logger.debug("Info for variant %s is %s" %(var, info[var])) */ if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_9); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_9, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_var); __pyx_v_var = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":453 * * #logger.debug("Info for variant %s is %s" %(var, info[var])) * linefilter.extend( [f for f in vcfFilter[var] if ( f in vcfFile.getfilter() )] ) # <<<<<<<<<<<<<< * * freq = info[var]['FR'] */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_linefilter), __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (unlikely(((PyObject *)__pyx_v_vcfFilter) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfFilter), __pyx_v_var); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyList_CheckExact(__pyx_t_12) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_11 = __pyx_t_12; __Pyx_INCREF(__pyx_t_11); __pyx_t_8 = 0; __pyx_t_14 = NULL; } else { __pyx_t_8 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = Py_TYPE(__pyx_t_11)->tp_iternext; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { if (!__pyx_t_14 && PyList_CheckExact(__pyx_t_11)) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_11)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_8); __Pyx_INCREF(__pyx_t_12); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_11, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_14 && PyTuple_CheckExact(__pyx_t_11)) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_11)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_8); __Pyx_INCREF(__pyx_t_12); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_11, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_12 = __pyx_t_14(__pyx_t_11); if (unlikely(!__pyx_t_12)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_12); } __Pyx_XDECREF(__pyx_v_f); __pyx_v_f = __pyx_t_12; __pyx_t_12 = 0; __pyx_t_12 = PyObject_GetAttr(__pyx_v_vcfFile, __pyx_n_s__getfilter); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_17, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_10) { if (unlikely(__Pyx_PyList_Append(__pyx_t_6, (PyObject*)__pyx_v_f))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L30; } __pyx_L30:; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_t_6)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "vcfutils.pyx":455 * linefilter.extend( [f for f in vcfFilter[var] if ( f in vcfFile.getfilter() )] ) * * freq = info[var]['FR'] # <<<<<<<<<<<<<< * posterior = info[var]['PP'] * varTR = info[var]['TR'] */ if (unlikely(((PyObject *)__pyx_v_info) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_info), __pyx_v_var); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyObject_GetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__FR)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_freq); __pyx_v_freq = __pyx_t_11; __pyx_t_11 = 0; /* "vcfutils.pyx":456 * * freq = info[var]['FR'] * posterior = info[var]['PP'] # <<<<<<<<<<<<<< * varTR = info[var]['TR'] * varNF = info[var]['NF'] */ if (unlikely(((PyObject *)__pyx_v_info) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_info), __pyx_v_var); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyObject_GetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__PP)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_v_posterior); __pyx_v_posterior = __pyx_t_6; __pyx_t_6 = 0; /* "vcfutils.pyx":457 * freq = info[var]['FR'] * posterior = info[var]['PP'] * varTR = info[var]['TR'] # <<<<<<<<<<<<<< * varNF = info[var]['NF'] * varNR = info[var]['NR'] */ if (unlikely(((PyObject *)__pyx_v_info) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_info), __pyx_v_var); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyObject_GetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__TR)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_varTR); __pyx_v_varTR = __pyx_t_11; __pyx_t_11 = 0; /* "vcfutils.pyx":458 * posterior = info[var]['PP'] * varTR = info[var]['TR'] * varNF = info[var]['NF'] # <<<<<<<<<<<<<< * varNR = info[var]['NR'] * */ if (unlikely(((PyObject *)__pyx_v_info) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_info), __pyx_v_var); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyObject_GetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__NF)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_v_varNF); __pyx_v_varNF = __pyx_t_6; __pyx_t_6 = 0; /* "vcfutils.pyx":459 * varTR = info[var]['TR'] * varNF = info[var]['NF'] * varNR = info[var]['NR'] # <<<<<<<<<<<<<< * * FR.extend(freq) */ if (unlikely(((PyObject *)__pyx_v_info) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_info), __pyx_v_var); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyObject_GetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__NR)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_varNR); __pyx_v_varNR = __pyx_t_11; __pyx_t_11 = 0; /* "vcfutils.pyx":461 * varNR = info[var]['NR'] * * FR.extend(freq) # <<<<<<<<<<<<<< * PP.extend(posterior) * NR.extend(varNR) */ __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_FR), __pyx_n_s__extend); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_freq); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_freq); __Pyx_GIVEREF(__pyx_v_freq); __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":462 * * FR.extend(freq) * PP.extend(posterior) # <<<<<<<<<<<<<< * NR.extend(varNR) * NF.extend(varNF) */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_PP), __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_posterior); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_posterior); __Pyx_GIVEREF(__pyx_v_posterior); __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "vcfutils.pyx":463 * FR.extend(freq) * PP.extend(posterior) * NR.extend(varNR) # <<<<<<<<<<<<<< * NF.extend(varNF) * TR.extend(varTR) */ __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_NR), __pyx_n_s__extend); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_varNR); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_varNR); __Pyx_GIVEREF(__pyx_v_varNR); __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":464 * PP.extend(posterior) * NR.extend(varNR) * NF.extend(varNF) # <<<<<<<<<<<<<< * TR.extend(varTR) * */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_NF), __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_varNF); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_varNF); __Pyx_GIVEREF(__pyx_v_varNF); __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "vcfutils.pyx":465 * NR.extend(varNR) * NF.extend(varNF) * TR.extend(varTR) # <<<<<<<<<<<<<< * * lineinfo['WS'] = [windowStart] */ __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_TR), __pyx_n_s__extend); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_varTR); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_varTR); __Pyx_GIVEREF(__pyx_v_varTR); __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "vcfutils.pyx":467 * TR.extend(varTR) * * lineinfo['WS'] = [windowStart] # <<<<<<<<<<<<<< * lineinfo['WE'] = [windowEnd] * lineinfo['FR'] = FR */ __pyx_t_9 = PyInt_FromLong(__pyx_v_windowStart); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(((PyObject *)__pyx_v_lineinfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__WS), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":468 * * lineinfo['WS'] = [windowStart] * lineinfo['WE'] = [windowEnd] # <<<<<<<<<<<<<< * lineinfo['FR'] = FR * lineinfo['PP'] = PP */ __pyx_t_3 = PyInt_FromLong(__pyx_v_windowEnd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_lineinfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__WE), ((PyObject *)__pyx_t_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "vcfutils.pyx":469 * lineinfo['WS'] = [windowStart] * lineinfo['WE'] = [windowEnd] * lineinfo['FR'] = FR # <<<<<<<<<<<<<< * lineinfo['PP'] = PP * lineinfo['NF'] = NF */ if (unlikely(((PyObject *)__pyx_v_lineinfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__FR), ((PyObject *)__pyx_v_FR)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":470 * lineinfo['WE'] = [windowEnd] * lineinfo['FR'] = FR * lineinfo['PP'] = PP # <<<<<<<<<<<<<< * lineinfo['NF'] = NF * lineinfo['NR'] = NR */ if (unlikely(((PyObject *)__pyx_v_lineinfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__PP), ((PyObject *)__pyx_v_PP)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":471 * lineinfo['FR'] = FR * lineinfo['PP'] = PP * lineinfo['NF'] = NF # <<<<<<<<<<<<<< * lineinfo['NR'] = NR * lineinfo['TR'] = TR */ if (unlikely(((PyObject *)__pyx_v_lineinfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__NF), ((PyObject *)__pyx_v_NF)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":472 * lineinfo['PP'] = PP * lineinfo['NF'] = NF * lineinfo['NR'] = NR # <<<<<<<<<<<<<< * lineinfo['TR'] = TR * */ if (unlikely(((PyObject *)__pyx_v_lineinfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__NR), ((PyObject *)__pyx_v_NR)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":473 * lineinfo['NF'] = NF * lineinfo['NR'] = NR * lineinfo['TR'] = TR # <<<<<<<<<<<<<< * * linefilter = list(set(linefilter)) */ if (unlikely(((PyObject *)__pyx_v_lineinfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__TR), ((PyObject *)__pyx_v_TR)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":475 * lineinfo['TR'] = TR * * linefilter = list(set(linefilter)) # <<<<<<<<<<<<<< * qual = max([int(pp) for pp in lineinfo['PP']]) * vcfDataLine = {'chrom':chrom,'pos':POS,'ref':ref,'alt':alt,'id':theId,'info':lineinfo,'filter':linefilter,'qual':qual,'format':format} */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_linefilter)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_linefilter)); __Pyx_GIVEREF(((PyObject *)__pyx_v_linefilter)); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_linefilter)); __pyx_v_linefilter = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":476 * * linefilter = list(set(linefilter)) * qual = max([int(pp) for pp in lineinfo['PP']]) # <<<<<<<<<<<<<< * vcfDataLine = {'chrom':chrom,'pos':POS,'ref':ref,'alt':alt,'id':theId,'info':lineinfo,'filter':linefilter,'qual':qual,'format':format} * */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_v_lineinfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__PP)); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) { __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; __pyx_t_14 = NULL; } else { __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { if (!__pyx_t_14 && PyList_CheckExact(__pyx_t_6)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_14 && PyTuple_CheckExact(__pyx_t_6)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_9 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_9)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_9); } __Pyx_XDECREF(__pyx_v_pp); __pyx_v_pp = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_pp); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_pp); __Pyx_GIVEREF(__pyx_v_pp); __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_t_3)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_v_qual); __pyx_v_qual = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":477 * linefilter = list(set(linefilter)) * qual = max([int(pp) for pp in lineinfo['PP']]) * vcfDataLine = {'chrom':chrom,'pos':POS,'ref':ref,'alt':alt,'id':theId,'info':lineinfo,'filter':linefilter,'qual':qual,'format':format} # <<<<<<<<<<<<<< * * # Now pull out the genotype informations for each sample, and compute genotype likelihoods and */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__chrom), __pyx_v_chrom) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__pos), __pyx_v_POS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__ref), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__alt), __pyx_v_alt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__id), __pyx_v_theId) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_v_lineinfo)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__filter), ((PyObject *)__pyx_v_linefilter)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__qual), __pyx_v_qual) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_v_format)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_vcfDataLine)); __pyx_v_vcfDataLine = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":481 * # Now pull out the genotype informations for each sample, and compute genotype likelihoods and * # Phred-based qualities scores. * theVar = variants[0] # <<<<<<<<<<<<<< * gofsThisPos = [] * nNonRefCalls = 0 */ if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyList_GET_ITEM(__pyx_v_variants, 0); __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF(__pyx_v_theVar); __pyx_v_theVar = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":482 * # Phred-based qualities scores. * theVar = variants[0] * gofsThisPos = [] # <<<<<<<<<<<<<< * nNonRefCalls = 0 * */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(((PyObject *)__pyx_v_gofsThisPos)); __pyx_v_gofsThisPos = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":483 * theVar = variants[0] * gofsThisPos = [] * nNonRefCalls = 0 # <<<<<<<<<<<<<< * * for i from 0 <= i < nIndividuals: */ __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF(__pyx_v_nNonRefCalls); __pyx_v_nNonRefCalls = __pyx_int_0; /* "vcfutils.pyx":485 * nNonRefCalls = 0 * * for i from 0 <= i < nIndividuals: # <<<<<<<<<<<<<< * * theBuffer = readBuffers[i] */ __pyx_t_2 = __pyx_v_nIndividuals; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "vcfutils.pyx":487 * for i from 0 <= i < nIndividuals: * * theBuffer = readBuffers[i] # <<<<<<<<<<<<<< * thisSample = theBuffer.sample * */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_readBuffers), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theBuffer)); __pyx_v_theBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":488 * * theBuffer = readBuffers[i] * thisSample = theBuffer.sample # <<<<<<<<<<<<<< * * # Missing genotype call. Probably due to zero coverage for this individual. */ __pyx_t_3 = ((PyObject *)__pyx_v_theBuffer->sample); __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF(((PyObject *)__pyx_v_thisSample)); __pyx_v_thisSample = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":491 * * # Missing genotype call. Probably due to zero coverage for this individual. * if theBuffer.reads.windowEnd - theBuffer.reads.windowStart == 0: # <<<<<<<<<<<<<< * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[0,0,0], GQ=[0],GOF=[0],NR=[0], NV=[0]) * continue */ __pyx_t_10 = ((__pyx_v_theBuffer->reads->windowEnd - __pyx_v_theBuffer->reads->windowStart) == 0); if (__pyx_t_10) { /* "vcfutils.pyx":492 * # Missing genotype call. Probably due to zero coverage for this individual. * if theBuffer.reads.windowEnd - theBuffer.reads.windowStart == 0: * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[0,0,0], GQ=[0],GOF=[0],NR=[0], NV=[0]) # <<<<<<<<<<<<<< * continue * */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_11)); PyList_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_kp_s_11)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GT), ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_11, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_11, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GL), ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GQ), ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GOF), ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__NR), ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__NV), ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_v_thisSample), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":493 * if theBuffer.reads.windowEnd - theBuffer.reads.windowStart == 0: * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[0,0,0], GQ=[0],GOF=[0],NR=[0], NV=[0]) * continue # <<<<<<<<<<<<<< * * # Have genotype. Need to construct call string ("0/1" etc), and compute likelihoods */ goto __pyx_L33_continue; goto __pyx_L35; } /*else*/ { /* "vcfutils.pyx":499 * else: * #logger.info("nReads for sample %s = %s" %(thisSample, theBuffer.reads.windowEnd - theBuffer.reads.windowStart)) * (index1,index2,likelihoods,genotypePosterior,nonRefPosterior,refPosterior,gofValue) = computeGenotypeCallAndLikelihoods(POS, haplotypes, genotypes, i, haplotypeFrequencies, genotypeLikelihoods, gofValues, haplotypeIndexes, varThisPosInHap, variantsThisPos, haplotypeIsRefAtThisPos, nIndividuals, thisSample) # <<<<<<<<<<<<<< * * if not (index1 == 0 and index2 == 0): */ __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_v_POS); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyObject *)__pyx_f_8vcfutils_computeGenotypeCallAndLikelihoods(__pyx_t_7, __pyx_v_haplotypes, __pyx_v_genotypes, __pyx_v_i, __pyx_v_haplotypeFrequencies, __pyx_v_genotypeLikelihoods, __pyx_v_gofValues, __pyx_v_haplotypeIndexes, __pyx_v_varThisPosInHap, __pyx_v_variantsThisPos, __pyx_v_haplotypeIsRefAtThisPos, __pyx_v_nIndividuals, ((PyObject *)__pyx_v_thisSample))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (likely(PyTuple_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 7)) { if (size > 7) __Pyx_RaiseTooManyValuesError(7); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_17 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 4); __pyx_t_18 = PyTuple_GET_ITEM(sequence, 5); __pyx_t_19 = PyTuple_GET_ITEM(sequence, 6); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_19); #else Py_ssize_t i; PyObject** temps[7] = {&__pyx_t_11,&__pyx_t_6,&__pyx_t_9,&__pyx_t_17,&__pyx_t_12,&__pyx_t_18,&__pyx_t_19}; for (i=0; i < 7; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} *(temps[i]) = item; } #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; PyObject** temps[7] = {&__pyx_t_11,&__pyx_t_6,&__pyx_t_9,&__pyx_t_17,&__pyx_t_12,&__pyx_t_18,&__pyx_t_19}; __pyx_t_20 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_20)->tp_iternext; for (index=0; index < 7; index++) { PyObject* item = __pyx_t_16(__pyx_t_20); if (unlikely(!item)) goto __pyx_L36_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_20), 7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; goto __pyx_L37_unpacking_done; __pyx_L36_unpacking_failed:; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L37_unpacking_done:; } __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_11); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(PyList_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_9)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_17); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_18); if (unlikely((__pyx_t_24 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_t_19); if (unlikely((__pyx_t_25 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_v_index1 = __pyx_t_7; __pyx_v_index2 = __pyx_t_21; __Pyx_DECREF(((PyObject *)__pyx_v_likelihoods)); __pyx_v_likelihoods = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; __pyx_v_genotypePosterior = __pyx_t_22; __pyx_v_nonRefPosterior = __pyx_t_23; __pyx_v_refPosterior = __pyx_t_24; __pyx_v_gofValue = __pyx_t_25; /* "vcfutils.pyx":501 * (index1,index2,likelihoods,genotypePosterior,nonRefPosterior,refPosterior,gofValue) = computeGenotypeCallAndLikelihoods(POS, haplotypes, genotypes, i, haplotypeFrequencies, genotypeLikelihoods, gofValues, haplotypeIndexes, varThisPosInHap, variantsThisPos, haplotypeIsRefAtThisPos, nIndividuals, thisSample) * * if not (index1 == 0 and index2 == 0): # <<<<<<<<<<<<<< * gofsThisPos.append(gofValue) * nNonRefCalls += 1 */ __pyx_t_10 = (__pyx_v_index1 == 0); if (__pyx_t_10) { __pyx_t_26 = (__pyx_v_index2 == 0); __pyx_t_27 = __pyx_t_26; } else { __pyx_t_27 = __pyx_t_10; } __pyx_t_10 = (!__pyx_t_27); if (__pyx_t_10) { /* "vcfutils.pyx":502 * * if not (index1 == 0 and index2 == 0): * gofsThisPos.append(gofValue) # <<<<<<<<<<<<<< * nNonRefCalls += 1 * */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_gofValue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_28 = PyList_Append(__pyx_v_gofsThisPos, __pyx_t_3); if (unlikely(__pyx_t_28 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":503 * if not (index1 == 0 and index2 == 0): * gofsThisPos.append(gofValue) * nNonRefCalls += 1 # <<<<<<<<<<<<<< * * GT = [str(index1), "/", str(index2)] */ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_nNonRefCalls, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_nNonRefCalls); __pyx_v_nNonRefCalls = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L38; } __pyx_L38:; /* "vcfutils.pyx":505 * nNonRefCalls += 1 * * GT = [str(index1), "/", str(index2)] # <<<<<<<<<<<<<< * phredPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-genotypePosterior))))) * phredNonRefPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-nonRefPosterior))))) */ __pyx_t_3 = PyInt_FromLong(__pyx_v_index1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyInt_FromLong(__pyx_v_index2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyList_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_kp_s_11)); PyList_SET_ITEM(__pyx_t_18, 1, ((PyObject *)__pyx_kp_s_11)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11)); PyList_SET_ITEM(__pyx_t_18, 2, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_3 = 0; __pyx_t_19 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_GT)); __pyx_v_GT = __pyx_t_18; __pyx_t_18 = 0; /* "vcfutils.pyx":506 * * GT = [str(index1), "/", str(index2)] * phredPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-genotypePosterior))))) # <<<<<<<<<<<<<< * phredNonRefPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-nonRefPosterior))))) * phredRefPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-refPosterior))))) */ __pyx_t_25 = (1.0 - __pyx_v_genotypePosterior); __pyx_t_24 = 1e-10; if ((__pyx_t_25 > __pyx_t_24)) { __pyx_t_23 = __pyx_t_25; } else { __pyx_t_23 = __pyx_t_24; } __pyx_t_18 = PyFloat_FromDouble((-10.0 * log10(__pyx_t_23))); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_29 = 99; __pyx_t_3 = PyInt_FromLong(__pyx_t_29); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = PyObject_RichCompare(__pyx_t_18, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_10) { __Pyx_INCREF(__pyx_t_18); __pyx_t_19 = __pyx_t_18; } else { __pyx_t_12 = PyInt_FromLong(__pyx_t_29); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_19 = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_v_phredPosterior); __pyx_v_phredPosterior = __pyx_t_19; __pyx_t_19 = 0; /* "vcfutils.pyx":507 * GT = [str(index1), "/", str(index2)] * phredPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-genotypePosterior))))) * phredNonRefPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-nonRefPosterior))))) # <<<<<<<<<<<<<< * phredRefPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-refPosterior))))) * */ __pyx_t_23 = (1.0 - __pyx_v_nonRefPosterior); __pyx_t_25 = 1e-10; if ((__pyx_t_23 > __pyx_t_25)) { __pyx_t_24 = __pyx_t_23; } else { __pyx_t_24 = __pyx_t_25; } __pyx_t_19 = PyFloat_FromDouble((-10.0 * log10(__pyx_t_24))); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_29 = 99; __pyx_t_12 = PyInt_FromLong(__pyx_t_29); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = PyObject_RichCompare(__pyx_t_19, __pyx_t_12, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_10) { __Pyx_INCREF(__pyx_t_19); __pyx_t_18 = __pyx_t_19; } else { __pyx_t_3 = PyInt_FromLong(__pyx_t_29); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_18 = __pyx_t_3; __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_v_phredNonRefPosterior); __pyx_v_phredNonRefPosterior = __pyx_t_18; __pyx_t_18 = 0; /* "vcfutils.pyx":508 * phredPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-genotypePosterior))))) * phredNonRefPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-nonRefPosterior))))) * phredRefPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-refPosterior))))) # <<<<<<<<<<<<<< * * if options.verbosity >= 3: */ __pyx_t_24 = (1.0 - __pyx_v_refPosterior); __pyx_t_23 = 1e-10; if ((__pyx_t_24 > __pyx_t_23)) { __pyx_t_25 = __pyx_t_24; } else { __pyx_t_25 = __pyx_t_23; } __pyx_t_18 = PyFloat_FromDouble((-10.0 * log10(__pyx_t_25))); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_29 = 99; __pyx_t_3 = PyInt_FromLong(__pyx_t_29); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = PyObject_RichCompare(__pyx_t_18, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_10) { __Pyx_INCREF(__pyx_t_18); __pyx_t_19 = __pyx_t_18; } else { __pyx_t_12 = PyInt_FromLong(__pyx_t_29); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_19 = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_v_phredRefPosterior); __pyx_v_phredRefPosterior = __pyx_t_19; __pyx_t_19 = 0; /* "vcfutils.pyx":510 * phredRefPosterior = int(min(99, round(-10.0*log10(max(1e-10, 1.0-refPosterior))))) * * if options.verbosity >= 3: # <<<<<<<<<<<<<< * logger.debug("Sample %s has genotype posterior = %s. non-ref posterior = %s. Ref posterior = %s." %(thisSample,phredPosterior, phredNonRefPosterior, phredRefPosterior)) * */ __pyx_t_19 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = PyObject_RichCompare(__pyx_t_19, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_10) { /* "vcfutils.pyx":511 * * if options.verbosity >= 3: * logger.debug("Sample %s has genotype posterior = %s. non-ref posterior = %s. Ref posterior = %s." %(thisSample,phredPosterior, phredNonRefPosterior, phredRefPosterior)) # <<<<<<<<<<<<<< * * # Don't make a call if the non-ref posterior is too low */ __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__debug); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(((PyObject *)__pyx_v_thisSample)); PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_v_thisSample)); __Pyx_GIVEREF(((PyObject *)__pyx_v_thisSample)); __Pyx_INCREF(__pyx_v_phredPosterior); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_v_phredPosterior); __Pyx_GIVEREF(__pyx_v_phredPosterior); __Pyx_INCREF(__pyx_v_phredNonRefPosterior); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_v_phredNonRefPosterior); __Pyx_GIVEREF(__pyx_v_phredNonRefPosterior); __Pyx_INCREF(__pyx_v_phredRefPosterior); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_v_phredRefPosterior); __Pyx_GIVEREF(__pyx_v_phredRefPosterior); __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_t_12)); __Pyx_GIVEREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L39; } __pyx_L39:; /* "vcfutils.pyx":514 * * # Don't make a call if the non-ref posterior is too low * if nVariants == 1 and phredNonRefPosterior < options.minPosterior and phredRefPosterior < options.minPosterior: # <<<<<<<<<<<<<< * GT = [".", "/", "."] * maxLikelihood = max(likelihoods) */ __pyx_t_10 = (__pyx_v_nVariants == 1); if (__pyx_t_10) { __pyx_t_12 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minPosterior); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_18 = PyObject_RichCompare(__pyx_v_phredNonRefPosterior, __pyx_t_12, Py_LT); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_27) { __pyx_t_18 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minPosterior); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_12 = PyObject_RichCompare(__pyx_v_phredRefPosterior, __pyx_t_18, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_26 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_30 = __pyx_t_26; } else { __pyx_t_30 = __pyx_t_27; } __pyx_t_27 = __pyx_t_30; } else { __pyx_t_27 = __pyx_t_10; } if (__pyx_t_27) { /* "vcfutils.pyx":515 * # Don't make a call if the non-ref posterior is too low * if nVariants == 1 and phredNonRefPosterior < options.minPosterior and phredRefPosterior < options.minPosterior: * GT = [".", "/", "."] # <<<<<<<<<<<<<< * maxLikelihood = max(likelihoods) * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] */ __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyList_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_11)); PyList_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_kp_s_11)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyList_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_DECREF(((PyObject *)__pyx_v_GT)); __pyx_v_GT = __pyx_t_12; __pyx_t_12 = 0; /* "vcfutils.pyx":516 * if nVariants == 1 and phredNonRefPosterior < options.minPosterior and phredRefPosterior < options.minPosterior: * GT = [".", "/", "."] * maxLikelihood = max(likelihoods) # <<<<<<<<<<<<<< * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] * */ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_likelihoods)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_likelihoods)); __Pyx_GIVEREF(((PyObject *)__pyx_v_likelihoods)); __pyx_t_18 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_t_18); if (unlikely((__pyx_t_25 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_v_maxLikelihood = __pyx_t_25; /* "vcfutils.pyx":517 * GT = [".", "/", "."] * maxLikelihood = max(likelihoods) * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] # <<<<<<<<<<<<<< * * elif nVariants == 1 and phredNonRefPosterior < options.minPosterior: */ __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (unlikely(((PyObject *)__pyx_v_likelihoods) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = ((PyObject *)__pyx_v_likelihoods); __Pyx_INCREF(__pyx_t_12); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_12)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_19 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_5); __Pyx_INCREF(__pyx_t_19); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_19 = PySequence_ITEM(__pyx_t_12, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_x); __pyx_v_x = __pyx_t_19; __pyx_t_19 = 0; __pyx_t_25 = 1e-300; __pyx_t_19 = PyFloat_FromDouble(__pyx_v_maxLikelihood); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_x, __pyx_t_19); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_17 = PyFloat_FromDouble(__pyx_t_25); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_9 = PyObject_RichCompare(__pyx_t_17, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_27) { __pyx_t_9 = PyFloat_FromDouble(__pyx_t_25); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_19 = __pyx_t_9; __pyx_t_9 = 0; } else { __Pyx_INCREF(__pyx_t_3); __pyx_t_19 = __pyx_t_3; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_t_19); if (unlikely((__pyx_t_25 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyFloat_FromDouble(log10(__pyx_t_25)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (unlikely(__Pyx_PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_19))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = ((PyObject *)__pyx_t_18); __Pyx_INCREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_normalisedGLs)); __pyx_v_normalisedGLs = ((PyObject*)__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L40; } /* "vcfutils.pyx":519 * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] * * elif nVariants == 1 and phredNonRefPosterior < options.minPosterior: # <<<<<<<<<<<<<< * GT = ["0", "/", "0"] * maxLikelihood = max(likelihoods) */ __pyx_t_27 = (__pyx_v_nVariants == 1); if (__pyx_t_27) { __pyx_t_12 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minPosterior); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_18 = PyObject_RichCompare(__pyx_v_phredNonRefPosterior, __pyx_t_12, Py_LT); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_30 = __pyx_t_10; } else { __pyx_t_30 = __pyx_t_27; } if (__pyx_t_30) { /* "vcfutils.pyx":520 * * elif nVariants == 1 and phredNonRefPosterior < options.minPosterior: * GT = ["0", "/", "0"] # <<<<<<<<<<<<<< * maxLikelihood = max(likelihoods) * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] */ __pyx_t_18 = PyList_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(((PyObject *)__pyx_kp_s__0)); PyList_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_kp_s__0)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__0)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_11)); PyList_SET_ITEM(__pyx_t_18, 1, ((PyObject *)__pyx_kp_s_11)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11)); __Pyx_INCREF(((PyObject *)__pyx_kp_s__0)); PyList_SET_ITEM(__pyx_t_18, 2, ((PyObject *)__pyx_kp_s__0)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__0)); __Pyx_DECREF(((PyObject *)__pyx_v_GT)); __pyx_v_GT = __pyx_t_18; __pyx_t_18 = 0; /* "vcfutils.pyx":521 * elif nVariants == 1 and phredNonRefPosterior < options.minPosterior: * GT = ["0", "/", "0"] * maxLikelihood = max(likelihoods) # <<<<<<<<<<<<<< * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] * */ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(((PyObject *)__pyx_v_likelihoods)); PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_v_likelihoods)); __Pyx_GIVEREF(((PyObject *)__pyx_v_likelihoods)); __pyx_t_12 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_25 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_maxLikelihood = __pyx_t_25; /* "vcfutils.pyx":522 * GT = ["0", "/", "0"] * maxLikelihood = max(likelihoods) * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] # <<<<<<<<<<<<<< * * # Only normalise for sites which are not mult-allelic */ __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (unlikely(((PyObject *)__pyx_v_likelihoods) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = ((PyObject *)__pyx_v_likelihoods); __Pyx_INCREF(__pyx_t_18); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_19 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_19); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_19 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_x); __pyx_v_x = __pyx_t_19; __pyx_t_19 = 0; __pyx_t_25 = 1e-300; __pyx_t_19 = PyFloat_FromDouble(__pyx_v_maxLikelihood); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_x, __pyx_t_19); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_t_25); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_17 = PyObject_RichCompare(__pyx_t_9, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_30) { __pyx_t_17 = PyFloat_FromDouble(__pyx_t_25); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_19 = __pyx_t_17; __pyx_t_17 = 0; } else { __Pyx_INCREF(__pyx_t_3); __pyx_t_19 = __pyx_t_3; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_t_19); if (unlikely((__pyx_t_25 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyFloat_FromDouble(log10(__pyx_t_25)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (unlikely(__Pyx_PyList_Append(__pyx_t_12, (PyObject*)__pyx_t_19))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = ((PyObject *)__pyx_t_12); __Pyx_INCREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_normalisedGLs)); __pyx_v_normalisedGLs = ((PyObject*)__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L40; } /* "vcfutils.pyx":525 * * # Only normalise for sites which are not mult-allelic * elif nVariants == 1: # <<<<<<<<<<<<<< * maxLikelihood = max(likelihoods) * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] */ __pyx_t_30 = (__pyx_v_nVariants == 1); if (__pyx_t_30) { /* "vcfutils.pyx":526 * # Only normalise for sites which are not mult-allelic * elif nVariants == 1: * maxLikelihood = max(likelihoods) # <<<<<<<<<<<<<< * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] * */ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(((PyObject *)__pyx_v_likelihoods)); PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_v_likelihoods)); __Pyx_GIVEREF(((PyObject *)__pyx_v_likelihoods)); __pyx_t_12 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_25 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_maxLikelihood = __pyx_t_25; /* "vcfutils.pyx":527 * elif nVariants == 1: * maxLikelihood = max(likelihoods) * normalisedGLs = [round(log10(max(x / maxLikelihood, 1e-300)),2) for x in likelihoods] # <<<<<<<<<<<<<< * * else: */ __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (unlikely(((PyObject *)__pyx_v_likelihoods) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = ((PyObject *)__pyx_v_likelihoods); __Pyx_INCREF(__pyx_t_18); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_19 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_19); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_19 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_x); __pyx_v_x = __pyx_t_19; __pyx_t_19 = 0; __pyx_t_25 = 1e-300; __pyx_t_19 = PyFloat_FromDouble(__pyx_v_maxLikelihood); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_x, __pyx_t_19); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_17 = PyFloat_FromDouble(__pyx_t_25); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_9 = PyObject_RichCompare(__pyx_t_17, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_30) { __pyx_t_9 = PyFloat_FromDouble(__pyx_t_25); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_19 = __pyx_t_9; __pyx_t_9 = 0; } else { __Pyx_INCREF(__pyx_t_3); __pyx_t_19 = __pyx_t_3; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_t_19); if (unlikely((__pyx_t_25 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyFloat_FromDouble(log10(__pyx_t_25)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (unlikely(__Pyx_PyList_Append(__pyx_t_12, (PyObject*)__pyx_t_19))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = ((PyObject *)__pyx_t_12); __Pyx_INCREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_normalisedGLs)); __pyx_v_normalisedGLs = ((PyObject*)__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L40; } /*else*/ { /* "vcfutils.pyx":531 * else: * # Multi-allelic site. Don't compute likelihoods here. * normalisedGLs = [-1,-1,-1] # <<<<<<<<<<<<<< * * readsPerSample = [vcfInfo[v]['nReadsPerSample'][i] for v in variants] */ __pyx_t_18 = PyList_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_18, 1, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_18, 2, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_XDECREF(((PyObject *)__pyx_v_normalisedGLs)); __pyx_v_normalisedGLs = __pyx_t_18; __pyx_t_18 = 0; } __pyx_L40:; /* "vcfutils.pyx":533 * normalisedGLs = [-1,-1,-1] * * readsPerSample = [vcfInfo[v]['nReadsPerSample'][i] for v in variants] # <<<<<<<<<<<<<< * varReadsPerSample = [vcfInfo[v]['nVarReadsPerSample'][i] for v in variants] * */ __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_12); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_12)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_19 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_5); __Pyx_INCREF(__pyx_t_19); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_19 = PySequence_ITEM(__pyx_t_12, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_v); __pyx_v_v = __pyx_t_19; __pyx_t_19 = 0; if (unlikely(((PyObject *)__pyx_v_vcfInfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfInfo), __pyx_v_v); if (!__pyx_t_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = PyObject_GetItem(__pyx_t_19, ((PyObject *)__pyx_n_s__nReadsPerSample)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__Pyx_PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_19))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = ((PyObject *)__pyx_t_18); __Pyx_INCREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_readsPerSample)); __pyx_v_readsPerSample = ((PyObject*)__pyx_t_12); __pyx_t_12 = 0; /* "vcfutils.pyx":534 * * readsPerSample = [vcfInfo[v]['nReadsPerSample'][i] for v in variants] * varReadsPerSample = [vcfInfo[v]['nVarReadsPerSample'][i] for v in variants] # <<<<<<<<<<<<<< * * #vcfDataLine[thisSample] = dict(GT=[GT], GL=normalisedGLs, GQ=[phredPosterior], GOF=[min(99,int(0.5 + -10.0*log10(max(1e-10, 1.0 - round(gofValue,2)))))],NR=readsPerSample, NV=varReadsPerSample) */ __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_18); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_19 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_19); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_19 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_v); __pyx_v_v = __pyx_t_19; __pyx_t_19 = 0; if (unlikely(((PyObject *)__pyx_v_vcfInfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfInfo), __pyx_v_v); if (!__pyx_t_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = PyObject_GetItem(__pyx_t_19, ((PyObject *)__pyx_n_s__nVarReadsPerSample)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__Pyx_PyList_Append(__pyx_t_12, (PyObject*)__pyx_t_19))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = ((PyObject *)__pyx_t_12); __Pyx_INCREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_varReadsPerSample)); __pyx_v_varReadsPerSample = ((PyObject*)__pyx_t_18); __pyx_t_18 = 0; /* "vcfutils.pyx":539 * * # Actual nReads covering variant locus * if nVariants == 1 and readsPerSample[0] < options.minReads: # <<<<<<<<<<<<<< * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=normalisedGLs, GQ=[phredPosterior],GOF=[int(gofValue)],NR=readsPerSample, NV=varReadsPerSample) * else: */ __pyx_t_30 = (__pyx_v_nVariants == 1); if (__pyx_t_30) { __pyx_t_18 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minReads); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_12 = PyObject_RichCompare(PyList_GET_ITEM(__pyx_v_readsPerSample, 0), __pyx_t_18, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __pyx_t_27; } else { __pyx_t_10 = __pyx_t_30; } if (__pyx_t_10) { /* "vcfutils.pyx":540 * # Actual nReads covering variant locus * if nVariants == 1 and readsPerSample[0] < options.minReads: * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=normalisedGLs, GQ=[phredPosterior],GOF=[int(gofValue)],NR=readsPerSample, NV=varReadsPerSample) # <<<<<<<<<<<<<< * else: * vcfDataLine[thisSample] = dict(GT=[GT], GL=normalisedGLs, GQ=[phredPosterior], GOF=[int(gofValue)],NR=readsPerSample, NV=varReadsPerSample) */ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_18 = PyList_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyList_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_11)); PyList_SET_ITEM(__pyx_t_18, 1, ((PyObject *)__pyx_kp_s_11)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyList_SET_ITEM(__pyx_t_18, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __pyx_t_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyList_SET_ITEM(__pyx_t_19, 0, ((PyObject *)__pyx_t_18)); __Pyx_GIVEREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__GT), ((PyObject *)__pyx_t_19)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__GL), ((PyObject *)__pyx_v_normalisedGLs)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(__pyx_v_phredPosterior); PyList_SET_ITEM(__pyx_t_19, 0, __pyx_v_phredPosterior); __Pyx_GIVEREF(__pyx_v_phredPosterior); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__GQ), ((PyObject *)__pyx_t_19)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyFloat_FromDouble(__pyx_v_gofValue); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); __pyx_t_19 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__GOF), ((PyObject *)__pyx_t_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__NR), ((PyObject *)__pyx_v_readsPerSample)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__NV), ((PyObject *)__pyx_v_varReadsPerSample)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_v_thisSample), ((PyObject *)__pyx_t_12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; goto __pyx_L51; } /*else*/ { /* "vcfutils.pyx":542 * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=normalisedGLs, GQ=[phredPosterior],GOF=[int(gofValue)],NR=readsPerSample, NV=varReadsPerSample) * else: * vcfDataLine[thisSample] = dict(GT=[GT], GL=normalisedGLs, GQ=[phredPosterior], GOF=[int(gofValue)],NR=readsPerSample, NV=varReadsPerSample) # <<<<<<<<<<<<<< * * if gofValue > maxGofValue: */ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(((PyObject *)__pyx_v_GT)); PyList_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_v_GT)); __Pyx_GIVEREF(((PyObject *)__pyx_v_GT)); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__GT), ((PyObject *)__pyx_t_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__GL), ((PyObject *)__pyx_v_normalisedGLs)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_phredPosterior); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_v_phredPosterior); __Pyx_GIVEREF(__pyx_v_phredPosterior); if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__GQ), ((PyObject *)__pyx_t_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyFloat_FromDouble(__pyx_v_gofValue); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyList_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__GOF), ((PyObject *)__pyx_t_19)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__NR), ((PyObject *)__pyx_v_readsPerSample)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__NV), ((PyObject *)__pyx_v_varReadsPerSample)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_v_thisSample), ((PyObject *)__pyx_t_12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; } __pyx_L51:; /* "vcfutils.pyx":544 * vcfDataLine[thisSample] = dict(GT=[GT], GL=normalisedGLs, GQ=[phredPosterior], GOF=[int(gofValue)],NR=readsPerSample, NV=varReadsPerSample) * * if gofValue > maxGofValue: # <<<<<<<<<<<<<< * maxGofValue = gofValue * */ __pyx_t_10 = (__pyx_v_gofValue > __pyx_v_maxGofValue); if (__pyx_t_10) { /* "vcfutils.pyx":545 * * if gofValue > maxGofValue: * maxGofValue = gofValue # <<<<<<<<<<<<<< * * if gofValue < minGofValue: */ __pyx_v_maxGofValue = __pyx_v_gofValue; goto __pyx_L52; } __pyx_L52:; /* "vcfutils.pyx":547 * maxGofValue = gofValue * * if gofValue < minGofValue: # <<<<<<<<<<<<<< * minGofValue = gofValue * */ __pyx_t_10 = (__pyx_v_gofValue < __pyx_v_minGofValue); if (__pyx_t_10) { /* "vcfutils.pyx":548 * * if gofValue < minGofValue: * minGofValue = gofValue # <<<<<<<<<<<<<< * * # These are just temporary values. Don't output them */ __pyx_v_minGofValue = __pyx_v_gofValue; goto __pyx_L53; } __pyx_L53:; } __pyx_L35:; __pyx_L33_continue:; } /* "vcfutils.pyx":551 * * # These are just temporary values. Don't output them * vcfDataLine['info'].pop('nReadsPerSample') # <<<<<<<<<<<<<< * vcfDataLine['info'].pop('nVarReadsPerSample') * vcfDataLine['info'].pop('ABPV') */ __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_n_s__info)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_19 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__pop); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "vcfutils.pyx":552 * # These are just temporary values. Don't output them * vcfDataLine['info'].pop('nReadsPerSample') * vcfDataLine['info'].pop('nVarReadsPerSample') # <<<<<<<<<<<<<< * vcfDataLine['info'].pop('ABPV') * vcfDataLine['info']['MGOF'] = [int(round(maxGofValue, 2))] */ __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_n_s__info)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_19 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__pop); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "vcfutils.pyx":553 * vcfDataLine['info'].pop('nReadsPerSample') * vcfDataLine['info'].pop('nVarReadsPerSample') * vcfDataLine['info'].pop('ABPV') # <<<<<<<<<<<<<< * vcfDataLine['info']['MGOF'] = [int(round(maxGofValue, 2))] * */ __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_n_s__info)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_19 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__pop); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "vcfutils.pyx":554 * vcfDataLine['info'].pop('nVarReadsPerSample') * vcfDataLine['info'].pop('ABPV') * vcfDataLine['info']['MGOF'] = [int(round(maxGofValue, 2))] # <<<<<<<<<<<<<< * * gofsThisPos.sort() */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_maxGofValue); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; __pyx_t_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyList_SET_ITEM(__pyx_t_19, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_n_s__info)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyObject_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__MGOF), ((PyObject *)__pyx_t_19)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0; /* "vcfutils.pyx":556 * vcfDataLine['info']['MGOF'] = [int(round(maxGofValue, 2))] * * gofsThisPos.sort() # <<<<<<<<<<<<<< * * #if minGofValue > gofThreshold: */ __pyx_t_28 = PyList_Sort(((PyObject *)__pyx_v_gofsThisPos)); if (unlikely(__pyx_t_28 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":559 * * #if minGofValue > gofThreshold: * if len(gofsThisPos) > 0 and gofsThisPos[ len(gofsThisPos) // 2 ] > gofThreshold: # <<<<<<<<<<<<<< * vcfDataLine['filter'].append("GOF") * */ __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_v_gofsThisPos)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_5 > 0); if (__pyx_t_10) { __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_v_gofsThisPos)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = (__pyx_t_5 / 2); __pyx_t_19 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_gofsThisPos), __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_12 = PyInt_FromLong(__pyx_v_gofThreshold); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_18 = PyObject_RichCompare(__pyx_t_19, __pyx_t_12, Py_GT); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_27 = __pyx_t_30; } else { __pyx_t_27 = __pyx_t_10; } if (__pyx_t_27) { /* "vcfutils.pyx":560 * #if minGofValue > gofThreshold: * if len(gofsThisPos) > 0 and gofsThisPos[ len(gofsThisPos) // 2 ] > gofThreshold: * vcfDataLine['filter'].append("GOF") # <<<<<<<<<<<<<< * * #vcfDataLine['info'].pop('SBPV') */ __pyx_t_18 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_n_s__filter)); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_18, ((PyObject *)__pyx_n_s__GOF)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L54; } __pyx_L54:; /* "vcfutils.pyx":565 * * # Write variant call info to VCF file. * if nNonRefCalls > 0 or options.minPosterior == 0 or options.outputRefCalls == 1: # <<<<<<<<<<<<<< * * # Slight hack. We pad variant alleles to the left with reference sequence, when */ __pyx_t_12 = PyObject_RichCompare(__pyx_v_nNonRefCalls, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!__pyx_t_27) { __pyx_t_12 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minPosterior); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_18 = PyObject_RichCompare(__pyx_t_12, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (!__pyx_t_10) { __pyx_t_18 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__outputRefCalls); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_12 = PyObject_RichCompare(__pyx_t_18, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_26 = __pyx_t_30; } else { __pyx_t_26 = __pyx_t_10; } __pyx_t_10 = __pyx_t_26; } else { __pyx_t_10 = __pyx_t_27; } if (__pyx_t_10) { /* "vcfutils.pyx":572 * # we may, by now, have filtered all the overlapping variants, and so the padded variants which are * # left should be un-padded. * trimLeftPadding(vcfDataLine) # <<<<<<<<<<<<<< * outputSingleLineOfVCF(vcfDataLine, outputFile, vcfFile, options) * */ __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__trimLeftPadding); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(((PyObject *)__pyx_v_vcfDataLine)); PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_v_vcfDataLine)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vcfDataLine)); __pyx_t_19 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; /* "vcfutils.pyx":573 * # left should be un-padded. * trimLeftPadding(vcfDataLine) * outputSingleLineOfVCF(vcfDataLine, outputFile, vcfFile, options) # <<<<<<<<<<<<<< * * # Free memory. (TODO: move this somewhere else). */ __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s_16); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(((PyObject *)__pyx_v_vcfDataLine)); PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_v_vcfDataLine)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vcfDataLine)); __Pyx_INCREF(__pyx_v_outputFile); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_v_outputFile); __Pyx_GIVEREF(__pyx_v_outputFile); __Pyx_INCREF(__pyx_v_vcfFile); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_v_vcfFile); __Pyx_GIVEREF(__pyx_v_vcfFile); __Pyx_INCREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); __pyx_t_12 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L55; } __pyx_L55:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":576 * * # Free memory. (TODO: move this somewhere else). * for hapIndex in range(len(haplotypes)): # <<<<<<<<<<<<<< * free(varThisPosInHap[hapIndex]) * */ if (unlikely(((PyObject *)__pyx_v_haplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_haplotypes)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_4; __pyx_t_2+=1) { __pyx_v_hapIndex = __pyx_t_2; /* "vcfutils.pyx":577 * # Free memory. (TODO: move this somewhere else). * for hapIndex in range(len(haplotypes)): * free(varThisPosInHap[hapIndex]) # <<<<<<<<<<<<<< * * free(varThisPosInHap) */ free((__pyx_v_varThisPosInHap[__pyx_v_hapIndex])); } /* "vcfutils.pyx":579 * free(varThisPosInHap[hapIndex]) * * free(varThisPosInHap) # <<<<<<<<<<<<<< * free(haplotypeIsRefAtThisPos) * */ free(__pyx_v_varThisPosInHap); /* "vcfutils.pyx":580 * * free(varThisPosInHap) * free(haplotypeIsRefAtThisPos) # <<<<<<<<<<<<<< * * ################################################################################################### */ free(__pyx_v_haplotypeIsRefAtThisPos); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_WriteUnraisable("vcfutils.outputCallToVCF", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_haplotype); __Pyx_XDECREF((PyObject *)__pyx_v_theBuffer); __Pyx_XDECREF(__pyx_v_info); __Pyx_XDECREF(__pyx_v_lineinfo); __Pyx_XDECREF(__pyx_v_normalisedGLs); __Pyx_XDECREF(__pyx_v_FR); __Pyx_XDECREF(__pyx_v_PP); __Pyx_XDECREF(__pyx_v_NF); __Pyx_XDECREF(__pyx_v_NR); __Pyx_XDECREF(__pyx_v_TR); __Pyx_XDECREF(__pyx_v_GT); __Pyx_XDECREF(__pyx_v_linefilter); __Pyx_XDECREF(__pyx_v_thisSample); __Pyx_XDECREF(__pyx_v_sortedPositions); __Pyx_XDECREF(__pyx_v_variants); __Pyx_XDECREF(__pyx_v_likelihoods); __Pyx_XDECREF(__pyx_v_variantsThisPos); __Pyx_XDECREF(__pyx_v_POS); __Pyx_XDECREF(__pyx_v_variant); __Pyx_XDECREF(__pyx_v_chrom); __Pyx_XDECREF(__pyx_v_ref); __Pyx_XDECREF(__pyx_v_alt); __Pyx_XDECREF(__pyx_v_theId); __Pyx_XDECREF(__pyx_v_qual); __Pyx_XDECREF(__pyx_v_format); __Pyx_XDECREF(__pyx_v_var); __Pyx_XDECREF(__pyx_v_freq); __Pyx_XDECREF(__pyx_v_posterior); __Pyx_XDECREF(__pyx_v_varTR); __Pyx_XDECREF(__pyx_v_varNF); __Pyx_XDECREF(__pyx_v_varNR); __Pyx_XDECREF(__pyx_v_vcfDataLine); __Pyx_XDECREF(__pyx_v_theVar); __Pyx_XDECREF(__pyx_v_gofsThisPos); __Pyx_XDECREF(__pyx_v_nNonRefCalls); __Pyx_XDECREF(__pyx_v_phredPosterior); __Pyx_XDECREF(__pyx_v_phredNonRefPosterior); __Pyx_XDECREF(__pyx_v_phredRefPosterior); __Pyx_XDECREF(__pyx_v_readsPerSample); __Pyx_XDECREF(__pyx_v_varReadsPerSample); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_f); __Pyx_XDECREF(__pyx_v_pp); __Pyx_XDECREF(__pyx_v_x); __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_8vcfutils_3trimLeftPadding(PyObject *__pyx_self, PyObject *__pyx_v_vcfDataLine); /*proto*/ static char __pyx_doc_8vcfutils_2trimLeftPadding[] = "\n This is a small hack to make sure that no un-needed left padding is left\n in the VCF output.\n "; static PyMethodDef __pyx_mdef_8vcfutils_3trimLeftPadding = {__Pyx_NAMESTR("trimLeftPadding"), (PyCFunction)__pyx_pw_8vcfutils_3trimLeftPadding, METH_O, __Pyx_DOCSTR(__pyx_doc_8vcfutils_2trimLeftPadding)}; static PyObject *__pyx_pw_8vcfutils_3trimLeftPadding(PyObject *__pyx_self, PyObject *__pyx_v_vcfDataLine) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("trimLeftPadding (wrapper)", 0); __pyx_r = __pyx_pf_8vcfutils_2trimLeftPadding(__pyx_self, ((PyObject *)__pyx_v_vcfDataLine)); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_8vcfutils_15trimLeftPadding_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "vcfutils.pyx":598 * else: * for i in range(1,min(len(ref),min(map(len,alt)))): * if len(set(allele[0].upper() for allele in alt)) > 1 or ref[0].upper() != alt[0][0].upper(): # <<<<<<<<<<<<<< * break * # ?? */ static PyObject *__pyx_pf_8vcfutils_15trimLeftPadding_genexpr(PyObject *__pyx_self) { struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *)__pyx_ptype_8vcfutils___pyx_scope_struct_1_genexpr->tp_new(__pyx_ptype_8vcfutils___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_8vcfutils_15trimLeftPadding_2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("vcfutils.trimLeftPadding.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_8vcfutils_15trimLeftPadding_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt)) { __Pyx_RaiseClosureNameError("alt"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_allele); __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_allele); __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_allele = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__upper); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Generator_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return NULL; } /* "vcfutils.pyx":584 * ################################################################################################### * * def trimLeftPadding(vcfDataLine): # <<<<<<<<<<<<<< * """ * This is a small hack to make sure that no un-needed left padding is left */ static PyObject *__pyx_pf_8vcfutils_2trimLeftPadding(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vcfDataLine) { struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *__pyx_cur_scope; PyObject *__pyx_v_ref = NULL; CYTHON_UNUSED PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_allele = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trimLeftPadding", 0); __pyx_cur_scope = (struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *)__pyx_ptype_8vcfutils___pyx_scope_struct__trimLeftPadding->tp_new(__pyx_ptype_8vcfutils___pyx_scope_struct__trimLeftPadding, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); /* "vcfutils.pyx":589 * in the VCF output. * """ * ref = vcfDataLine['ref'] # <<<<<<<<<<<<<< * alt = vcfDataLine['alt'] * */ __pyx_t_1 = PyObject_GetItem(__pyx_v_vcfDataLine, ((PyObject *)__pyx_n_s__ref)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_ref = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":590 * """ * ref = vcfDataLine['ref'] * alt = vcfDataLine['alt'] # <<<<<<<<<<<<<< * * #logger.info("ref = %s. alt = %s. pos = %s" %(ref, alt, vcfDataLine['pos'])) */ __pyx_t_1 = PyObject_GetItem(__pyx_v_vcfDataLine, ((PyObject *)__pyx_n_s__alt)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_alt = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":594 * #logger.info("ref = %s. alt = %s. pos = %s" %(ref, alt, vcfDataLine['pos'])) * * if alt == []: # <<<<<<<<<<<<<< * pass * else: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_alt, ((PyObject *)__pyx_t_1), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { goto __pyx_L3; } /*else*/ { /* "vcfutils.pyx":597 * pass * else: * for i in range(1,min(len(ref),min(map(len,alt)))): # <<<<<<<<<<<<<< * if len(set(allele[0].upper() for allele in alt)) > 1 or ref[0].upper() != alt[0][0].upper(): * break */ __pyx_t_2 = __Pyx_GetName(__pyx_b, __pyx_n_s__len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_alt); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_alt); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alt); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; } else { __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_7 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_1)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF(__pyx_v_i); __pyx_v_i = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":598 * else: * for i in range(1,min(len(ref),min(map(len,alt)))): * if len(set(allele[0].upper() for allele in alt)) > 1 or ref[0].upper() != alt[0][0].upper(): # <<<<<<<<<<<<<< * break * # ?? */ __pyx_t_1 = __pyx_pf_8vcfutils_15trimLeftPadding_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_8 = PySet_Size(__pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_8 > 1); if (!__pyx_t_3) { __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__upper); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_alt, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__upper); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_3; } if (__pyx_t_10) { /* "vcfutils.pyx":599 * for i in range(1,min(len(ref),min(map(len,alt)))): * if len(set(allele[0].upper() for allele in alt)) > 1 or ref[0].upper() != alt[0][0].upper(): * break # <<<<<<<<<<<<<< * # ?? * elif max([abs(len(ref) - len(allele)) for allele in alt]) > 0 and ref[1] != alt[0][1]: */ goto __pyx_L5_break; goto __pyx_L6; } /* "vcfutils.pyx":601 * break * # ?? * elif max([abs(len(ref) - len(allele)) for allele in alt]) > 0 and ref[1] != alt[0][1]: # <<<<<<<<<<<<<< * break * */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) { __pyx_t_5 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; __pyx_t_11 = NULL; } else { __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; } for (;;) { if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_5)) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_5)) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_1)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF(__pyx_v_allele); __pyx_v_allele = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_12 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_12 - __pyx_t_13)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_PyList_Append(__pyx_t_6, (PyObject*)__pyx_t_14))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_t_6)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_10) { __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_ref, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_alt, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_6, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_14, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = __pyx_t_3; } else { __pyx_t_9 = __pyx_t_10; } if (__pyx_t_9) { /* "vcfutils.pyx":602 * # ?? * elif max([abs(len(ref) - len(allele)) for allele in alt]) > 0 and ref[1] != alt[0][1]: * break # <<<<<<<<<<<<<< * * ref, alt = ref[1:], [allele[1:] for allele in alt] */ goto __pyx_L5_break; goto __pyx_L6; } __pyx_L6:; /* "vcfutils.pyx":604 * break * * ref, alt = ref[1:], [allele[1:] for allele in alt] # <<<<<<<<<<<<<< * vcfDataLine['pos'] += 1 * */ __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) { __pyx_t_5 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; __pyx_t_11 = NULL; } else { __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; } for (;;) { if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_5)) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_5)) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_1)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF(__pyx_v_allele); __pyx_v_allele = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__Pyx_PyList_Append(__pyx_t_14, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = ((PyObject *)__pyx_t_14); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_v_ref); __pyx_v_ref = __pyx_t_6; __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt); __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_alt = __pyx_t_5; __pyx_t_5 = 0; /* "vcfutils.pyx":605 * * ref, alt = ref[1:], [allele[1:] for allele in alt] * vcfDataLine['pos'] += 1 # <<<<<<<<<<<<<< * * #logger.info("now ref = %s. alt = %s. pos = %s" %(ref, alt, vcfDataLine['pos'])) */ __Pyx_INCREF(((PyObject *)__pyx_n_s__pos)); __pyx_t_15 = __pyx_n_s__pos; __pyx_t_5 = PyObject_GetItem(__pyx_v_vcfDataLine, ((PyObject *)__pyx_t_15)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyObject_SetItem(__pyx_v_vcfDataLine, ((PyObject *)__pyx_t_15), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; } __pyx_L5_break:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "vcfutils.pyx":609 * #logger.info("now ref = %s. alt = %s. pos = %s" %(ref, alt, vcfDataLine['pos'])) * * vcfDataLine['ref'] = ref # <<<<<<<<<<<<<< * vcfDataLine['alt'] = alt * */ if (PyObject_SetItem(__pyx_v_vcfDataLine, ((PyObject *)__pyx_n_s__ref), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":610 * * vcfDataLine['ref'] = ref * vcfDataLine['alt'] = alt # <<<<<<<<<<<<<< * * ################################################################################################### */ if (PyObject_SetItem(__pyx_v_vcfDataLine, ((PyObject *)__pyx_n_s__alt), __pyx_cur_scope->__pyx_v_alt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(((PyObject *)__pyx_t_15)); __Pyx_AddTraceback("vcfutils.trimLeftPadding", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ref); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_allele); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":614 * ################################################################################################### * * cdef tuple refAndAlt(char* chrom, int POS, list variants, FastaFile refFile): # <<<<<<<<<<<<<< * """ * Calculates the right REF and ALT fields for a set of variants. */ static PyObject *__pyx_f_8vcfutils_refAndAlt(char *__pyx_v_chrom, int __pyx_v_POS, PyObject *__pyx_v_variants, struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile) { int __pyx_v_nonSnpPresent; int __pyx_v_indelPresent; struct __pyx_obj_7variant_Variant *__pyx_v_v = 0; PyObject *__pyx_v_ALT = 0; PyObject *__pyx_v_seq = 0; PyObject *__pyx_v_REF = 0; int __pyx_v_nAdded; int __pyx_v_nRemoved; PyObject *__pyx_v_rlen = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PY_LONG_LONG __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refAndAlt", 0); /* "vcfutils.pyx":621 * http://1000genomes.org/wiki/doku.php?do=show&id=1000_genomes%3Aanalysis%3Avcf4.0 * """ * cdef int nonSnpPresent = 0 # <<<<<<<<<<<<<< * cdef int indelPresent = 0 * cdef Variant v */ __pyx_v_nonSnpPresent = 0; /* "vcfutils.pyx":622 * """ * cdef int nonSnpPresent = 0 * cdef int indelPresent = 0 # <<<<<<<<<<<<<< * cdef Variant v * cdef list ALT */ __pyx_v_indelPresent = 0; /* "vcfutils.pyx":628 * cdef bytes REF * * for v in variants: # <<<<<<<<<<<<<< * nAdded = v.nAdded * nRemoved = v.nRemoved */ if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_v)); __pyx_v_v = ((struct __pyx_obj_7variant_Variant *)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":629 * * for v in variants: * nAdded = v.nAdded # <<<<<<<<<<<<<< * nRemoved = v.nRemoved * */ __pyx_t_4 = __pyx_v_v->nAdded; __pyx_v_nAdded = __pyx_t_4; /* "vcfutils.pyx":630 * for v in variants: * nAdded = v.nAdded * nRemoved = v.nRemoved # <<<<<<<<<<<<<< * * if nRemoved != 1 or nAdded != 1: */ __pyx_t_4 = __pyx_v_v->nRemoved; __pyx_v_nRemoved = __pyx_t_4; /* "vcfutils.pyx":632 * nRemoved = v.nRemoved * * if nRemoved != 1 or nAdded != 1: # <<<<<<<<<<<<<< * nonSnpPresent = 1 * */ __pyx_t_5 = (__pyx_v_nRemoved != 1); if (!__pyx_t_5) { __pyx_t_6 = (__pyx_v_nAdded != 1); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_5; } if (__pyx_t_7) { /* "vcfutils.pyx":633 * * if nRemoved != 1 or nAdded != 1: * nonSnpPresent = 1 # <<<<<<<<<<<<<< * * if nRemoved != nAdded: */ __pyx_v_nonSnpPresent = 1; /* "vcfutils.pyx":635 * nonSnpPresent = 1 * * if nRemoved != nAdded: # <<<<<<<<<<<<<< * indelPresent = 1 * */ __pyx_t_7 = (__pyx_v_nRemoved != __pyx_v_nAdded); if (__pyx_t_7) { /* "vcfutils.pyx":636 * * if nRemoved != nAdded: * indelPresent = 1 # <<<<<<<<<<<<<< * * if not nonSnpPresent: */ __pyx_v_indelPresent = 1; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":638 * indelPresent = 1 * * if not nonSnpPresent: # <<<<<<<<<<<<<< * # Just SNPs * REF = refFile.getCharacter(chrom, POS) */ __pyx_t_7 = (!__pyx_v_nonSnpPresent); if (__pyx_t_7) { /* "vcfutils.pyx":640 * if not nonSnpPresent: * # Just SNPs * REF = refFile.getCharacter(chrom, POS) # <<<<<<<<<<<<<< * ALT = [ v.added for v in variants ] * return REF,ALT */ __pyx_t_1 = PyBytes_FromString(__pyx_v_chrom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9fastafile_FastaFile *)__pyx_v_refFile->__pyx_vtab)->getCharacter(__pyx_v_refFile, __pyx_t_1, __pyx_v_POS)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_REF = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":641 * # Just SNPs * REF = refFile.getCharacter(chrom, POS) * ALT = [ v.added for v in variants ] # <<<<<<<<<<<<<< * return REF,ALT * else: */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_v)); __pyx_v_v = ((struct __pyx_obj_7variant_Variant *)__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_v_v->added))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_ALT = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":642 * REF = refFile.getCharacter(chrom, POS) * ALT = [ v.added for v in variants ] * return REF,ALT # <<<<<<<<<<<<<< * else: * # If there are indels around, then the reference base is the base before the insertion */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_REF)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_REF)); __Pyx_GIVEREF(((PyObject *)__pyx_v_REF)); __Pyx_INCREF(((PyObject *)__pyx_v_ALT)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_ALT)); __Pyx_GIVEREF(((PyObject *)__pyx_v_ALT)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L7; } /*else*/ { /* "vcfutils.pyx":648 * # snps will have two bases * * rlen = max([v.nRemoved for v in variants]) # number of extra bases in REF # <<<<<<<<<<<<<< * REF = None * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_v)); __pyx_v_v = ((struct __pyx_obj_7variant_Variant *)__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyInt_FromLong(__pyx_v_v->nRemoved); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_rlen = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":649 * * rlen = max([v.nRemoved for v in variants]) # number of extra bases in REF * REF = None # <<<<<<<<<<<<<< * * if indelPresent: */ __Pyx_INCREF(Py_None); __pyx_v_REF = ((PyObject*)Py_None); /* "vcfutils.pyx":651 * REF = None * * if indelPresent: # <<<<<<<<<<<<<< * REF = refFile.getSequence(chrom, POS, (POS+rlen) + 1) * else: */ if (__pyx_v_indelPresent) { /* "vcfutils.pyx":652 * * if indelPresent: * REF = refFile.getSequence(chrom, POS, (POS+rlen) + 1) # <<<<<<<<<<<<<< * else: * REF = refFile.getSequence(chrom, POS, (POS+rlen)) */ __pyx_t_1 = PyBytes_FromString(__pyx_v_chrom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = PyInt_FromLong(__pyx_v_POS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_rlen); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_PyInt_AsLongLong(__pyx_t_3); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9fastafile_FastaFile *)__pyx_v_refFile->__pyx_vtab)->getSequence(__pyx_v_refFile, __pyx_t_1, __pyx_v_POS, __pyx_t_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_REF)); __pyx_v_REF = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L12; } /*else*/ { /* "vcfutils.pyx":654 * REF = refFile.getSequence(chrom, POS, (POS+rlen) + 1) * else: * REF = refFile.getSequence(chrom, POS, (POS+rlen)) # <<<<<<<<<<<<<< * * ALT = [] */ __pyx_t_3 = PyBytes_FromString(__pyx_v_chrom); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_1 = PyInt_FromLong(__pyx_v_POS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyNumber_Add(__pyx_t_1, __pyx_v_rlen); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyInt_AsLongLong(__pyx_t_8); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = ((PyObject *)((struct __pyx_vtabstruct_9fastafile_FastaFile *)__pyx_v_refFile->__pyx_vtab)->getSequence(__pyx_v_refFile, __pyx_t_3, __pyx_v_POS, __pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_REF)); __pyx_v_REF = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; } __pyx_L12:; /* "vcfutils.pyx":656 * REF = refFile.getSequence(chrom, POS, (POS+rlen)) * * ALT = [] # <<<<<<<<<<<<<< * * for v in variants: */ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_v_ALT = __pyx_t_8; __pyx_t_8 = 0; /* "vcfutils.pyx":658 * ALT = [] * * for v in variants: # <<<<<<<<<<<<<< * seq = list(REF) * */ if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_8); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_v)); __pyx_v_v = ((struct __pyx_obj_7variant_Variant *)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":659 * * for v in variants: * seq = list(REF) # <<<<<<<<<<<<<< * * if v.nRemoved == v.nAdded: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_REF)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_REF)); __Pyx_GIVEREF(((PyObject *)__pyx_v_REF)); __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_seq)); __pyx_v_seq = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":661 * seq = list(REF) * * if v.nRemoved == v.nAdded: # <<<<<<<<<<<<<< * seq[0: len(v.added)] = v.added * else: */ __pyx_t_7 = (__pyx_v_v->nRemoved == __pyx_v_v->nAdded); if (__pyx_t_7) { /* "vcfutils.pyx":662 * * if v.nRemoved == v.nAdded: * seq[0: len(v.added)] = v.added # <<<<<<<<<<<<<< * else: * seq[1:1+v.nRemoved] = v.added */ __pyx_t_1 = ((PyObject *)__pyx_v_v->added); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_v->added); __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = PyBytes_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_seq), 0, __pyx_t_10, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L15; } /*else*/ { /* "vcfutils.pyx":664 * seq[0: len(v.added)] = v.added * else: * seq[1:1+v.nRemoved] = v.added # <<<<<<<<<<<<<< * * ALT.append("".join(seq)) */ __pyx_t_1 = ((PyObject *)__pyx_v_v->added); __Pyx_INCREF(__pyx_t_1); if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_seq), 1, (1 + __pyx_v_v->nRemoved), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L15:; /* "vcfutils.pyx":666 * seq[1:1+v.nRemoved] = v.added * * ALT.append("".join(seq)) # <<<<<<<<<<<<<< * * return REF,ALT */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_17), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_seq)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_seq)); __Pyx_GIVEREF(((PyObject *)__pyx_v_seq)); __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_12 = PyList_Append(__pyx_v_ALT, __pyx_t_11); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "vcfutils.pyx":668 * ALT.append("".join(seq)) * * return REF,ALT # <<<<<<<<<<<<<< * * ################################################################################################### */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_REF)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_REF)); __Pyx_GIVEREF(((PyObject *)__pyx_v_REF)); __Pyx_INCREF(((PyObject *)__pyx_v_ALT)); PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_ALT)); __Pyx_GIVEREF(((PyObject *)__pyx_v_ALT)); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } __pyx_L7:; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("vcfutils.refAndAlt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_v); __Pyx_XDECREF(__pyx_v_ALT); __Pyx_XDECREF(__pyx_v_seq); __Pyx_XDECREF(__pyx_v_REF); __Pyx_XDECREF(__pyx_v_rlen); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":672 * ################################################################################################### * * cdef int readOverlapsVariant(cAlignedRead* pRead, int varBAMMinPos, int varBAMMaxPos): # <<<<<<<<<<<<<< * """ * Check if a read overlaps the variant position */ static int __pyx_f_8vcfutils_readOverlapsVariant(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_pRead, int __pyx_v_varBAMMinPos, int __pyx_v_varBAMMaxPos) { int __pyx_v_readStart; int __pyx_v_readEnd; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("readOverlapsVariant", 0); /* "vcfutils.pyx":676 * Check if a read overlaps the variant position * """ * cdef int readStart = pRead.pos # <<<<<<<<<<<<<< * cdef int readEnd = pRead.end * */ __pyx_t_1 = __pyx_v_pRead->pos; __pyx_v_readStart = __pyx_t_1; /* "vcfutils.pyx":677 * """ * cdef int readStart = pRead.pos * cdef int readEnd = pRead.end # <<<<<<<<<<<<<< * * if readStart <= varBAMMaxPos and readEnd >= varBAMMinPos: */ __pyx_t_1 = __pyx_v_pRead->end; __pyx_v_readEnd = __pyx_t_1; /* "vcfutils.pyx":679 * cdef int readEnd = pRead.end * * if readStart <= varBAMMaxPos and readEnd >= varBAMMinPos: # <<<<<<<<<<<<<< * #logger.info("Read %s -%s overlaps var %s - %s" %(readStart, readEnd, varBAMMinPos, varBAMMaxPos)) * return True */ __pyx_t_2 = (__pyx_v_readStart <= __pyx_v_varBAMMaxPos); if (__pyx_t_2) { __pyx_t_3 = (__pyx_v_readEnd >= __pyx_v_varBAMMinPos); __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "vcfutils.pyx":681 * if readStart <= varBAMMaxPos and readEnd >= varBAMMinPos: * #logger.info("Read %s -%s overlaps var %s - %s" %(readStart, readEnd, varBAMMinPos, varBAMMaxPos)) * return True # <<<<<<<<<<<<<< * else: * #logger.info("Read %s -%s does not overlap var %s - %s" %(readStart, readEnd, varBAMMinPos, varBAMMaxPos)) */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "vcfutils.pyx":684 * else: * #logger.info("Read %s -%s does not overlap var %s - %s" %(readStart, readEnd, varBAMMinPos, varBAMMaxPos)) * return False # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":688 * ################################################################################################### * * cdef int readQualIsGoodVariantPosition(cAlignedRead* pRead, int varBAMMinPos, int varBAMMaxPos, int minBaseQual): # <<<<<<<<<<<<<< * """ * If a read overlaps the variant position, then check the qualities at that position. If quals */ static int __pyx_f_8vcfutils_readQualIsGoodVariantPosition(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_pRead, int __pyx_v_varBAMMinPos, int __pyx_v_varBAMMaxPos, CYTHON_UNUSED int __pyx_v_minBaseQual) { CYTHON_UNUSED int __pyx_v_readStart; CYTHON_UNUSED int __pyx_v_readEnd; char *__pyx_v_qualStart; char *__pyx_v_qualEnd; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; short __pyx_t_3; int __pyx_t_4; long __pyx_t_5; long __pyx_t_6; __Pyx_RefNannySetupContext("readQualIsGoodVariantPosition", 0); /* "vcfutils.pyx":693 * are all < minBaseQual, then return False, otherwise True * """ * if pRead.qual == NULL: # <<<<<<<<<<<<<< * return True * */ __pyx_t_1 = (__pyx_v_pRead->qual == NULL); if (__pyx_t_1) { /* "vcfutils.pyx":694 * """ * if pRead.qual == NULL: * return True # <<<<<<<<<<<<<< * * cdef int readStart = pRead.pos */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "vcfutils.pyx":696 * return True * * cdef int readStart = pRead.pos # <<<<<<<<<<<<<< * cdef int readEnd = pRead.end * */ __pyx_t_2 = __pyx_v_pRead->pos; __pyx_v_readStart = __pyx_t_2; /* "vcfutils.pyx":697 * * cdef int readStart = pRead.pos * cdef int readEnd = pRead.end # <<<<<<<<<<<<<< * * cdef char* qualStart = pRead.qual + max(0, min(pRead.rlen, varBAMMinPos - pRead.pos)) */ __pyx_t_2 = __pyx_v_pRead->end; __pyx_v_readEnd = __pyx_t_2; /* "vcfutils.pyx":699 * cdef int readEnd = pRead.end * * cdef char* qualStart = pRead.qual + max(0, min(pRead.rlen, varBAMMinPos - pRead.pos)) # <<<<<<<<<<<<<< * cdef char* qualEnd = pRead.qual + max(0, min(pRead.rlen, varBAMMaxPos - pRead.pos)) * */ __pyx_t_2 = (__pyx_v_varBAMMinPos - __pyx_v_pRead->pos); __pyx_t_3 = __pyx_v_pRead->rlen; if ((__pyx_t_2 < __pyx_t_3)) { __pyx_t_4 = __pyx_t_2; } else { __pyx_t_4 = __pyx_t_3; } __pyx_t_2 = __pyx_t_4; __pyx_t_5 = 0; if ((__pyx_t_2 > __pyx_t_5)) { __pyx_t_6 = __pyx_t_2; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_qualStart = (__pyx_v_pRead->qual + __pyx_t_6); /* "vcfutils.pyx":700 * * cdef char* qualStart = pRead.qual + max(0, min(pRead.rlen, varBAMMinPos - pRead.pos)) * cdef char* qualEnd = pRead.qual + max(0, min(pRead.rlen, varBAMMaxPos - pRead.pos)) # <<<<<<<<<<<<<< * * # Conservative. I want good coverage all the way across */ __pyx_t_2 = (__pyx_v_varBAMMaxPos - __pyx_v_pRead->pos); __pyx_t_3 = __pyx_v_pRead->rlen; if ((__pyx_t_2 < __pyx_t_3)) { __pyx_t_4 = __pyx_t_2; } else { __pyx_t_4 = __pyx_t_3; } __pyx_t_2 = __pyx_t_4; __pyx_t_6 = 0; if ((__pyx_t_2 > __pyx_t_6)) { __pyx_t_5 = __pyx_t_2; } else { __pyx_t_5 = __pyx_t_6; } __pyx_v_qualEnd = (__pyx_v_pRead->qual + __pyx_t_5); /* "vcfutils.pyx":703 * * # Conservative. I want good coverage all the way across * while qualStart != qualEnd: # <<<<<<<<<<<<<< * * #logger.info("Base at pos %s has qual %s. Var min = %s. Var max = %s" %(readStart + (qualStart - pRead.qual), qualStart[0], varBAMMinPos, varBAMMaxPos)) */ while (1) { __pyx_t_1 = (__pyx_v_qualStart != __pyx_v_qualEnd); if (!__pyx_t_1) break; /* "vcfutils.pyx":709 * # Ok, this is a slight fudge, as I still want to catch those cases when there's a mis-match supporting * # a variant with a low-ish quality. I'm just not counting coverage which is very low quality. * if qualStart[0] < 5: # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = ((__pyx_v_qualStart[0]) < 5); if (__pyx_t_1) { /* "vcfutils.pyx":710 * # a variant with a low-ish quality. I'm just not counting coverage which is very low quality. * if qualStart[0] < 5: * return False # <<<<<<<<<<<<<< * * qualStart += 1 */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; /* "vcfutils.pyx":712 * return False * * qualStart += 1 # <<<<<<<<<<<<<< * * return True */ __pyx_v_qualStart = (__pyx_v_qualStart + 1); } /* "vcfutils.pyx":714 * qualStart += 1 * * return True # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = 1; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":718 * ################################################################################################### * * cdef int overlap(int varStart, int varEnd, int seqStart, int seqEnd): # <<<<<<<<<<<<<< * """ * Compute and return the number of bases by which a read overlaps the haplotype of interest. */ static int __pyx_f_8vcfutils_overlap(int __pyx_v_varStart, int __pyx_v_varEnd, int __pyx_v_seqStart, int __pyx_v_seqEnd) { int __pyx_v_overlapStart; int __pyx_v_overlapEnd; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("overlap", 0); /* "vcfutils.pyx":722 * Compute and return the number of bases by which a read overlaps the haplotype of interest. * """ * cdef int overlapStart = max(varStart, seqStart) # <<<<<<<<<<<<<< * cdef int overlapEnd = min(varEnd, seqEnd) * */ __pyx_t_1 = __pyx_v_seqStart; __pyx_t_2 = __pyx_v_varStart; if ((__pyx_t_1 > __pyx_t_2)) { __pyx_t_3 = __pyx_t_1; } else { __pyx_t_3 = __pyx_t_2; } __pyx_v_overlapStart = __pyx_t_3; /* "vcfutils.pyx":723 * """ * cdef int overlapStart = max(varStart, seqStart) * cdef int overlapEnd = min(varEnd, seqEnd) # <<<<<<<<<<<<<< * * if overlapEnd > overlapStart: */ __pyx_t_3 = __pyx_v_seqEnd; __pyx_t_1 = __pyx_v_varEnd; if ((__pyx_t_3 < __pyx_t_1)) { __pyx_t_2 = __pyx_t_3; } else { __pyx_t_2 = __pyx_t_1; } __pyx_v_overlapEnd = __pyx_t_2; /* "vcfutils.pyx":725 * cdef int overlapEnd = min(varEnd, seqEnd) * * if overlapEnd > overlapStart: # <<<<<<<<<<<<<< * return overlapEnd - overlapStart * else: */ __pyx_t_4 = (__pyx_v_overlapEnd > __pyx_v_overlapStart); if (__pyx_t_4) { /* "vcfutils.pyx":726 * * if overlapEnd > overlapStart: * return overlapEnd - overlapStart # <<<<<<<<<<<<<< * else: * return -1 */ __pyx_r = (__pyx_v_overlapEnd - __pyx_v_overlapStart); goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "vcfutils.pyx":728 * return overlapEnd - overlapStart * else: * return -1 # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = -1; goto __pyx_L0; } __pyx_L3:; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":732 * ################################################################################################### * * cdef int variantSupportedByRead(cAlignedRead* pRead, int varBAMMinPos, int varBAMMaxPos, Variant variant): # <<<<<<<<<<<<<< * """ * Return True if the specified variant is supported by the specified read */ static int __pyx_f_8vcfutils_variantSupportedByRead(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_pRead, CYTHON_UNUSED int __pyx_v_varBAMMinPos, CYTHON_UNUSED int __pyx_v_varBAMMaxPos, struct __pyx_obj_7variant_Variant *__pyx_v_variant) { int __pyx_v_refOffset; int __pyx_v_readOffset; int __pyx_v_readStart; CYTHON_UNUSED int __pyx_v_match; int __pyx_v_cigarIndex; int __pyx_v_cigarLength; int __pyx_v_flag; int __pyx_v_length; int __pyx_v_startPosOfVarInRead; int __pyx_v_varPos; int __pyx_v_lenVarAdded; int __pyx_v_lenVarRemoved; char *__pyx_v_varAdded; CYTHON_UNUSED char *__pyx_v_varRemoved; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; short __pyx_t_2; char *__pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("variantSupportedByRead", 0); /* "vcfutils.pyx":736 * Return True if the specified variant is supported by the specified read * """ * cdef int refOffset = 0 # <<<<<<<<<<<<<< * cdef int readOffset = 0 * cdef int readStart = pRead.pos */ __pyx_v_refOffset = 0; /* "vcfutils.pyx":737 * """ * cdef int refOffset = 0 * cdef int readOffset = 0 # <<<<<<<<<<<<<< * cdef int readStart = pRead.pos * cdef int match = 0 */ __pyx_v_readOffset = 0; /* "vcfutils.pyx":738 * cdef int refOffset = 0 * cdef int readOffset = 0 * cdef int readStart = pRead.pos # <<<<<<<<<<<<<< * cdef int match = 0 * cdef int cigarIndex = 0 */ __pyx_t_1 = __pyx_v_pRead->pos; __pyx_v_readStart = __pyx_t_1; /* "vcfutils.pyx":739 * cdef int readOffset = 0 * cdef int readStart = pRead.pos * cdef int match = 0 # <<<<<<<<<<<<<< * cdef int cigarIndex = 0 * cdef int cigarLength = pRead.cigarLen */ __pyx_v_match = 0; /* "vcfutils.pyx":740 * cdef int readStart = pRead.pos * cdef int match = 0 * cdef int cigarIndex = 0 # <<<<<<<<<<<<<< * cdef int cigarLength = pRead.cigarLen * cdef int flag = 0 */ __pyx_v_cigarIndex = 0; /* "vcfutils.pyx":741 * cdef int match = 0 * cdef int cigarIndex = 0 * cdef int cigarLength = pRead.cigarLen # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef int length = 0 */ __pyx_t_2 = __pyx_v_pRead->cigarLen; __pyx_v_cigarLength = __pyx_t_2; /* "vcfutils.pyx":742 * cdef int cigarIndex = 0 * cdef int cigarLength = pRead.cigarLen * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef int length = 0 * cdef int startPosOfVarInRead = 0 */ __pyx_v_flag = 0; /* "vcfutils.pyx":743 * cdef int cigarLength = pRead.cigarLen * cdef int flag = 0 * cdef int length = 0 # <<<<<<<<<<<<<< * cdef int startPosOfVarInRead = 0 * cdef int varPos = variant.refPos */ __pyx_v_length = 0; /* "vcfutils.pyx":744 * cdef int flag = 0 * cdef int length = 0 * cdef int startPosOfVarInRead = 0 # <<<<<<<<<<<<<< * cdef int varPos = variant.refPos * cdef int lenVarAdded = variant.nAdded */ __pyx_v_startPosOfVarInRead = 0; /* "vcfutils.pyx":745 * cdef int length = 0 * cdef int startPosOfVarInRead = 0 * cdef int varPos = variant.refPos # <<<<<<<<<<<<<< * cdef int lenVarAdded = variant.nAdded * cdef int lenVarRemoved = variant.nRemoved */ __pyx_t_1 = __pyx_v_variant->refPos; __pyx_v_varPos = __pyx_t_1; /* "vcfutils.pyx":746 * cdef int startPosOfVarInRead = 0 * cdef int varPos = variant.refPos * cdef int lenVarAdded = variant.nAdded # <<<<<<<<<<<<<< * cdef int lenVarRemoved = variant.nRemoved * cdef char* varAdded = variant.added */ __pyx_t_1 = __pyx_v_variant->nAdded; __pyx_v_lenVarAdded = __pyx_t_1; /* "vcfutils.pyx":747 * cdef int varPos = variant.refPos * cdef int lenVarAdded = variant.nAdded * cdef int lenVarRemoved = variant.nRemoved # <<<<<<<<<<<<<< * cdef char* varAdded = variant.added * cdef char* varRemoved = variant.removed */ __pyx_t_1 = __pyx_v_variant->nRemoved; __pyx_v_lenVarRemoved = __pyx_t_1; /* "vcfutils.pyx":748 * cdef int lenVarAdded = variant.nAdded * cdef int lenVarRemoved = variant.nRemoved * cdef char* varAdded = variant.added # <<<<<<<<<<<<<< * cdef char* varRemoved = variant.removed * */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_variant->added)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_varAdded = __pyx_t_3; /* "vcfutils.pyx":749 * cdef int lenVarRemoved = variant.nRemoved * cdef char* varAdded = variant.added * cdef char* varRemoved = variant.removed # <<<<<<<<<<<<<< * * for cigarIndex from 0 <= cigarIndex < cigarLength: */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_variant->removed)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_varRemoved = __pyx_t_3; /* "vcfutils.pyx":751 * cdef char* varRemoved = variant.removed * * for cigarIndex from 0 <= cigarIndex < cigarLength: # <<<<<<<<<<<<<< * * flag = pRead.cigarOps[2*cigarIndex] */ __pyx_t_1 = __pyx_v_cigarLength; for (__pyx_v_cigarIndex = 0; __pyx_v_cigarIndex < __pyx_t_1; __pyx_v_cigarIndex++) { /* "vcfutils.pyx":753 * for cigarIndex from 0 <= cigarIndex < cigarLength: * * flag = pRead.cigarOps[2*cigarIndex] # <<<<<<<<<<<<<< * length = pRead.cigarOps[2*cigarIndex+1] * */ __pyx_v_flag = (__pyx_v_pRead->cigarOps[(2 * __pyx_v_cigarIndex)]); /* "vcfutils.pyx":754 * * flag = pRead.cigarOps[2*cigarIndex] * length = pRead.cigarOps[2*cigarIndex+1] # <<<<<<<<<<<<<< * * # An insertion take us further along the read, but not the reference */ __pyx_v_length = (__pyx_v_pRead->cigarOps[((2 * __pyx_v_cigarIndex) + 1)]); /* "vcfutils.pyx":757 * * # An insertion take us further along the read, but not the reference * if flag == CIGAR_I: # <<<<<<<<<<<<<< * startPosOfVarInRead = readOffset * */ __pyx_t_4 = (__pyx_v_flag == __pyx_v_8vcfutils_CIGAR_I); if (__pyx_t_4) { /* "vcfutils.pyx":758 * # An insertion take us further along the read, but not the reference * if flag == CIGAR_I: * startPosOfVarInRead = readOffset # <<<<<<<<<<<<<< * * # Counting support if the read overlaps variant site and has an indel. */ __pyx_v_startPosOfVarInRead = __pyx_v_readOffset; /* "vcfutils.pyx":762 * # Counting support if the read overlaps variant site and has an indel. * #if varBAMMinPos <= refOffset + readStart - 1 <= varBAMMaxPos: * if variant.nAdded != variant.nRemoved:#overlap(varBAMMinPos, varBAMMaxPos, refOffset + readStart - 1, refOffset + readStart + length) >= 0: # <<<<<<<<<<<<<< * return True * */ __pyx_t_4 = (__pyx_v_variant->nAdded != __pyx_v_variant->nRemoved); if (__pyx_t_4) { /* "vcfutils.pyx":763 * #if varBAMMinPos <= refOffset + readStart - 1 <= varBAMMaxPos: * if variant.nAdded != variant.nRemoved:#overlap(varBAMMinPos, varBAMMaxPos, refOffset + readStart - 1, refOffset + readStart + length) >= 0: * return True # <<<<<<<<<<<<<< * * readOffset += length */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L6; } __pyx_L6:; /* "vcfutils.pyx":765 * return True * * readOffset += length # <<<<<<<<<<<<<< * * elif flag == CIGAR_D: */ __pyx_v_readOffset = (__pyx_v_readOffset + __pyx_v_length); goto __pyx_L5; } /* "vcfutils.pyx":767 * readOffset += length * * elif flag == CIGAR_D: # <<<<<<<<<<<<<< * * # Counting support if the read overlaps variant site and has an indel. */ __pyx_t_4 = (__pyx_v_flag == __pyx_v_8vcfutils_CIGAR_D); if (__pyx_t_4) { /* "vcfutils.pyx":771 * # Counting support if the read overlaps variant site and has an indel. * #if varBAMMinPos <= refOffset + readStart - 1 <= varBAMMaxPos: * if variant.nAdded != variant.nRemoved:#overlap(varBAMMinPos, varBAMMaxPos, refOffset + readStart - 1, refOffset + readStart + length) >= 0: # <<<<<<<<<<<<<< * return True * */ __pyx_t_4 = (__pyx_v_variant->nAdded != __pyx_v_variant->nRemoved); if (__pyx_t_4) { /* "vcfutils.pyx":772 * #if varBAMMinPos <= refOffset + readStart - 1 <= varBAMMaxPos: * if variant.nAdded != variant.nRemoved:#overlap(varBAMMinPos, varBAMMaxPos, refOffset + readStart - 1, refOffset + readStart + length) >= 0: * return True # <<<<<<<<<<<<<< * * refOffset += length */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "vcfutils.pyx":774 * return True * * refOffset += length # <<<<<<<<<<<<<< * * # A match take us further along the reference and the read */ __pyx_v_refOffset = (__pyx_v_refOffset + __pyx_v_length); goto __pyx_L5; } /* "vcfutils.pyx":777 * * # A match take us further along the reference and the read * elif flag == CIGAR_M: # <<<<<<<<<<<<<< * * # Check if read base matches variant */ __pyx_t_4 = (__pyx_v_flag == __pyx_v_8vcfutils_CIGAR_M); if (__pyx_t_4) { /* "vcfutils.pyx":783 * # If there are no insertions/deletions, then the variant position in the read is just the reference * # position - the start position of the read. * startPosOfVarInRead = varPos - readStart # <<<<<<<<<<<<<< * * # An insertion before the variant means that it will occur later in the read by insertionSize */ __pyx_v_startPosOfVarInRead = (__pyx_v_varPos - __pyx_v_readStart); /* "vcfutils.pyx":786 * * # An insertion before the variant means that it will occur later in the read by insertionSize * startPosOfVarInRead += readOffset # <<<<<<<<<<<<<< * * # A deletion before the variant means that it will occur earlier in the read by deletion Size */ __pyx_v_startPosOfVarInRead = (__pyx_v_startPosOfVarInRead + __pyx_v_readOffset); /* "vcfutils.pyx":789 * * # A deletion before the variant means that it will occur earlier in the read by deletion Size * startPosOfVarInRead -= refOffset # <<<<<<<<<<<<<< * #logger.info("Read start = %s. var pos = %s. read seq = %s. var added = %s" %(readStart, varPos, pRead.seq[startPosOfVarInRead:startPosOfVarInRead+lenVarAdded], varAdded)) * */ __pyx_v_startPosOfVarInRead = (__pyx_v_startPosOfVarInRead - __pyx_v_refOffset); /* "vcfutils.pyx":792 * #logger.info("Read start = %s. var pos = %s. read seq = %s. var added = %s" %(readStart, varPos, pRead.seq[startPosOfVarInRead:startPosOfVarInRead+lenVarAdded], varAdded)) * * if refOffset + readStart <= varPos and refOffset + readStart + length > varPos and lenVarAdded == lenVarRemoved: # <<<<<<<<<<<<<< * if startPosOfVarInRead + lenVarAdded <= pRead.rlen: * if pRead.seq[startPosOfVarInRead:startPosOfVarInRead+lenVarAdded] == varAdded: */ __pyx_t_4 = ((__pyx_v_refOffset + __pyx_v_readStart) <= __pyx_v_varPos); if (__pyx_t_4) { __pyx_t_5 = (((__pyx_v_refOffset + __pyx_v_readStart) + __pyx_v_length) > __pyx_v_varPos); if (__pyx_t_5) { __pyx_t_6 = (__pyx_v_lenVarAdded == __pyx_v_lenVarRemoved); __pyx_t_7 = __pyx_t_6; } else { __pyx_t_7 = __pyx_t_5; } __pyx_t_5 = __pyx_t_7; } else { __pyx_t_5 = __pyx_t_4; } if (__pyx_t_5) { /* "vcfutils.pyx":793 * * if refOffset + readStart <= varPos and refOffset + readStart + length > varPos and lenVarAdded == lenVarRemoved: * if startPosOfVarInRead + lenVarAdded <= pRead.rlen: # <<<<<<<<<<<<<< * if pRead.seq[startPosOfVarInRead:startPosOfVarInRead+lenVarAdded] == varAdded: * return True */ __pyx_t_5 = ((__pyx_v_startPosOfVarInRead + __pyx_v_lenVarAdded) <= __pyx_v_pRead->rlen); if (__pyx_t_5) { /* "vcfutils.pyx":794 * if refOffset + readStart <= varPos and refOffset + readStart + length > varPos and lenVarAdded == lenVarRemoved: * if startPosOfVarInRead + lenVarAdded <= pRead.rlen: * if pRead.seq[startPosOfVarInRead:startPosOfVarInRead+lenVarAdded] == varAdded: # <<<<<<<<<<<<<< * return True * */ __pyx_t_8 = PyBytes_FromStringAndSize(((const char*)__pyx_v_pRead->seq) + __pyx_v_startPosOfVarInRead, (__pyx_v_startPosOfVarInRead + __pyx_v_lenVarAdded) - __pyx_v_startPosOfVarInRead); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __pyx_t_9 = PyBytes_FromString(__pyx_v_varAdded); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_10 = PyObject_RichCompare(((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_5) { /* "vcfutils.pyx":795 * if startPosOfVarInRead + lenVarAdded <= pRead.rlen: * if pRead.seq[startPosOfVarInRead:startPosOfVarInRead+lenVarAdded] == varAdded: * return True # <<<<<<<<<<<<<< * * readOffset += length */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "vcfutils.pyx":797 * return True * * readOffset += length # <<<<<<<<<<<<<< * refOffset += length * */ __pyx_v_readOffset = (__pyx_v_readOffset + __pyx_v_length); /* "vcfutils.pyx":798 * * readOffset += length * refOffset += length # <<<<<<<<<<<<<< * * # Skipped region from the reference. */ __pyx_v_refOffset = (__pyx_v_refOffset + __pyx_v_length); goto __pyx_L5; } /* "vcfutils.pyx":801 * * # Skipped region from the reference. * elif flag == CIGAR_N: # <<<<<<<<<<<<<< * readOffset += length * refOffset += length */ __pyx_t_5 = (__pyx_v_flag == __pyx_v_8vcfutils_CIGAR_N); if (__pyx_t_5) { /* "vcfutils.pyx":802 * # Skipped region from the reference. * elif flag == CIGAR_N: * readOffset += length # <<<<<<<<<<<<<< * refOffset += length * */ __pyx_v_readOffset = (__pyx_v_readOffset + __pyx_v_length); /* "vcfutils.pyx":803 * elif flag == CIGAR_N: * readOffset += length * refOffset += length # <<<<<<<<<<<<<< * * # Soft clipping. Sequence is present in read, but we should ignore it. */ __pyx_v_refOffset = (__pyx_v_refOffset + __pyx_v_length); goto __pyx_L5; } /* "vcfutils.pyx":806 * * # Soft clipping. Sequence is present in read, but we should ignore it. * elif flag == CIGAR_S: # <<<<<<<<<<<<<< * readOffset += length * */ __pyx_t_5 = (__pyx_v_flag == __pyx_v_8vcfutils_CIGAR_S); if (__pyx_t_5) { /* "vcfutils.pyx":807 * # Soft clipping. Sequence is present in read, but we should ignore it. * elif flag == CIGAR_S: * readOffset += length # <<<<<<<<<<<<<< * * # We moved back read starts when there is soft clipping at the beginning of the read */ __pyx_v_readOffset = (__pyx_v_readOffset + __pyx_v_length); /* "vcfutils.pyx":810 * * # We moved back read starts when there is soft clipping at the beginning of the read * if cigarIndex == 0: # <<<<<<<<<<<<<< * refOffset += length * */ __pyx_t_5 = (__pyx_v_cigarIndex == 0); if (__pyx_t_5) { /* "vcfutils.pyx":811 * # We moved back read starts when there is soft clipping at the beginning of the read * if cigarIndex == 0: * refOffset += length # <<<<<<<<<<<<<< * * # Other kinds of flag. including H (hard clipping) and P (padding) */ __pyx_v_refOffset = (__pyx_v_refOffset + __pyx_v_length); goto __pyx_L11; } __pyx_L11:; goto __pyx_L5; } /*else*/ { /* "vcfutils.pyx":815 * # Other kinds of flag. including H (hard clipping) and P (padding) * else: * continue # <<<<<<<<<<<<<< * * # No match found */ goto __pyx_L3_continue; } __pyx_L5:; __pyx_L3_continue:; } /* "vcfutils.pyx":818 * * # No match found * return False # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = 0; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_WriteUnraisable("vcfutils.variantSupportedByRead", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":822 * ################################################################################################### * * cdef int computeHaplotypeScore(list genotypes): # <<<<<<<<<<<<<< * """ * Calculate Haplotype Score: The number of haplotypes that a variant segregate into within the window. */ static int __pyx_f_8vcfutils_computeHaplotypeScore(PyObject *__pyx_v_genotypes) { struct __pyx_obj_9cgenotype_DiploidGenotype *__pyx_v_genotype = 0; struct __pyx_obj_10chaplotype_Haplotype *__pyx_v_hap1 = 0; struct __pyx_obj_10chaplotype_Haplotype *__pyx_v_hap2 = 0; PyObject *__pyx_v_hapScores = NULL; PyObject *__pyx_v_HapScores = NULL; PyObject *__pyx_v_hapScoreClusters = NULL; PyObject *__pyx_v_dist = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_HapScore = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("computeHaplotypeScore", 0); /* "vcfutils.pyx":831 * cdef DiploidGenotype genotype * cdef Haplotype hap1,hap2 * hapScores = {} # <<<<<<<<<<<<<< * * for genotype in genotypes: */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_hapScores = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":833 * hapScores = {} * * for genotype in genotypes: # <<<<<<<<<<<<<< * hap1 = genotype.hap1 * hap2 = genotype.hap2 */ if (unlikely(((PyObject *)__pyx_v_genotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_genotypes); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9cgenotype_DiploidGenotype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_genotype)); __pyx_v_genotype = ((struct __pyx_obj_9cgenotype_DiploidGenotype *)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":834 * * for genotype in genotypes: * hap1 = genotype.hap1 # <<<<<<<<<<<<<< * hap2 = genotype.hap2 * hapScores[hap1] = - genotype.hap1Like */ __pyx_t_3 = ((PyObject *)__pyx_v_genotype->hap1); __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF(((PyObject *)__pyx_v_hap1)); __pyx_v_hap1 = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":835 * for genotype in genotypes: * hap1 = genotype.hap1 * hap2 = genotype.hap2 # <<<<<<<<<<<<<< * hapScores[hap1] = - genotype.hap1Like * hapScores[hap2] = - genotype.hap2Like */ __pyx_t_3 = ((PyObject *)__pyx_v_genotype->hap2); __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF(((PyObject *)__pyx_v_hap2)); __pyx_v_hap2 = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":836 * hap1 = genotype.hap1 * hap2 = genotype.hap2 * hapScores[hap1] = - genotype.hap1Like # <<<<<<<<<<<<<< * hapScores[hap2] = - genotype.hap2Like * */ __pyx_t_3 = PyFloat_FromDouble((-__pyx_v_genotype->hap1Like)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(((PyObject *)__pyx_v_hapScores), ((PyObject *)__pyx_v_hap1), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":837 * hap2 = genotype.hap2 * hapScores[hap1] = - genotype.hap1Like * hapScores[hap2] = - genotype.hap2Like # <<<<<<<<<<<<<< * * HapScores = sorted(hapScores.values()) */ __pyx_t_3 = PyFloat_FromDouble((-__pyx_v_genotype->hap2Like)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(((PyObject *)__pyx_v_hapScores), ((PyObject *)__pyx_v_hap2), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":839 * hapScores[hap2] = - genotype.hap2Like * * HapScores = sorted(hapScores.values()) # <<<<<<<<<<<<<< * hapScoreClusters = [[HapScores[0]]] * dist = 0 */ __pyx_t_1 = PyDict_Values(__pyx_v_hapScores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_HapScores = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":840 * * HapScores = sorted(hapScores.values()) * hapScoreClusters = [[HapScores[0]]] # <<<<<<<<<<<<<< * dist = 0 * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_HapScores, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_hapScoreClusters = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":841 * HapScores = sorted(hapScores.values()) * hapScoreClusters = [[HapScores[0]]] * dist = 0 # <<<<<<<<<<<<<< * * for i in range(1, len(HapScores)): */ __Pyx_INCREF(__pyx_int_0); __pyx_v_dist = __pyx_int_0; /* "vcfutils.pyx":843 * dist = 0 * * for i in range(1, len(HapScores)): # <<<<<<<<<<<<<< * * if HapScores[i] - HapScores[i-1] >20: */ __pyx_t_2 = PyObject_Length(__pyx_v_HapScores); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = NULL; } else { __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF(__pyx_v_i); __pyx_v_i = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":845 * for i in range(1, len(HapScores)): * * if HapScores[i] - HapScores[i-1] >20: # <<<<<<<<<<<<<< * if len(hapScoreClusters) ==1: * dist = HapScores[i] - HapScores[i-1] */ __pyx_t_1 = PyObject_GetItem(__pyx_v_HapScores, __pyx_v_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyNumber_Subtract(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_GetItem(__pyx_v_HapScores, __pyx_t_5); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Subtract(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_int_20, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { /* "vcfutils.pyx":846 * * if HapScores[i] - HapScores[i-1] >20: * if len(hapScoreClusters) ==1: # <<<<<<<<<<<<<< * dist = HapScores[i] - HapScores[i-1] * if len(hapScoreClusters)==2 : */ __pyx_t_8 = PyList_GET_SIZE(((PyObject *)__pyx_v_hapScoreClusters)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = (__pyx_t_8 == 1); if (__pyx_t_7) { /* "vcfutils.pyx":847 * if HapScores[i] - HapScores[i-1] >20: * if len(hapScoreClusters) ==1: * dist = HapScores[i] - HapScores[i-1] # <<<<<<<<<<<<<< * if len(hapScoreClusters)==2 : * break */ __pyx_t_6 = PyObject_GetItem(__pyx_v_HapScores, __pyx_v_i); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyNumber_Subtract(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetItem(__pyx_v_HapScores, __pyx_t_5); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Subtract(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_v_dist); __pyx_v_dist = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L8; } __pyx_L8:; /* "vcfutils.pyx":848 * if len(hapScoreClusters) ==1: * dist = HapScores[i] - HapScores[i-1] * if len(hapScoreClusters)==2 : # <<<<<<<<<<<<<< * break * hapScoreClusters.append([HapScores[i]]) */ __pyx_t_8 = PyList_GET_SIZE(((PyObject *)__pyx_v_hapScoreClusters)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = (__pyx_t_8 == 2); if (__pyx_t_7) { /* "vcfutils.pyx":849 * dist = HapScores[i] - HapScores[i-1] * if len(hapScoreClusters)==2 : * break # <<<<<<<<<<<<<< * hapScoreClusters.append([HapScores[i]]) * */ goto __pyx_L6_break; goto __pyx_L9; } __pyx_L9:; /* "vcfutils.pyx":850 * if len(hapScoreClusters)==2 : * break * hapScoreClusters.append([HapScores[i]]) # <<<<<<<<<<<<<< * * else: */ __pyx_t_5 = PyObject_GetItem(__pyx_v_HapScores, __pyx_v_i); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = PyList_Append(__pyx_v_hapScoreClusters, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L7; } /*else*/ { /* "vcfutils.pyx":853 * * else: * hapScoreClusters[-1].append(HapScores[i]) # <<<<<<<<<<<<<< * * HapScore = len(hapScoreClusters[0]) */ __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_hapScoreClusters), -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_GetItem(__pyx_v_HapScores, __pyx_v_i); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L7:; } __pyx_L6_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":855 * hapScoreClusters[-1].append(HapScores[i]) * * HapScore = len(hapScoreClusters[0]) # <<<<<<<<<<<<<< * * if dist < 50 and dist >0: */ __pyx_t_3 = PyList_GET_ITEM(__pyx_v_hapScoreClusters, 0); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_HapScore = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":857 * HapScore = len(hapScoreClusters[0]) * * if dist < 50 and dist >0: # <<<<<<<<<<<<<< * HapScore += len(hapScoreClusters[1]) * */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_dist, __pyx_int_50, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { __pyx_t_3 = PyObject_RichCompare(__pyx_v_dist, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_7; } if (__pyx_t_11) { /* "vcfutils.pyx":858 * * if dist < 50 and dist >0: * HapScore += len(hapScoreClusters[1]) # <<<<<<<<<<<<<< * * return HapScore */ __pyx_t_3 = PyList_GET_ITEM(__pyx_v_hapScoreClusters, 1); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_HapScore, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_v_HapScore); __pyx_v_HapScore = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L10; } __pyx_L10:; /* "vcfutils.pyx":860 * HapScore += len(hapScoreClusters[1]) * * return HapScore # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_v_HapScore); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_12; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("vcfutils.computeHaplotypeScore", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_genotype); __Pyx_XDECREF((PyObject *)__pyx_v_hap1); __Pyx_XDECREF((PyObject *)__pyx_v_hap2); __Pyx_XDECREF(__pyx_v_hapScores); __Pyx_XDECREF(__pyx_v_HapScores); __Pyx_XDECREF(__pyx_v_hapScoreClusters); __Pyx_XDECREF(__pyx_v_dist); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_HapScore); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":864 * ################################################################################################### * * cdef dict getHaplotypeInfo(list haplotypes, dict variantPosteriors, double* haplotypeFrequencies, int nHaplotypes): # <<<<<<<<<<<<<< * """ * Some info is computed at the haplotype level. Sort this */ static PyObject *__pyx_f_8vcfutils_getHaplotypeInfo(PyObject *__pyx_v_haplotypes, PyObject *__pyx_v_variantPosteriors, double *__pyx_v_haplotypeFrequencies, int __pyx_v_nHaplotypes) { struct __pyx_obj_10chaplotype_Haplotype *__pyx_v_haplotype = 0; struct __pyx_obj_7variant_Variant *__pyx_v_var = 0; int __pyx_v_hapIndex; PyObject *__pyx_v_INFO = 0; PyObject *__pyx_v_PP = 0; double __pyx_v_FR; double __pyx_v_posteriorProbThisVar; PyObject *__pyx_v_hapINFO = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; double __pyx_t_10; PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getHaplotypeInfo", 0); /* "vcfutils.pyx":871 * cdef Haplotype haplotype * cdef Variant var * cdef int hapIndex = 0 # <<<<<<<<<<<<<< * cdef dict hapInfo * cdef dict INFO = {} */ __pyx_v_hapIndex = 0; /* "vcfutils.pyx":873 * cdef int hapIndex = 0 * cdef dict hapInfo * cdef dict INFO = {} # <<<<<<<<<<<<<< * cdef str PP * cdef double FR = 0.0 */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_INFO = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":875 * cdef dict INFO = {} * cdef str PP * cdef double FR = 0.0 # <<<<<<<<<<<<<< * cdef double posteriorProbThisVar * */ __pyx_v_FR = 0.0; /* "vcfutils.pyx":879 * * # Start INFO calculations * for hapIndex from 0 <= hapIndex < nHaplotypes: # <<<<<<<<<<<<<< * * haplotype = haplotypes[hapIndex] */ __pyx_t_2 = __pyx_v_nHaplotypes; for (__pyx_v_hapIndex = 0; __pyx_v_hapIndex < __pyx_t_2; __pyx_v_hapIndex++) { /* "vcfutils.pyx":881 * for hapIndex from 0 <= hapIndex < nHaplotypes: * * haplotype = haplotypes[hapIndex] # <<<<<<<<<<<<<< * hapINFO = haplotype.vcfINFO() * */ if (unlikely(((PyObject *)__pyx_v_haplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_haplotypes), __pyx_v_hapIndex, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10chaplotype_Haplotype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_haplotype)); __pyx_v_haplotype = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":882 * * haplotype = haplotypes[hapIndex] * hapINFO = haplotype.vcfINFO() # <<<<<<<<<<<<<< * * for var,value in hapINFO.iteritems(): */ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_10chaplotype_Haplotype *)__pyx_v_haplotype->__pyx_vtab)->vcfINFO(__pyx_v_haplotype)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(((PyObject *)__pyx_v_hapINFO)); __pyx_v_hapINFO = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":884 * hapINFO = haplotype.vcfINFO() * * for var,value in hapINFO.iteritems(): # <<<<<<<<<<<<<< * * # Skip low-posterior variants */ __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_hapINFO) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_dict_iterator(((PyObject *)__pyx_v_hapINFO), 1, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_var)); __pyx_v_var = ((struct __pyx_obj_7variant_Variant *)__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_value); __pyx_v_value = __pyx_t_7; __pyx_t_7 = 0; /* "vcfutils.pyx":887 * * # Skip low-posterior variants * if var not in variantPosteriors: # <<<<<<<<<<<<<< * continue * */ if (unlikely(((PyObject *)__pyx_v_variantPosteriors) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_9 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_v_var), ((PyObject *)__pyx_v_variantPosteriors), Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "vcfutils.pyx":888 * # Skip low-posterior variants * if var not in variantPosteriors: * continue # <<<<<<<<<<<<<< * * if var not in INFO: */ goto __pyx_L5_continue; goto __pyx_L7; } __pyx_L7:; /* "vcfutils.pyx":890 * continue * * if var not in INFO: # <<<<<<<<<<<<<< * posteriorProbThisVar = variantPosteriors[var] * PP = "%.0f" %(posteriorProbThisVar) */ __pyx_t_9 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_v_var), ((PyObject *)__pyx_v_INFO), Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "vcfutils.pyx":891 * * if var not in INFO: * posteriorProbThisVar = variantPosteriors[var] # <<<<<<<<<<<<<< * PP = "%.0f" %(posteriorProbThisVar) * FR = haplotypeFrequencies[hapIndex] */ if (unlikely(((PyObject *)__pyx_v_variantPosteriors) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_variantPosteriors), ((PyObject *)__pyx_v_var)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_posteriorProbThisVar = __pyx_t_10; /* "vcfutils.pyx":892 * if var not in INFO: * posteriorProbThisVar = variantPosteriors[var] * PP = "%.0f" %(posteriorProbThisVar) # <<<<<<<<<<<<<< * FR = haplotypeFrequencies[hapIndex] * INFO[var] = dict(HP=value['HP'], PP=[PP], FR=[FR], SC=value['SC']) */ __pyx_t_7 = PyFloat_FromDouble(__pyx_v_posteriorProbThisVar); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_PP)); __pyx_v_PP = __pyx_t_6; __pyx_t_6 = 0; /* "vcfutils.pyx":893 * posteriorProbThisVar = variantPosteriors[var] * PP = "%.0f" %(posteriorProbThisVar) * FR = haplotypeFrequencies[hapIndex] # <<<<<<<<<<<<<< * INFO[var] = dict(HP=value['HP'], PP=[PP], FR=[FR], SC=value['SC']) * else: */ __pyx_v_FR = (__pyx_v_haplotypeFrequencies[__pyx_v_hapIndex]); /* "vcfutils.pyx":894 * PP = "%.0f" %(posteriorProbThisVar) * FR = haplotypeFrequencies[hapIndex] * INFO[var] = dict(HP=value['HP'], PP=[PP], FR=[FR], SC=value['SC']) # <<<<<<<<<<<<<< * else: * INFO[var]['FR'][0] += haplotypeFrequencies[hapIndex] */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_7 = PyObject_GetItem(__pyx_v_value, ((PyObject *)__pyx_n_s__HP)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__HP), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_PP)); PyList_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_PP)); __Pyx_GIVEREF(((PyObject *)__pyx_v_PP)); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__PP), ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyFloat_FromDouble(__pyx_v_FR); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__FR), ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyObject_GetItem(__pyx_v_value, ((PyObject *)__pyx_n_s__SC)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__SC), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_var), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L8; } /*else*/ { /* "vcfutils.pyx":896 * INFO[var] = dict(HP=value['HP'], PP=[PP], FR=[FR], SC=value['SC']) * else: * INFO[var]['FR'][0] += haplotypeFrequencies[hapIndex] # <<<<<<<<<<<<<< * * return INFO */ __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_var)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyObject_GetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__FR)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = 0; __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_11, __pyx_t_12, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyFloat_FromDouble((__pyx_v_haplotypeFrequencies[__pyx_v_hapIndex])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_SetItemInt(__pyx_t_11, __pyx_t_12, __pyx_t_13, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __pyx_L8:; __pyx_L5_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "vcfutils.pyx":898 * INFO[var]['FR'][0] += haplotypeFrequencies[hapIndex] * * return INFO # <<<<<<<<<<<<<< * * ################################################################################################### */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_INFO)); __pyx_r = __pyx_v_INFO; goto __pyx_L0; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("vcfutils.getHaplotypeInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_haplotype); __Pyx_XDECREF((PyObject *)__pyx_v_var); __Pyx_XDECREF(__pyx_v_INFO); __Pyx_XDECREF(__pyx_v_PP); __Pyx_XDECREF(__pyx_v_hapINFO); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":902 * ################################################################################################### * * cdef double computeAlleleBiasPValue(int totalReads, int variantReads): # <<<<<<<<<<<<<< * """ * Compute and return allele-bias p-value */ static double __pyx_f_8vcfutils_computeAlleleBiasPValue(int __pyx_v_totalReads, int __pyx_v_variantReads) { double __pyx_v_pValue; double __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; double __pyx_t_4; double __pyx_t_5; double __pyx_t_6; __Pyx_RefNannySetupContext("computeAlleleBiasPValue", 0); /* "vcfutils.pyx":906 * Compute and return allele-bias p-value * """ * cdef double pValue = 0.0 # <<<<<<<<<<<<<< * * # Frequency is higher than het. */ __pyx_v_pValue = 0.0; /* "vcfutils.pyx":909 * * # Frequency is higher than het. * if totalReads > 0 and variantReads / (totalReads) >= 0.5: # <<<<<<<<<<<<<< * return 1.0 * */ __pyx_t_1 = (__pyx_v_totalReads > 0); if (__pyx_t_1) { __pyx_t_2 = ((((double)__pyx_v_variantReads) / ((double)__pyx_v_totalReads)) >= 0.5); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "vcfutils.pyx":910 * # Frequency is higher than het. * if totalReads > 0 and variantReads / (totalReads) >= 0.5: * return 1.0 # <<<<<<<<<<<<<< * * # No reads touching variant */ __pyx_r = 1.0; goto __pyx_L0; goto __pyx_L3; } /* "vcfutils.pyx":913 * * # No reads touching variant * elif totalReads == 0: # <<<<<<<<<<<<<< * return 1.0 * */ __pyx_t_3 = (__pyx_v_totalReads == 0); if (__pyx_t_3) { /* "vcfutils.pyx":914 * # No reads touching variant * elif totalReads == 0: * return 1.0 # <<<<<<<<<<<<<< * * # Compare total variant reads to total coverage, and computed frequency */ __pyx_r = 1.0; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "vcfutils.pyx":918 * # Compare total variant reads to total coverage, and computed frequency * else: * pValue = betaBinomialCDF(variantReads, totalReads, 20, 20) # <<<<<<<<<<<<<< * return min(pValue, 1.0-pValue) * */ __pyx_v_pValue = __pyx_f_13platypusutils_betaBinomialCDF(__pyx_v_variantReads, __pyx_v_totalReads, 20, 20); /* "vcfutils.pyx":919 * else: * pValue = betaBinomialCDF(variantReads, totalReads, 20, 20) * return min(pValue, 1.0-pValue) # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_4 = (1.0 - __pyx_v_pValue); __pyx_t_5 = __pyx_v_pValue; if ((__pyx_t_4 < __pyx_t_5)) { __pyx_t_6 = __pyx_t_4; } else { __pyx_t_6 = __pyx_t_5; } __pyx_r = __pyx_t_6; goto __pyx_L0; } __pyx_L3:; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":923 * ################################################################################################### * * cdef double computeStrandBiasPValue(int nFwdReads, int nRevReads, int nFwdVarReads, int nRevVarReads): # <<<<<<<<<<<<<< * """ * Compute and return a binomial p-value for the number of reads supporting a */ static double __pyx_f_8vcfutils_computeStrandBiasPValue(int __pyx_v_nFwdReads, int __pyx_v_nRevReads, int __pyx_v_nFwdVarReads, int __pyx_v_nRevVarReads) { int __pyx_v_alpha; int __pyx_v_beta; double __pyx_v_pVal; double __pyx_v_freq; int __pyx_v_useForward; double __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("computeStrandBiasPValue", 0); /* "vcfutils.pyx":928 * variant on the forward/reverse strand. * """ * cdef int alpha = 0 # <<<<<<<<<<<<<< * cdef int beta = 0 * cdef double pVal = 0.0 */ __pyx_v_alpha = 0; /* "vcfutils.pyx":929 * """ * cdef int alpha = 0 * cdef int beta = 0 # <<<<<<<<<<<<<< * cdef double pVal = 0.0 * cdef double freq = 0.0 */ __pyx_v_beta = 0; /* "vcfutils.pyx":930 * cdef int alpha = 0 * cdef int beta = 0 * cdef double pVal = 0.0 # <<<<<<<<<<<<<< * cdef double freq = 0.0 * cdef int useForward = True */ __pyx_v_pVal = 0.0; /* "vcfutils.pyx":931 * cdef int beta = 0 * cdef double pVal = 0.0 * cdef double freq = 0.0 # <<<<<<<<<<<<<< * cdef int useForward = True * */ __pyx_v_freq = 0.0; /* "vcfutils.pyx":932 * cdef double pVal = 0.0 * cdef double freq = 0.0 * cdef int useForward = True # <<<<<<<<<<<<<< * * if nFwdReads < nRevReads: */ __pyx_v_useForward = 1; /* "vcfutils.pyx":934 * cdef int useForward = True * * if nFwdReads < nRevReads: # <<<<<<<<<<<<<< * useForward = False * */ __pyx_t_1 = (__pyx_v_nFwdReads < __pyx_v_nRevReads); if (__pyx_t_1) { /* "vcfutils.pyx":935 * * if nFwdReads < nRevReads: * useForward = False # <<<<<<<<<<<<<< * * if nFwdReads + nRevReads > 0 and nFwdVarReads + nRevVarReads > 0: */ __pyx_v_useForward = 0; goto __pyx_L3; } __pyx_L3:; /* "vcfutils.pyx":937 * useForward = False * * if nFwdReads + nRevReads > 0 and nFwdVarReads + nRevVarReads > 0: # <<<<<<<<<<<<<< * * if useForward: */ __pyx_t_1 = ((__pyx_v_nFwdReads + __pyx_v_nRevReads) > 0); if (__pyx_t_1) { __pyx_t_2 = ((__pyx_v_nFwdVarReads + __pyx_v_nRevVarReads) > 0); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "vcfutils.pyx":939 * if nFwdReads + nRevReads > 0 and nFwdVarReads + nRevVarReads > 0: * * if useForward: # <<<<<<<<<<<<<< * freq = (nFwdReads) / (nFwdReads + nRevReads) * else: */ if (__pyx_v_useForward) { /* "vcfutils.pyx":940 * * if useForward: * freq = (nFwdReads) / (nFwdReads + nRevReads) # <<<<<<<<<<<<<< * else: * freq = (nRevReads) / (nFwdReads + nRevReads) */ __pyx_v_freq = (((double)__pyx_v_nFwdReads) / ((double)(__pyx_v_nFwdReads + __pyx_v_nRevReads))); goto __pyx_L5; } /*else*/ { /* "vcfutils.pyx":942 * freq = (nFwdReads) / (nFwdReads + nRevReads) * else: * freq = (nRevReads) / (nFwdReads + nRevReads) # <<<<<<<<<<<<<< * * if freq < 0.5: */ __pyx_v_freq = (((double)__pyx_v_nRevReads) / ((double)(__pyx_v_nFwdReads + __pyx_v_nRevReads))); } __pyx_L5:; /* "vcfutils.pyx":944 * freq = (nRevReads) / (nFwdReads + nRevReads) * * if freq < 0.5: # <<<<<<<<<<<<<< * alpha = 20 * beta = int((alpha)/freq - alpha) */ __pyx_t_3 = (__pyx_v_freq < 0.5); if (__pyx_t_3) { /* "vcfutils.pyx":945 * * if freq < 0.5: * alpha = 20 # <<<<<<<<<<<<<< * beta = int((alpha)/freq - alpha) * */ __pyx_v_alpha = 20; /* "vcfutils.pyx":946 * if freq < 0.5: * alpha = 20 * beta = int((alpha)/freq - alpha) # <<<<<<<<<<<<<< * * elif freq > 0.5: */ __pyx_v_beta = ((int)((((double)__pyx_v_alpha) / __pyx_v_freq) - __pyx_v_alpha)); goto __pyx_L6; } /* "vcfutils.pyx":948 * beta = int((alpha)/freq - alpha) * * elif freq > 0.5: # <<<<<<<<<<<<<< * beta = 20 * alpha = int(beta*freq/(1.0-freq)) */ __pyx_t_3 = (__pyx_v_freq > 0.5); if (__pyx_t_3) { /* "vcfutils.pyx":949 * * elif freq > 0.5: * beta = 20 # <<<<<<<<<<<<<< * alpha = int(beta*freq/(1.0-freq)) * */ __pyx_v_beta = 20; /* "vcfutils.pyx":950 * elif freq > 0.5: * beta = 20 * alpha = int(beta*freq/(1.0-freq)) # <<<<<<<<<<<<<< * * else: */ __pyx_v_alpha = ((int)((__pyx_v_beta * __pyx_v_freq) / (1.0 - __pyx_v_freq))); goto __pyx_L6; } /*else*/ { /* "vcfutils.pyx":953 * * else: * alpha = 20 # <<<<<<<<<<<<<< * beta = 20 * */ __pyx_v_alpha = 20; /* "vcfutils.pyx":954 * else: * alpha = 20 * beta = 20 # <<<<<<<<<<<<<< * * if useForward: */ __pyx_v_beta = 20; } __pyx_L6:; /* "vcfutils.pyx":956 * beta = 20 * * if useForward: # <<<<<<<<<<<<<< * pVal = betaBinomialCDF(nFwdVarReads, nFwdVarReads+nRevVarReads, alpha, beta) * else: */ if (__pyx_v_useForward) { /* "vcfutils.pyx":957 * * if useForward: * pVal = betaBinomialCDF(nFwdVarReads, nFwdVarReads+nRevVarReads, alpha, beta) # <<<<<<<<<<<<<< * else: * pVal = betaBinomialCDF(nRevVarReads, nFwdVarReads+nRevVarReads, alpha, beta) */ __pyx_v_pVal = __pyx_f_13platypusutils_betaBinomialCDF(__pyx_v_nFwdVarReads, (__pyx_v_nFwdVarReads + __pyx_v_nRevVarReads), __pyx_v_alpha, __pyx_v_beta); goto __pyx_L7; } /*else*/ { /* "vcfutils.pyx":959 * pVal = betaBinomialCDF(nFwdVarReads, nFwdVarReads+nRevVarReads, alpha, beta) * else: * pVal = betaBinomialCDF(nRevVarReads, nFwdVarReads+nRevVarReads, alpha, beta) # <<<<<<<<<<<<<< * * return pVal */ __pyx_v_pVal = __pyx_f_13platypusutils_betaBinomialCDF(__pyx_v_nRevVarReads, (__pyx_v_nFwdVarReads + __pyx_v_nRevVarReads), __pyx_v_alpha, __pyx_v_beta); } __pyx_L7:; /* "vcfutils.pyx":961 * pVal = betaBinomialCDF(nRevVarReads, nFwdVarReads+nRevVarReads, alpha, beta) * * return pVal # <<<<<<<<<<<<<< * else: * return 1.0 */ __pyx_r = __pyx_v_pVal; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "vcfutils.pyx":963 * return pVal * else: * return 1.0 # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = 1.0; goto __pyx_L0; } __pyx_L4:; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":967 * ################################################################################################### * * cdef dict vcfINFO(double* haplotypeFrequencies, dict variantPosteriors, list genotypeCalls, list genotypes, list haplotypes, list readBuffers, int nHaplotypes, options, FastaFile refFile): # <<<<<<<<<<<<<< * """ * INFO field for vcf output, two level dictionary of variant - info field - value */ static PyObject *__pyx_f_8vcfutils_vcfINFO(double *__pyx_v_haplotypeFrequencies, PyObject *__pyx_v_variantPosteriors, PyObject *__pyx_v_genotypeCalls, PyObject *__pyx_v_genotypes, PyObject *__pyx_v_haplotypes, PyObject *__pyx_v_readBuffers, int __pyx_v_nHaplotypes, PyObject *__pyx_v_options, struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile) { struct __pyx_obj_7variant_Variant *__pyx_v_variant = 0; PyObject *__pyx_v_nReadsPerSample = 0; PyObject *__pyx_v_nVarReadsPerSample = 0; PyObject *__pyx_v_listOfMinBaseQuals = 0; CYTHON_UNUSED double __pyx_v_BRF; int __pyx_v_badReadsWindow; CYTHON_UNUSED int __pyx_v_verbosity; CYTHON_UNUSED int __pyx_v_minMapQual; int __pyx_v_minBaseQual; int __pyx_v_nReadsThisSample; int __pyx_v_nVarReadsThisSample; int __pyx_v_nBadReads; int __pyx_v_nGoodReads; int __pyx_v_index; int __pyx_v_varBAMMinPos; int __pyx_v_varBAMMaxPos; int __pyx_v_TC; int __pyx_v_TC_bad; int __pyx_v_TR; int __pyx_v_TC_ab; int __pyx_v_TR_ab; int __pyx_v_NR_sb; int __pyx_v_NF_sb; int __pyx_v_TCR; int __pyx_v_TCF; int __pyx_v_TCR_sb; int __pyx_v_TCF_sb; int __pyx_v_minBaseQualInWindow; int __pyx_v_windowStart; int __pyx_v_windowSize; int __pyx_v_windowEnd; int __pyx_v_windowIndex; CYTHON_UNUSED int __pyx_v_startPosOfVarInRead; float __pyx_v_RMSMQ; int __pyx_v_varInGenotype; __pyx_t_15samtoolsWrapper_cAlignedRead **__pyx_v_pStartRead; __pyx_t_15samtoolsWrapper_cAlignedRead **__pyx_v_pEndRead; __pyx_t_15samtoolsWrapper_cAlignedRead **__pyx_v_pStartBadRead; __pyx_t_15samtoolsWrapper_cAlignedRead **__pyx_v_pEndBadRead; __pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_pRead; struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_readBuffer = 0; int __pyx_v_HapScore; PyObject *__pyx_v_INFO = 0; CYTHON_UNUSED PyObject *__pyx_v_sortedVars = 0; PyObject *__pyx_v_NR = NULL; PyObject *__pyx_v_NF = NULL; PyObject *__pyx_v_genotype = NULL; double __pyx_v_qual; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; __pyx_t_15samtoolsWrapper_cAlignedRead **__pyx_t_12; int __pyx_t_13; long __pyx_t_14; long __pyx_t_15; long __pyx_t_16; short __pyx_t_17; int __pyx_t_18; char __pyx_t_19; int __pyx_t_20; int __pyx_t_21; int __pyx_t_22; double __pyx_t_23; PyObject *__pyx_t_24 = NULL; Py_ssize_t __pyx_t_25; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("vcfINFO", 0); /* "vcfutils.pyx":974 * cdef list nReadsPerSample * cdef list nVarReadsPerSample * cdef list listOfMinBaseQuals = [] # <<<<<<<<<<<<<< * cdef double BRF = 0.0 * cdef int badReadsWindow = options.badReadsWindow */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_listOfMinBaseQuals = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":975 * cdef list nVarReadsPerSample * cdef list listOfMinBaseQuals = [] * cdef double BRF = 0.0 # <<<<<<<<<<<<<< * cdef int badReadsWindow = options.badReadsWindow * cdef int verbosity = options.verbosity */ __pyx_v_BRF = 0.0; /* "vcfutils.pyx":976 * cdef list listOfMinBaseQuals = [] * cdef double BRF = 0.0 * cdef int badReadsWindow = options.badReadsWindow # <<<<<<<<<<<<<< * cdef int verbosity = options.verbosity * cdef int minMapQual = options.minMapQual */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__badReadsWindow); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_badReadsWindow = __pyx_t_2; /* "vcfutils.pyx":977 * cdef double BRF = 0.0 * cdef int badReadsWindow = options.badReadsWindow * cdef int verbosity = options.verbosity # <<<<<<<<<<<<<< * cdef int minMapQual = options.minMapQual * cdef int minBaseQual = options.minBaseQual */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_verbosity = __pyx_t_2; /* "vcfutils.pyx":978 * cdef int badReadsWindow = options.badReadsWindow * cdef int verbosity = options.verbosity * cdef int minMapQual = options.minMapQual # <<<<<<<<<<<<<< * cdef int minBaseQual = options.minBaseQual * cdef int nReadsThisSample = 0 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minMapQual); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_minMapQual = __pyx_t_2; /* "vcfutils.pyx":979 * cdef int verbosity = options.verbosity * cdef int minMapQual = options.minMapQual * cdef int minBaseQual = options.minBaseQual # <<<<<<<<<<<<<< * cdef int nReadsThisSample = 0 * cdef int nVarReadsThisSample = 0 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minBaseQual); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_minBaseQual = __pyx_t_2; /* "vcfutils.pyx":980 * cdef int minMapQual = options.minMapQual * cdef int minBaseQual = options.minBaseQual * cdef int nReadsThisSample = 0 # <<<<<<<<<<<<<< * cdef int nVarReadsThisSample = 0 * cdef int nBadReads = 0 */ __pyx_v_nReadsThisSample = 0; /* "vcfutils.pyx":981 * cdef int minBaseQual = options.minBaseQual * cdef int nReadsThisSample = 0 * cdef int nVarReadsThisSample = 0 # <<<<<<<<<<<<<< * cdef int nBadReads = 0 * cdef int nGoodReads = 0 */ __pyx_v_nVarReadsThisSample = 0; /* "vcfutils.pyx":982 * cdef int nReadsThisSample = 0 * cdef int nVarReadsThisSample = 0 * cdef int nBadReads = 0 # <<<<<<<<<<<<<< * cdef int nGoodReads = 0 * cdef int index = 0 */ __pyx_v_nBadReads = 0; /* "vcfutils.pyx":983 * cdef int nVarReadsThisSample = 0 * cdef int nBadReads = 0 * cdef int nGoodReads = 0 # <<<<<<<<<<<<<< * cdef int index = 0 * cdef int varBAMMinPos = 0 */ __pyx_v_nGoodReads = 0; /* "vcfutils.pyx":984 * cdef int nBadReads = 0 * cdef int nGoodReads = 0 * cdef int index = 0 # <<<<<<<<<<<<<< * cdef int varBAMMinPos = 0 * cdef int varBAMMaxPos = 0 */ __pyx_v_index = 0; /* "vcfutils.pyx":985 * cdef int nGoodReads = 0 * cdef int index = 0 * cdef int varBAMMinPos = 0 # <<<<<<<<<<<<<< * cdef int varBAMMaxPos = 0 * cdef int TC = 0 */ __pyx_v_varBAMMinPos = 0; /* "vcfutils.pyx":986 * cdef int index = 0 * cdef int varBAMMinPos = 0 * cdef int varBAMMaxPos = 0 # <<<<<<<<<<<<<< * cdef int TC = 0 * cdef int TC_bad = 0 */ __pyx_v_varBAMMaxPos = 0; /* "vcfutils.pyx":987 * cdef int varBAMMinPos = 0 * cdef int varBAMMaxPos = 0 * cdef int TC = 0 # <<<<<<<<<<<<<< * cdef int TC_bad = 0 * cdef int TR = 0 */ __pyx_v_TC = 0; /* "vcfutils.pyx":988 * cdef int varBAMMaxPos = 0 * cdef int TC = 0 * cdef int TC_bad = 0 # <<<<<<<<<<<<<< * cdef int TR = 0 * cdef int TC_ab = 0 */ __pyx_v_TC_bad = 0; /* "vcfutils.pyx":989 * cdef int TC = 0 * cdef int TC_bad = 0 * cdef int TR = 0 # <<<<<<<<<<<<<< * cdef int TC_ab = 0 * cdef int TR_ab = 0 */ __pyx_v_TR = 0; /* "vcfutils.pyx":990 * cdef int TC_bad = 0 * cdef int TR = 0 * cdef int TC_ab = 0 # <<<<<<<<<<<<<< * cdef int TR_ab = 0 * cdef int NR_sb = 0 */ __pyx_v_TC_ab = 0; /* "vcfutils.pyx":991 * cdef int TR = 0 * cdef int TC_ab = 0 * cdef int TR_ab = 0 # <<<<<<<<<<<<<< * cdef int NR_sb = 0 * cdef int NF_sb = 0 */ __pyx_v_TR_ab = 0; /* "vcfutils.pyx":992 * cdef int TC_ab = 0 * cdef int TR_ab = 0 * cdef int NR_sb = 0 # <<<<<<<<<<<<<< * cdef int NF_sb = 0 * cdef int TCR = 0 */ __pyx_v_NR_sb = 0; /* "vcfutils.pyx":993 * cdef int TR_ab = 0 * cdef int NR_sb = 0 * cdef int NF_sb = 0 # <<<<<<<<<<<<<< * cdef int TCR = 0 * cdef int TCF = 0 */ __pyx_v_NF_sb = 0; /* "vcfutils.pyx":994 * cdef int NR_sb = 0 * cdef int NF_sb = 0 * cdef int TCR = 0 # <<<<<<<<<<<<<< * cdef int TCF = 0 * cdef int TCR_sb = 0 */ __pyx_v_TCR = 0; /* "vcfutils.pyx":995 * cdef int NF_sb = 0 * cdef int TCR = 0 * cdef int TCF = 0 # <<<<<<<<<<<<<< * cdef int TCR_sb = 0 * cdef int TCF_sb = 0 */ __pyx_v_TCF = 0; /* "vcfutils.pyx":996 * cdef int TCR = 0 * cdef int TCF = 0 * cdef int TCR_sb = 0 # <<<<<<<<<<<<<< * cdef int TCF_sb = 0 * cdef int minBaseQualInWindow = 0 */ __pyx_v_TCR_sb = 0; /* "vcfutils.pyx":997 * cdef int TCF = 0 * cdef int TCR_sb = 0 * cdef int TCF_sb = 0 # <<<<<<<<<<<<<< * cdef int minBaseQualInWindow = 0 * cdef int windowStart = 0 */ __pyx_v_TCF_sb = 0; /* "vcfutils.pyx":998 * cdef int TCR_sb = 0 * cdef int TCF_sb = 0 * cdef int minBaseQualInWindow = 0 # <<<<<<<<<<<<<< * cdef int windowStart = 0 * cdef int windowSize = badReadsWindow */ __pyx_v_minBaseQualInWindow = 0; /* "vcfutils.pyx":999 * cdef int TCF_sb = 0 * cdef int minBaseQualInWindow = 0 * cdef int windowStart = 0 # <<<<<<<<<<<<<< * cdef int windowSize = badReadsWindow * cdef int windowEnd = 0 */ __pyx_v_windowStart = 0; /* "vcfutils.pyx":1000 * cdef int minBaseQualInWindow = 0 * cdef int windowStart = 0 * cdef int windowSize = badReadsWindow # <<<<<<<<<<<<<< * cdef int windowEnd = 0 * cdef int windowIndex = 0 */ __pyx_v_windowSize = __pyx_v_badReadsWindow; /* "vcfutils.pyx":1001 * cdef int windowStart = 0 * cdef int windowSize = badReadsWindow * cdef int windowEnd = 0 # <<<<<<<<<<<<<< * cdef int windowIndex = 0 * cdef int startPosOfVarInRead = 0 */ __pyx_v_windowEnd = 0; /* "vcfutils.pyx":1002 * cdef int windowSize = badReadsWindow * cdef int windowEnd = 0 * cdef int windowIndex = 0 # <<<<<<<<<<<<<< * cdef int startPosOfVarInRead = 0 * cdef float RMSMQ = 0 */ __pyx_v_windowIndex = 0; /* "vcfutils.pyx":1003 * cdef int windowEnd = 0 * cdef int windowIndex = 0 * cdef int startPosOfVarInRead = 0 # <<<<<<<<<<<<<< * cdef float RMSMQ = 0 * cdef bint varInGenotype = False */ __pyx_v_startPosOfVarInRead = 0; /* "vcfutils.pyx":1004 * cdef int windowIndex = 0 * cdef int startPosOfVarInRead = 0 * cdef float RMSMQ = 0 # <<<<<<<<<<<<<< * cdef bint varInGenotype = False * cdef cAlignedRead** pStartRead */ __pyx_v_RMSMQ = 0.0; /* "vcfutils.pyx":1005 * cdef int startPosOfVarInRead = 0 * cdef float RMSMQ = 0 * cdef bint varInGenotype = False # <<<<<<<<<<<<<< * cdef cAlignedRead** pStartRead * cdef cAlignedRead** pEndRead */ __pyx_v_varInGenotype = 0; /* "vcfutils.pyx":1014 * * # Make sure to do this in the right order * cdef int HapScore = computeHaplotypeScore(genotypes) # <<<<<<<<<<<<<< * cdef dict INFO = getHaplotypeInfo(haplotypes, variantPosteriors, haplotypeFrequencies, nHaplotypes) * cdef list sortedVars = sorted(INFO.keys()) */ __pyx_v_HapScore = __pyx_f_8vcfutils_computeHaplotypeScore(__pyx_v_genotypes); /* "vcfutils.pyx":1015 * # Make sure to do this in the right order * cdef int HapScore = computeHaplotypeScore(genotypes) * cdef dict INFO = getHaplotypeInfo(haplotypes, variantPosteriors, haplotypeFrequencies, nHaplotypes) # <<<<<<<<<<<<<< * cdef list sortedVars = sorted(INFO.keys()) * */ __pyx_t_1 = ((PyObject *)__pyx_f_8vcfutils_getHaplotypeInfo(__pyx_v_haplotypes, __pyx_v_variantPosteriors, __pyx_v_haplotypeFrequencies, __pyx_v_nHaplotypes)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_INFO = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":1016 * cdef int HapScore = computeHaplotypeScore(genotypes) * cdef dict INFO = getHaplotypeInfo(haplotypes, variantPosteriors, haplotypeFrequencies, nHaplotypes) * cdef list sortedVars = sorted(INFO.keys()) # <<<<<<<<<<<<<< * * for variant in INFO: */ if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyDict_Keys(__pyx_v_INFO); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sortedVars = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":1018 * cdef list sortedVars = sorted(INFO.keys()) * * for variant in INFO: # <<<<<<<<<<<<<< * * listOfMinBaseQuals = [] */ __pyx_t_4 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_dict_iterator(((PyObject *)__pyx_v_INFO), 1, ((PyObject *)NULL), (&__pyx_t_5), (&__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; while (1) { __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_5, &__pyx_t_4, &__pyx_t_3, NULL, NULL, __pyx_t_2); if (unlikely(__pyx_t_6 == 0)) break; if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_variant)); __pyx_v_variant = ((struct __pyx_obj_7variant_Variant *)__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":1020 * for variant in INFO: * * listOfMinBaseQuals = [] # <<<<<<<<<<<<<< * nReadsPerSample = [] * nVarReadsPerSample = [] */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_v_listOfMinBaseQuals)); __pyx_v_listOfMinBaseQuals = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":1021 * * listOfMinBaseQuals = [] * nReadsPerSample = [] # <<<<<<<<<<<<<< * nVarReadsPerSample = [] * nGoodReads = 0 */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(((PyObject *)__pyx_v_nReadsPerSample)); __pyx_v_nReadsPerSample = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":1022 * listOfMinBaseQuals = [] * nReadsPerSample = [] * nVarReadsPerSample = [] # <<<<<<<<<<<<<< * nGoodReads = 0 * nBadReads = 0 */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(((PyObject *)__pyx_v_nVarReadsPerSample)); __pyx_v_nVarReadsPerSample = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":1023 * nReadsPerSample = [] * nVarReadsPerSample = [] * nGoodReads = 0 # <<<<<<<<<<<<<< * nBadReads = 0 * RMSMQ = 0 */ __pyx_v_nGoodReads = 0; /* "vcfutils.pyx":1024 * nVarReadsPerSample = [] * nGoodReads = 0 * nBadReads = 0 # <<<<<<<<<<<<<< * RMSMQ = 0 * TC = 0 */ __pyx_v_nBadReads = 0; /* "vcfutils.pyx":1025 * nGoodReads = 0 * nBadReads = 0 * RMSMQ = 0 # <<<<<<<<<<<<<< * TC = 0 * TC_bad = 0 */ __pyx_v_RMSMQ = 0.0; /* "vcfutils.pyx":1026 * nBadReads = 0 * RMSMQ = 0 * TC = 0 # <<<<<<<<<<<<<< * TC_bad = 0 * TR = 0 */ __pyx_v_TC = 0; /* "vcfutils.pyx":1027 * RMSMQ = 0 * TC = 0 * TC_bad = 0 # <<<<<<<<<<<<<< * TR = 0 * TC_ab = 0 */ __pyx_v_TC_bad = 0; /* "vcfutils.pyx":1028 * TC = 0 * TC_bad = 0 * TR = 0 # <<<<<<<<<<<<<< * TC_ab = 0 * TR_ab = 0 */ __pyx_v_TR = 0; /* "vcfutils.pyx":1029 * TC_bad = 0 * TR = 0 * TC_ab = 0 # <<<<<<<<<<<<<< * TR_ab = 0 * TCR = 0 */ __pyx_v_TC_ab = 0; /* "vcfutils.pyx":1030 * TR = 0 * TC_ab = 0 * TR_ab = 0 # <<<<<<<<<<<<<< * TCR = 0 * TCF = 0 */ __pyx_v_TR_ab = 0; /* "vcfutils.pyx":1031 * TC_ab = 0 * TR_ab = 0 * TCR = 0 # <<<<<<<<<<<<<< * TCF = 0 * NR = 0 */ __pyx_v_TCR = 0; /* "vcfutils.pyx":1032 * TR_ab = 0 * TCR = 0 * TCF = 0 # <<<<<<<<<<<<<< * NR = 0 * NF = 0 */ __pyx_v_TCF = 0; /* "vcfutils.pyx":1033 * TCR = 0 * TCF = 0 * NR = 0 # <<<<<<<<<<<<<< * NF = 0 * NR_sb = 0 */ __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF(__pyx_v_NR); __pyx_v_NR = __pyx_int_0; /* "vcfutils.pyx":1034 * TCF = 0 * NR = 0 * NF = 0 # <<<<<<<<<<<<<< * NR_sb = 0 * NF_sb = 0 */ __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF(__pyx_v_NF); __pyx_v_NF = __pyx_int_0; /* "vcfutils.pyx":1035 * NR = 0 * NF = 0 * NR_sb = 0 # <<<<<<<<<<<<<< * NF_sb = 0 * TCR_sb = 0 */ __pyx_v_NR_sb = 0; /* "vcfutils.pyx":1036 * NF = 0 * NR_sb = 0 * NF_sb = 0 # <<<<<<<<<<<<<< * TCR_sb = 0 * TCF_sb = 0 */ __pyx_v_NF_sb = 0; /* "vcfutils.pyx":1037 * NR_sb = 0 * NF_sb = 0 * TCR_sb = 0 # <<<<<<<<<<<<<< * TCF_sb = 0 * varBAMMinPos = variant.bamMinPos */ __pyx_v_TCR_sb = 0; /* "vcfutils.pyx":1038 * NF_sb = 0 * TCR_sb = 0 * TCF_sb = 0 # <<<<<<<<<<<<<< * varBAMMinPos = variant.bamMinPos * varBAMMaxPos = variant.bamMaxPos */ __pyx_v_TCF_sb = 0; /* "vcfutils.pyx":1039 * TCR_sb = 0 * TCF_sb = 0 * varBAMMinPos = variant.bamMinPos # <<<<<<<<<<<<<< * varBAMMaxPos = variant.bamMaxPos * */ __pyx_t_6 = __pyx_v_variant->bamMinPos; __pyx_v_varBAMMinPos = __pyx_t_6; /* "vcfutils.pyx":1040 * TCF_sb = 0 * varBAMMinPos = variant.bamMinPos * varBAMMaxPos = variant.bamMaxPos # <<<<<<<<<<<<<< * * for index,genotype in enumerate(genotypeCalls): */ __pyx_t_6 = __pyx_v_variant->bamMaxPos; __pyx_v_varBAMMaxPos = __pyx_t_6; /* "vcfutils.pyx":1042 * varBAMMaxPos = variant.bamMaxPos * * for index,genotype in enumerate(genotypeCalls): # <<<<<<<<<<<<<< * * varInGenotype = genotype is not None and variant in genotype */ __pyx_t_6 = 0; __pyx_t_3 = ((PyObject *)__pyx_v_genotypeCalls); __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_genotype); __pyx_v_genotype = __pyx_t_8; __pyx_t_8 = 0; __pyx_v_index = __pyx_t_6; __pyx_t_6 = (__pyx_t_6 + 1); /* "vcfutils.pyx":1044 * for index,genotype in enumerate(genotypeCalls): * * varInGenotype = genotype is not None and variant in genotype # <<<<<<<<<<<<<< * readBuffer = readBuffers[index] * pStartRead = readBuffer.reads.windowStart */ __pyx_t_9 = (__pyx_v_genotype != Py_None); if (__pyx_t_9) { __pyx_t_10 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_variant), __pyx_v_genotype, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } __pyx_v_varInGenotype = __pyx_t_11; /* "vcfutils.pyx":1045 * * varInGenotype = genotype is not None and variant in genotype * readBuffer = readBuffers[index] # <<<<<<<<<<<<<< * pStartRead = readBuffer.reads.windowStart * pEndRead = readBuffer.reads.windowEnd */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_readBuffers), __pyx_v_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_readBuffer)); __pyx_v_readBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_8); __pyx_t_8 = 0; /* "vcfutils.pyx":1046 * varInGenotype = genotype is not None and variant in genotype * readBuffer = readBuffers[index] * pStartRead = readBuffer.reads.windowStart # <<<<<<<<<<<<<< * pEndRead = readBuffer.reads.windowEnd * pStartBadRead = readBuffer.badReads.windowStart */ __pyx_t_12 = __pyx_v_readBuffer->reads->windowStart; __pyx_v_pStartRead = __pyx_t_12; /* "vcfutils.pyx":1047 * readBuffer = readBuffers[index] * pStartRead = readBuffer.reads.windowStart * pEndRead = readBuffer.reads.windowEnd # <<<<<<<<<<<<<< * pStartBadRead = readBuffer.badReads.windowStart * pEndBadRead = readBuffer.badReads.windowEnd */ __pyx_t_12 = __pyx_v_readBuffer->reads->windowEnd; __pyx_v_pEndRead = __pyx_t_12; /* "vcfutils.pyx":1048 * pStartRead = readBuffer.reads.windowStart * pEndRead = readBuffer.reads.windowEnd * pStartBadRead = readBuffer.badReads.windowStart # <<<<<<<<<<<<<< * pEndBadRead = readBuffer.badReads.windowEnd * nGoodReads += (readBuffer.reads.windowEnd - readBuffer.reads.windowStart) */ __pyx_t_12 = __pyx_v_readBuffer->badReads->windowStart; __pyx_v_pStartBadRead = __pyx_t_12; /* "vcfutils.pyx":1049 * pEndRead = readBuffer.reads.windowEnd * pStartBadRead = readBuffer.badReads.windowStart * pEndBadRead = readBuffer.badReads.windowEnd # <<<<<<<<<<<<<< * nGoodReads += (readBuffer.reads.windowEnd - readBuffer.reads.windowStart) * nBadReads += (readBuffer.badReads.windowEnd - readBuffer.badReads.windowStart) */ __pyx_t_12 = __pyx_v_readBuffer->badReads->windowEnd; __pyx_v_pEndBadRead = __pyx_t_12; /* "vcfutils.pyx":1050 * pStartBadRead = readBuffer.badReads.windowStart * pEndBadRead = readBuffer.badReads.windowEnd * nGoodReads += (readBuffer.reads.windowEnd - readBuffer.reads.windowStart) # <<<<<<<<<<<<<< * nBadReads += (readBuffer.badReads.windowEnd - readBuffer.badReads.windowStart) * */ __pyx_v_nGoodReads = (__pyx_v_nGoodReads + (__pyx_v_readBuffer->reads->windowEnd - __pyx_v_readBuffer->reads->windowStart)); /* "vcfutils.pyx":1051 * pEndBadRead = readBuffer.badReads.windowEnd * nGoodReads += (readBuffer.reads.windowEnd - readBuffer.reads.windowStart) * nBadReads += (readBuffer.badReads.windowEnd - readBuffer.badReads.windowStart) # <<<<<<<<<<<<<< * * nReadsThisSample = 0 */ __pyx_v_nBadReads = (__pyx_v_nBadReads + (__pyx_v_readBuffer->badReads->windowEnd - __pyx_v_readBuffer->badReads->windowStart)); /* "vcfutils.pyx":1053 * nBadReads += (readBuffer.badReads.windowEnd - readBuffer.badReads.windowStart) * * nReadsThisSample = 0 # <<<<<<<<<<<<<< * nVarReadsThisSample = 0 * */ __pyx_v_nReadsThisSample = 0; /* "vcfutils.pyx":1054 * * nReadsThisSample = 0 * nVarReadsThisSample = 0 # <<<<<<<<<<<<<< * * while pStartBadRead != pEndBadRead: */ __pyx_v_nVarReadsThisSample = 0; /* "vcfutils.pyx":1056 * nVarReadsThisSample = 0 * * while pStartBadRead != pEndBadRead: # <<<<<<<<<<<<<< * * pRead = pStartBadRead[0] */ while (1) { __pyx_t_11 = (__pyx_v_pStartBadRead != __pyx_v_pEndBadRead); if (!__pyx_t_11) break; /* "vcfutils.pyx":1058 * while pStartBadRead != pEndBadRead: * * pRead = pStartBadRead[0] # <<<<<<<<<<<<<< * * # Does read overlap variant site */ __pyx_v_pRead = (__pyx_v_pStartBadRead[0]); /* "vcfutils.pyx":1061 * * # Does read overlap variant site * if not readOverlapsVariant(pRead, varBAMMinPos, varBAMMaxPos): # <<<<<<<<<<<<<< * pStartBadRead += 1 * continue */ __pyx_t_11 = (!__pyx_f_8vcfutils_readOverlapsVariant(__pyx_v_pRead, __pyx_v_varBAMMinPos, __pyx_v_varBAMMaxPos)); if (__pyx_t_11) { /* "vcfutils.pyx":1062 * # Does read overlap variant site * if not readOverlapsVariant(pRead, varBAMMinPos, varBAMMaxPos): * pStartBadRead += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_pStartBadRead = (__pyx_v_pStartBadRead + 1); /* "vcfutils.pyx":1063 * if not readOverlapsVariant(pRead, varBAMMinPos, varBAMMaxPos): * pStartBadRead += 1 * continue # <<<<<<<<<<<<<< * * # Does read have good quality across variant site */ goto __pyx_L7_continue; goto __pyx_L9; } __pyx_L9:; /* "vcfutils.pyx":1066 * * # Does read have good quality across variant site * if not readQualIsGoodVariantPosition(pRead, varBAMMinPos, varBAMMaxPos, minBaseQual): # <<<<<<<<<<<<<< * pStartBadRead += 1 * continue */ __pyx_t_11 = (!__pyx_f_8vcfutils_readQualIsGoodVariantPosition(__pyx_v_pRead, __pyx_v_varBAMMinPos, __pyx_v_varBAMMaxPos, __pyx_v_minBaseQual)); if (__pyx_t_11) { /* "vcfutils.pyx":1067 * # Does read have good quality across variant site * if not readQualIsGoodVariantPosition(pRead, varBAMMinPos, varBAMMaxPos, minBaseQual): * pStartBadRead += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_pStartBadRead = (__pyx_v_pStartBadRead + 1); /* "vcfutils.pyx":1068 * if not readQualIsGoodVariantPosition(pRead, varBAMMinPos, varBAMMaxPos, minBaseQual): * pStartBadRead += 1 * continue # <<<<<<<<<<<<<< * * TC_bad += 1 */ goto __pyx_L7_continue; goto __pyx_L10; } __pyx_L10:; /* "vcfutils.pyx":1070 * continue * * TC_bad += 1 # <<<<<<<<<<<<<< * RMSMQ += (pRead.mapq*pRead.mapq) * pStartBadRead += 1 */ __pyx_v_TC_bad = (__pyx_v_TC_bad + 1); /* "vcfutils.pyx":1071 * * TC_bad += 1 * RMSMQ += (pRead.mapq*pRead.mapq) # <<<<<<<<<<<<<< * pStartBadRead += 1 * */ __pyx_v_RMSMQ = (__pyx_v_RMSMQ + (__pyx_v_pRead->mapq * __pyx_v_pRead->mapq)); /* "vcfutils.pyx":1072 * TC_bad += 1 * RMSMQ += (pRead.mapq*pRead.mapq) * pStartBadRead += 1 # <<<<<<<<<<<<<< * * while pStartRead != pEndRead: */ __pyx_v_pStartBadRead = (__pyx_v_pStartBadRead + 1); __pyx_L7_continue:; } /* "vcfutils.pyx":1074 * pStartBadRead += 1 * * while pStartRead != pEndRead: # <<<<<<<<<<<<<< * * pRead = pStartRead[0] */ while (1) { __pyx_t_11 = (__pyx_v_pStartRead != __pyx_v_pEndRead); if (!__pyx_t_11) break; /* "vcfutils.pyx":1076 * while pStartRead != pEndRead: * * pRead = pStartRead[0] # <<<<<<<<<<<<<< * * # Does read overlap variant site */ __pyx_v_pRead = (__pyx_v_pStartRead[0]); /* "vcfutils.pyx":1079 * * # Does read overlap variant site * if not readOverlapsVariant(pRead, varBAMMinPos, varBAMMaxPos): # <<<<<<<<<<<<<< * pStartRead += 1 * continue */ __pyx_t_11 = (!__pyx_f_8vcfutils_readOverlapsVariant(__pyx_v_pRead, __pyx_v_varBAMMinPos, __pyx_v_varBAMMaxPos)); if (__pyx_t_11) { /* "vcfutils.pyx":1080 * # Does read overlap variant site * if not readOverlapsVariant(pRead, varBAMMinPos, varBAMMaxPos): * pStartRead += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_pStartRead = (__pyx_v_pStartRead + 1); /* "vcfutils.pyx":1081 * if not readOverlapsVariant(pRead, varBAMMinPos, varBAMMaxPos): * pStartRead += 1 * continue # <<<<<<<<<<<<<< * * # Does read have good quality across variant site */ goto __pyx_L11_continue; goto __pyx_L13; } __pyx_L13:; /* "vcfutils.pyx":1084 * * # Does read have good quality across variant site * if not readQualIsGoodVariantPosition(pRead, varBAMMinPos, varBAMMaxPos, minBaseQual): # <<<<<<<<<<<<<< * pStartRead += 1 * continue */ __pyx_t_11 = (!__pyx_f_8vcfutils_readQualIsGoodVariantPosition(__pyx_v_pRead, __pyx_v_varBAMMinPos, __pyx_v_varBAMMaxPos, __pyx_v_minBaseQual)); if (__pyx_t_11) { /* "vcfutils.pyx":1085 * # Does read have good quality across variant site * if not readQualIsGoodVariantPosition(pRead, varBAMMinPos, varBAMMaxPos, minBaseQual): * pStartRead += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_pStartRead = (__pyx_v_pStartRead + 1); /* "vcfutils.pyx":1086 * if not readQualIsGoodVariantPosition(pRead, varBAMMinPos, varBAMMaxPos, minBaseQual): * pStartRead += 1 * continue # <<<<<<<<<<<<<< * * nReadsThisSample += 1 */ goto __pyx_L11_continue; goto __pyx_L14; } __pyx_L14:; /* "vcfutils.pyx":1088 * continue * * nReadsThisSample += 1 # <<<<<<<<<<<<<< * TC += 1 * RMSMQ += (pRead.mapq*pRead.mapq) */ __pyx_v_nReadsThisSample = (__pyx_v_nReadsThisSample + 1); /* "vcfutils.pyx":1089 * * nReadsThisSample += 1 * TC += 1 # <<<<<<<<<<<<<< * RMSMQ += (pRead.mapq*pRead.mapq) * */ __pyx_v_TC = (__pyx_v_TC + 1); /* "vcfutils.pyx":1090 * nReadsThisSample += 1 * TC += 1 * RMSMQ += (pRead.mapq*pRead.mapq) # <<<<<<<<<<<<<< * * if varInGenotype: */ __pyx_v_RMSMQ = (__pyx_v_RMSMQ + (__pyx_v_pRead->mapq * __pyx_v_pRead->mapq)); /* "vcfutils.pyx":1092 * RMSMQ += (pRead.mapq*pRead.mapq) * * if varInGenotype: # <<<<<<<<<<<<<< * TC_ab += 1 * */ if (__pyx_v_varInGenotype) { /* "vcfutils.pyx":1093 * * if varInGenotype: * TC_ab += 1 # <<<<<<<<<<<<<< * * if Read_IsReverse(pRead): */ __pyx_v_TC_ab = (__pyx_v_TC_ab + 1); /* "vcfutils.pyx":1095 * TC_ab += 1 * * if Read_IsReverse(pRead): # <<<<<<<<<<<<<< * TCR_sb += 1 * else: */ __pyx_t_13 = __pyx_f_15samtoolsWrapper_Read_IsReverse(__pyx_v_pRead); if (__pyx_t_13) { /* "vcfutils.pyx":1096 * * if Read_IsReverse(pRead): * TCR_sb += 1 # <<<<<<<<<<<<<< * else: * TCF_sb += 1 */ __pyx_v_TCR_sb = (__pyx_v_TCR_sb + 1); goto __pyx_L16; } /*else*/ { /* "vcfutils.pyx":1098 * TCR_sb += 1 * else: * TCF_sb += 1 # <<<<<<<<<<<<<< * * if Read_IsReverse(pRead): */ __pyx_v_TCF_sb = (__pyx_v_TCF_sb + 1); } __pyx_L16:; goto __pyx_L15; } __pyx_L15:; /* "vcfutils.pyx":1100 * TCF_sb += 1 * * if Read_IsReverse(pRead): # <<<<<<<<<<<<<< * TCR += 1 * else: */ __pyx_t_13 = __pyx_f_15samtoolsWrapper_Read_IsReverse(__pyx_v_pRead); if (__pyx_t_13) { /* "vcfutils.pyx":1101 * * if Read_IsReverse(pRead): * TCR += 1 # <<<<<<<<<<<<<< * else: * TCF += 1 */ __pyx_v_TCR = (__pyx_v_TCR + 1); goto __pyx_L17; } /*else*/ { /* "vcfutils.pyx":1103 * TCR += 1 * else: * TCF += 1 # <<<<<<<<<<<<<< * * # Check if read supports variant. */ __pyx_v_TCF = (__pyx_v_TCF + 1); } __pyx_L17:; /* "vcfutils.pyx":1106 * * # Check if read supports variant. * if variantSupportedByRead(pRead, varBAMMinPos, varBAMMaxPos, variant): # <<<<<<<<<<<<<< * * TR += 1 */ __pyx_t_13 = __pyx_f_8vcfutils_variantSupportedByRead(__pyx_v_pRead, __pyx_v_varBAMMinPos, __pyx_v_varBAMMaxPos, __pyx_v_variant); if (__pyx_t_13) { /* "vcfutils.pyx":1108 * if variantSupportedByRead(pRead, varBAMMinPos, varBAMMaxPos, variant): * * TR += 1 # <<<<<<<<<<<<<< * nVarReadsThisSample += 1 * */ __pyx_v_TR = (__pyx_v_TR + 1); /* "vcfutils.pyx":1109 * * TR += 1 * nVarReadsThisSample += 1 # <<<<<<<<<<<<<< * * if varInGenotype: */ __pyx_v_nVarReadsThisSample = (__pyx_v_nVarReadsThisSample + 1); /* "vcfutils.pyx":1111 * nVarReadsThisSample += 1 * * if varInGenotype: # <<<<<<<<<<<<<< * TR_ab += 1 * */ if (__pyx_v_varInGenotype) { /* "vcfutils.pyx":1112 * * if varInGenotype: * TR_ab += 1 # <<<<<<<<<<<<<< * * if Read_IsReverse(pRead): */ __pyx_v_TR_ab = (__pyx_v_TR_ab + 1); /* "vcfutils.pyx":1114 * TR_ab += 1 * * if Read_IsReverse(pRead): # <<<<<<<<<<<<<< * NR_sb += 1 * else: */ __pyx_t_13 = __pyx_f_15samtoolsWrapper_Read_IsReverse(__pyx_v_pRead); if (__pyx_t_13) { /* "vcfutils.pyx":1115 * * if Read_IsReverse(pRead): * NR_sb += 1 # <<<<<<<<<<<<<< * else: * NF_sb += 1 */ __pyx_v_NR_sb = (__pyx_v_NR_sb + 1); goto __pyx_L20; } /*else*/ { /* "vcfutils.pyx":1117 * NR_sb += 1 * else: * NF_sb += 1 # <<<<<<<<<<<<<< * * if Read_IsReverse(pRead): */ __pyx_v_NF_sb = (__pyx_v_NF_sb + 1); } __pyx_L20:; goto __pyx_L19; } __pyx_L19:; /* "vcfutils.pyx":1119 * NF_sb += 1 * * if Read_IsReverse(pRead): # <<<<<<<<<<<<<< * NR += 1 * else: */ __pyx_t_13 = __pyx_f_15samtoolsWrapper_Read_IsReverse(__pyx_v_pRead); if (__pyx_t_13) { /* "vcfutils.pyx":1120 * * if Read_IsReverse(pRead): * NR += 1 # <<<<<<<<<<<<<< * else: * NF += 1 */ __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_NR, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_v_NR); __pyx_v_NR = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L21; } /*else*/ { /* "vcfutils.pyx":1122 * NR += 1 * else: * NF += 1 # <<<<<<<<<<<<<< * * # Loop over window around variant position, and store smallest quality */ __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_NF, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_v_NF); __pyx_v_NF = __pyx_t_8; __pyx_t_8 = 0; } __pyx_L21:; /* "vcfutils.pyx":1128 * * # Only compute MMLQ for samples which support the variant * if varInGenotype: # <<<<<<<<<<<<<< * windowStart = max(0, varBAMMinPos - pRead.pos - (windowSize-1)//2) * windowEnd = min(pRead.rlen, varBAMMaxPos - pRead.pos + (windowSize-1)//2) */ if (__pyx_v_varInGenotype) { /* "vcfutils.pyx":1129 * # Only compute MMLQ for samples which support the variant * if varInGenotype: * windowStart = max(0, varBAMMinPos - pRead.pos - (windowSize-1)//2) # <<<<<<<<<<<<<< * windowEnd = min(pRead.rlen, varBAMMaxPos - pRead.pos + (windowSize-1)//2) * minBaseQualInWindow = 100 */ __pyx_t_14 = ((__pyx_v_varBAMMinPos - __pyx_v_pRead->pos) - ((__pyx_v_windowSize - 1) / 2)); __pyx_t_15 = 0; if ((__pyx_t_14 > __pyx_t_15)) { __pyx_t_16 = __pyx_t_14; } else { __pyx_t_16 = __pyx_t_15; } __pyx_v_windowStart = __pyx_t_16; /* "vcfutils.pyx":1130 * if varInGenotype: * windowStart = max(0, varBAMMinPos - pRead.pos - (windowSize-1)//2) * windowEnd = min(pRead.rlen, varBAMMaxPos - pRead.pos + (windowSize-1)//2) # <<<<<<<<<<<<<< * minBaseQualInWindow = 100 * */ __pyx_t_16 = ((__pyx_v_varBAMMaxPos - __pyx_v_pRead->pos) + ((__pyx_v_windowSize - 1) / 2)); __pyx_t_17 = __pyx_v_pRead->rlen; if ((__pyx_t_16 < __pyx_t_17)) { __pyx_t_14 = __pyx_t_16; } else { __pyx_t_14 = __pyx_t_17; } __pyx_v_windowEnd = __pyx_t_14; /* "vcfutils.pyx":1131 * windowStart = max(0, varBAMMinPos - pRead.pos - (windowSize-1)//2) * windowEnd = min(pRead.rlen, varBAMMaxPos - pRead.pos + (windowSize-1)//2) * minBaseQualInWindow = 100 # <<<<<<<<<<<<<< * * for windowIndex in range(windowStart, windowEnd): */ __pyx_v_minBaseQualInWindow = 100; /* "vcfutils.pyx":1133 * minBaseQualInWindow = 100 * * for windowIndex in range(windowStart, windowEnd): # <<<<<<<<<<<<<< * minBaseQualInWindow = min(minBaseQualInWindow, pRead.qual[windowIndex]) * */ __pyx_t_13 = __pyx_v_windowEnd; for (__pyx_t_18 = __pyx_v_windowStart; __pyx_t_18 < __pyx_t_13; __pyx_t_18+=1) { __pyx_v_windowIndex = __pyx_t_18; /* "vcfutils.pyx":1134 * * for windowIndex in range(windowStart, windowEnd): * minBaseQualInWindow = min(minBaseQualInWindow, pRead.qual[windowIndex]) # <<<<<<<<<<<<<< * * listOfMinBaseQuals.append(minBaseQualInWindow) */ __pyx_t_19 = (__pyx_v_pRead->qual[__pyx_v_windowIndex]); __pyx_t_20 = __pyx_v_minBaseQualInWindow; if ((__pyx_t_19 < __pyx_t_20)) { __pyx_t_21 = __pyx_t_19; } else { __pyx_t_21 = __pyx_t_20; } __pyx_v_minBaseQualInWindow = __pyx_t_21; } /* "vcfutils.pyx":1136 * minBaseQualInWindow = min(minBaseQualInWindow, pRead.qual[windowIndex]) * * listOfMinBaseQuals.append(minBaseQualInWindow) # <<<<<<<<<<<<<< * * pStartRead += 1 */ __pyx_t_8 = PyInt_FromLong(__pyx_v_minBaseQualInWindow); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_22 = PyList_Append(__pyx_v_listOfMinBaseQuals, __pyx_t_8); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L22; } __pyx_L22:; goto __pyx_L18; } __pyx_L18:; /* "vcfutils.pyx":1138 * listOfMinBaseQuals.append(minBaseQualInWindow) * * pStartRead += 1 # <<<<<<<<<<<<<< * * nReadsPerSample.append(nReadsThisSample) */ __pyx_v_pStartRead = (__pyx_v_pStartRead + 1); __pyx_L11_continue:; } /* "vcfutils.pyx":1140 * pStartRead += 1 * * nReadsPerSample.append(nReadsThisSample) # <<<<<<<<<<<<<< * nVarReadsPerSample.append(nVarReadsThisSample) * */ __pyx_t_8 = PyInt_FromLong(__pyx_v_nReadsThisSample); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_22 = PyList_Append(__pyx_v_nReadsPerSample, __pyx_t_8); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "vcfutils.pyx":1141 * * nReadsPerSample.append(nReadsThisSample) * nVarReadsPerSample.append(nVarReadsThisSample) # <<<<<<<<<<<<<< * * # Compute per-sample strand-bias */ __pyx_t_8 = PyInt_FromLong(__pyx_v_nVarReadsThisSample); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_22 = PyList_Append(__pyx_v_nVarReadsPerSample, __pyx_t_8); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":1144 * * # Compute per-sample strand-bias * INFO[variant]['ABPV'] = [round(computeAlleleBiasPValue(TC_ab, TR_ab), 2)] # <<<<<<<<<<<<<< * INFO[variant]['SbPval'] = [round(computeStrandBiasPValue(TCF_sb, TCR_sb, NF_sb, NR_sb), 2)] * INFO[variant]['TR'] = [TR] */ __pyx_t_3 = PyFloat_FromDouble(__pyx_f_8vcfutils_computeAlleleBiasPValue(__pyx_v_TC_ab, __pyx_v_TR_ab)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__ABPV), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "vcfutils.pyx":1145 * # Compute per-sample strand-bias * INFO[variant]['ABPV'] = [round(computeAlleleBiasPValue(TC_ab, TR_ab), 2)] * INFO[variant]['SbPval'] = [round(computeStrandBiasPValue(TCF_sb, TCR_sb, NF_sb, NR_sb), 2)] # <<<<<<<<<<<<<< * INFO[variant]['TR'] = [TR] * INFO[variant]['NF'] = [NF] */ __pyx_t_8 = PyFloat_FromDouble(__pyx_f_8vcfutils_computeStrandBiasPValue(__pyx_v_TCF_sb, __pyx_v_TCR_sb, __pyx_v_NF_sb, __pyx_v_NR_sb)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__SbPval), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":1146 * INFO[variant]['ABPV'] = [round(computeAlleleBiasPValue(TC_ab, TR_ab), 2)] * INFO[variant]['SbPval'] = [round(computeStrandBiasPValue(TCF_sb, TCR_sb, NF_sb, NR_sb), 2)] * INFO[variant]['TR'] = [TR] # <<<<<<<<<<<<<< * INFO[variant]['NF'] = [NF] * INFO[variant]['NR'] = [NR] */ __pyx_t_3 = PyInt_FromLong(__pyx_v_TR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__TR), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "vcfutils.pyx":1147 * INFO[variant]['SbPval'] = [round(computeStrandBiasPValue(TCF_sb, TCR_sb, NF_sb, NR_sb), 2)] * INFO[variant]['TR'] = [TR] * INFO[variant]['NF'] = [NF] # <<<<<<<<<<<<<< * INFO[variant]['NR'] = [NR] * */ __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_NF); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_NF); __Pyx_GIVEREF(__pyx_v_NF); if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__NF), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "vcfutils.pyx":1148 * INFO[variant]['TR'] = [TR] * INFO[variant]['NF'] = [NF] * INFO[variant]['NR'] = [NR] # <<<<<<<<<<<<<< * * if TR > 0: */ __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_NR); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_NR); __Pyx_GIVEREF(__pyx_v_NR); if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__NR), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "vcfutils.pyx":1150 * INFO[variant]['NR'] = [NR] * * if TR > 0: # <<<<<<<<<<<<<< * qual = float(INFO[variant]['PP'][0]) * if qual > 2500: */ __pyx_t_11 = (__pyx_v_TR > 0); if (__pyx_t_11) { /* "vcfutils.pyx":1151 * * if TR > 0: * qual = float(INFO[variant]['PP'][0]) # <<<<<<<<<<<<<< * if qual > 2500: * INFO[variant]['QD'] = [options.qdThreshold + 10] */ if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyObject_GetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__PP)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_23 = __Pyx_PyObject_AsDouble(__pyx_t_8); if (unlikely(__pyx_t_23 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_qual = __pyx_t_23; /* "vcfutils.pyx":1152 * if TR > 0: * qual = float(INFO[variant]['PP'][0]) * if qual > 2500: # <<<<<<<<<<<<<< * INFO[variant]['QD'] = [options.qdThreshold + 10] * else: */ __pyx_t_11 = (__pyx_v_qual > 2500.0); if (__pyx_t_11) { /* "vcfutils.pyx":1153 * qual = float(INFO[variant]['PP'][0]) * if qual > 2500: * INFO[variant]['QD'] = [options.qdThreshold + 10] # <<<<<<<<<<<<<< * else: * INFO[variant]['QD'] = [(qual + (-10*log10(variant.calculatePrior(refFile))) )/TR] */ __pyx_t_8 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__qdThreshold); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_int_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__QD), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; goto __pyx_L26; } /*else*/ { /* "vcfutils.pyx":1155 * INFO[variant]['QD'] = [options.qdThreshold + 10] * else: * INFO[variant]['QD'] = [(qual + (-10*log10(variant.calculatePrior(refFile))) )/TR] # <<<<<<<<<<<<<< * #logger.debug("Old QD = %s. new QD = %s. TR = %s. Qual = %s. Prior = %s. Var = %s" %(qual/TR, (qual + (-10*log10(variant.calculatePrior(refFile))))/TR, TR, qual, variant.calculatePrior(refFile), variant)) * else: */ __pyx_t_8 = PyFloat_FromDouble(((__pyx_v_qual + (-10.0 * log10(((struct __pyx_vtabstruct_7variant_Variant *)__pyx_v_variant->__pyx_vtab)->calculatePrior(__pyx_v_variant, __pyx_v_refFile)))) / __pyx_v_TR)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__QD), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; } __pyx_L26:; goto __pyx_L25; } /*else*/ { /* "vcfutils.pyx":1159 * else: * #logger.warning("Something is wrong. TR == 0 for variant %s" %(variant)) * INFO[variant]['QD'] = [0] # <<<<<<<<<<<<<< * * INFO[variant]['BRF'] = [round(nBadReads/(nGoodReads+nBadReads), 2)] */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__QD), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; } __pyx_L25:; /* "vcfutils.pyx":1161 * INFO[variant]['QD'] = [0] * * INFO[variant]['BRF'] = [round(nBadReads/(nGoodReads+nBadReads), 2)] # <<<<<<<<<<<<<< * INFO[variant]['TC'] = [TC] * INFO[variant]['TCR'] = [TCR] */ __pyx_t_3 = PyFloat_FromDouble((__pyx_v_nBadReads / ((double)(__pyx_v_nGoodReads + __pyx_v_nBadReads)))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__BRF), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "vcfutils.pyx":1162 * * INFO[variant]['BRF'] = [round(nBadReads/(nGoodReads+nBadReads), 2)] * INFO[variant]['TC'] = [TC] # <<<<<<<<<<<<<< * INFO[variant]['TCR'] = [TCR] * INFO[variant]['TCF'] = [TCF] */ __pyx_t_8 = PyInt_FromLong(__pyx_v_TC); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__TC), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":1163 * INFO[variant]['BRF'] = [round(nBadReads/(nGoodReads+nBadReads), 2)] * INFO[variant]['TC'] = [TC] * INFO[variant]['TCR'] = [TCR] # <<<<<<<<<<<<<< * INFO[variant]['TCF'] = [TCF] * */ __pyx_t_3 = PyInt_FromLong(__pyx_v_TCR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__TCR), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "vcfutils.pyx":1164 * INFO[variant]['TC'] = [TC] * INFO[variant]['TCR'] = [TCR] * INFO[variant]['TCF'] = [TCF] # <<<<<<<<<<<<<< * * if TC + TC_bad > 0 and RMSMQ > 0: */ __pyx_t_8 = PyInt_FromLong(__pyx_v_TCF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__TCF), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":1166 * INFO[variant]['TCF'] = [TCF] * * if TC + TC_bad > 0 and RMSMQ > 0: # <<<<<<<<<<<<<< * INFO[variant]['MQ'] = [round(sqrt(RMSMQ/(TC+TC_bad)), 2)] * else: */ __pyx_t_11 = ((__pyx_v_TC + __pyx_v_TC_bad) > 0); if (__pyx_t_11) { __pyx_t_9 = (__pyx_v_RMSMQ > 0.0); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_11; } if (__pyx_t_10) { /* "vcfutils.pyx":1167 * * if TC + TC_bad > 0 and RMSMQ > 0: * INFO[variant]['MQ'] = [round(sqrt(RMSMQ/(TC+TC_bad)), 2)] # <<<<<<<<<<<<<< * else: * INFO[variant]['MQ'] = [0] */ __pyx_t_3 = PyFloat_FromDouble(sqrt((__pyx_v_RMSMQ / (__pyx_v_TC + __pyx_v_TC_bad)))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__MQ), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; goto __pyx_L27; } /*else*/ { /* "vcfutils.pyx":1169 * INFO[variant]['MQ'] = [round(sqrt(RMSMQ/(TC+TC_bad)), 2)] * else: * INFO[variant]['MQ'] = [0] # <<<<<<<<<<<<<< * * INFO[variant]['nReadsPerSample'] = nReadsPerSample */ __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__MQ), ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; } __pyx_L27:; /* "vcfutils.pyx":1171 * INFO[variant]['MQ'] = [0] * * INFO[variant]['nReadsPerSample'] = nReadsPerSample # <<<<<<<<<<<<<< * INFO[variant]['nVarReadsPerSample'] = nVarReadsPerSample * INFO[variant]['FR'][0] = "%1.4f" %(INFO[variant]['FR'][0]) */ if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__nReadsPerSample), ((PyObject *)__pyx_v_nReadsPerSample)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "vcfutils.pyx":1172 * * INFO[variant]['nReadsPerSample'] = nReadsPerSample * INFO[variant]['nVarReadsPerSample'] = nVarReadsPerSample # <<<<<<<<<<<<<< * INFO[variant]['FR'][0] = "%1.4f" %(INFO[variant]['FR'][0]) * INFO[variant]['HapScore'] = [HapScore] */ if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__nVarReadsPerSample), ((PyObject *)__pyx_v_nVarReadsPerSample)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "vcfutils.pyx":1173 * INFO[variant]['nReadsPerSample'] = nReadsPerSample * INFO[variant]['nVarReadsPerSample'] = nVarReadsPerSample * INFO[variant]['FR'][0] = "%1.4f" %(INFO[variant]['FR'][0]) # <<<<<<<<<<<<<< * INFO[variant]['HapScore'] = [HapScore] * */ if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyObject_GetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__FR)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), __pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_24 = PyObject_GetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__FR)); if (!__pyx_t_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__Pyx_SetItemInt(__pyx_t_24, 0, ((PyObject *)__pyx_t_3), sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":1174 * INFO[variant]['nVarReadsPerSample'] = nVarReadsPerSample * INFO[variant]['FR'][0] = "%1.4f" %(INFO[variant]['FR'][0]) * INFO[variant]['HapScore'] = [HapScore] # <<<<<<<<<<<<<< * * listOfMinBaseQuals.sort() */ __pyx_t_3 = PyInt_FromLong(__pyx_v_HapScore); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_24 = PyList_New(1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__HapScore), ((PyObject *)__pyx_t_24)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0; /* "vcfutils.pyx":1176 * INFO[variant]['HapScore'] = [HapScore] * * listOfMinBaseQuals.sort() # <<<<<<<<<<<<<< * * if len(listOfMinBaseQuals) > 0: */ __pyx_t_22 = PyList_Sort(((PyObject *)__pyx_v_listOfMinBaseQuals)); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":1178 * listOfMinBaseQuals.sort() * * if len(listOfMinBaseQuals) > 0: # <<<<<<<<<<<<<< * INFO[variant]['MMLQ'] = [listOfMinBaseQuals[ len(listOfMinBaseQuals) // 2 ]] * else: */ __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_listOfMinBaseQuals)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = (__pyx_t_7 > 0); if (__pyx_t_10) { /* "vcfutils.pyx":1179 * * if len(listOfMinBaseQuals) > 0: * INFO[variant]['MMLQ'] = [listOfMinBaseQuals[ len(listOfMinBaseQuals) // 2 ]] # <<<<<<<<<<<<<< * else: * INFO[variant]['MMLQ'] = [100] */ __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_listOfMinBaseQuals)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_25 = (__pyx_t_7 / 2); __pyx_t_24 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_listOfMinBaseQuals), __pyx_t_25, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_24); __pyx_t_24 = 0; if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); if (PyObject_SetItem(__pyx_t_24, ((PyObject *)__pyx_n_s__MMLQ), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; goto __pyx_L28; } /*else*/ { /* "vcfutils.pyx":1181 * INFO[variant]['MMLQ'] = [listOfMinBaseQuals[ len(listOfMinBaseQuals) // 2 ]] * else: * INFO[variant]['MMLQ'] = [100] # <<<<<<<<<<<<<< * * INFO[variant]["Source"] = [] */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_100); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_100); __Pyx_GIVEREF(__pyx_int_100); if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); if (PyObject_SetItem(__pyx_t_24, ((PyObject *)__pyx_n_s__MMLQ), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; } __pyx_L28:; /* "vcfutils.pyx":1183 * INFO[variant]['MMLQ'] = [100] * * INFO[variant]["Source"] = [] # <<<<<<<<<<<<<< * * if variant.varSource & PLATYPUS_VAR: */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_24 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); if (PyObject_SetItem(__pyx_t_24, ((PyObject *)__pyx_n_s__Source), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":1185 * INFO[variant]["Source"] = [] * * if variant.varSource & PLATYPUS_VAR: # <<<<<<<<<<<<<< * INFO[variant]["Source"].append("Platypus") * */ __pyx_t_6 = (__pyx_v_variant->varSource & __pyx_v_7variant_PLATYPUS_VAR); if (__pyx_t_6) { /* "vcfutils.pyx":1186 * * if variant.varSource & PLATYPUS_VAR: * INFO[variant]["Source"].append("Platypus") # <<<<<<<<<<<<<< * * if variant.varSource & ASSEMBLER_VAR: */ if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_24 = PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__Source)); if (!__pyx_t_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_24, ((PyObject *)__pyx_n_s__Platypus)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L29; } __pyx_L29:; /* "vcfutils.pyx":1188 * INFO[variant]["Source"].append("Platypus") * * if variant.varSource & ASSEMBLER_VAR: # <<<<<<<<<<<<<< * INFO[variant]["Source"].append("Assembler") * */ __pyx_t_6 = (__pyx_v_variant->varSource & __pyx_v_7variant_ASSEMBLER_VAR); if (__pyx_t_6) { /* "vcfutils.pyx":1189 * * if variant.varSource & ASSEMBLER_VAR: * INFO[variant]["Source"].append("Assembler") # <<<<<<<<<<<<<< * * if variant.varSource & FILE_VAR: */ if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_24 = PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__Source)); if (!__pyx_t_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_24, ((PyObject *)__pyx_n_s__Assembler)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L30; } __pyx_L30:; /* "vcfutils.pyx":1191 * INFO[variant]["Source"].append("Assembler") * * if variant.varSource & FILE_VAR: # <<<<<<<<<<<<<< * INFO[variant]["Source"].append("File") * */ __pyx_t_6 = (__pyx_v_variant->varSource & __pyx_v_7variant_FILE_VAR); if (__pyx_t_6) { /* "vcfutils.pyx":1192 * * if variant.varSource & FILE_VAR: * INFO[variant]["Source"].append("File") # <<<<<<<<<<<<<< * * return INFO */ if (unlikely(((PyObject *)__pyx_v_INFO) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_INFO), ((PyObject *)__pyx_v_variant)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_24 = PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__Source)); if (!__pyx_t_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_24, ((PyObject *)__pyx_n_s__File)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L31; } __pyx_L31:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":1194 * INFO[variant]["Source"].append("File") * * return INFO # <<<<<<<<<<<<<< * * ################################################################################################### */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_INFO)); __pyx_r = __pyx_v_INFO; goto __pyx_L0; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_24); __Pyx_AddTraceback("vcfutils.vcfINFO", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_variant); __Pyx_XDECREF(__pyx_v_nReadsPerSample); __Pyx_XDECREF(__pyx_v_nVarReadsPerSample); __Pyx_XDECREF(__pyx_v_listOfMinBaseQuals); __Pyx_XDECREF((PyObject *)__pyx_v_readBuffer); __Pyx_XDECREF(__pyx_v_INFO); __Pyx_XDECREF(__pyx_v_sortedVars); __Pyx_XDECREF(__pyx_v_NR); __Pyx_XDECREF(__pyx_v_NF); __Pyx_XDECREF(__pyx_v_genotype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":1198 * ################################################################################################### * * cdef double andersonDarlingTest(list readPositions): # <<<<<<<<<<<<<< * """ * Compute the Anderson-Darling test statistic, to see if the positions */ static double __pyx_f_8vcfutils_andersonDarlingTest(PyObject *__pyx_v_readPositions) { PyObject *__pyx_v_nReads = NULL; PyObject *__pyx_v_Asquared = NULL; PyObject *__pyx_v_i = NULL; double __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; double __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("andersonDarlingTest", 0); /* "vcfutils.pyx":1204 * """ * # Sort in ascending order. * readPositions.sort() # <<<<<<<<<<<<<< * nReads = len(readPositions) * Asquared = -nReads */ if (unlikely(((PyObject *)__pyx_v_readPositions) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "sort"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_Sort(((PyObject *)__pyx_v_readPositions)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":1205 * # Sort in ascending order. * readPositions.sort() * nReads = len(readPositions) # <<<<<<<<<<<<<< * Asquared = -nReads * */ if (unlikely(((PyObject *)__pyx_v_readPositions) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_readPositions)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_nReads = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":1206 * readPositions.sort() * nReads = len(readPositions) * Asquared = -nReads # <<<<<<<<<<<<<< * * for i in xrange(nReads): */ __pyx_t_3 = PyNumber_Negative(__pyx_v_nReads); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_Asquared = __pyx_t_3; __pyx_t_3 = 0; /* "vcfutils.pyx":1208 * Asquared = -nReads * * for i in xrange(nReads): # <<<<<<<<<<<<<< * Asquared -= (1.0/nReads)*( (2.0*i - 1.0)*log(readPositions[i]) + (2.0*nReads + 1.0 - 2.0*i)*log(1.0 - readPositions[i]) ) * */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_nReads); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_nReads); __Pyx_GIVEREF(__pyx_v_nReads); __pyx_t_4 = PyObject_Call(__pyx_builtin_xrange, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF(__pyx_v_i); __pyx_v_i = __pyx_t_4; __pyx_t_4 = 0; /* "vcfutils.pyx":1209 * * for i in xrange(nReads): * Asquared -= (1.0/nReads)*( (2.0*i - 1.0)*log(readPositions[i]) + (2.0*nReads + 1.0 - 2.0*i)*log(1.0 - readPositions[i]) ) # <<<<<<<<<<<<<< * * return Asquared */ __pyx_t_4 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_v_nReads); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyNumber_Multiply(__pyx_t_4, __pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Subtract(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(((PyObject *)__pyx_v_readPositions) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_readPositions), __pyx_v_i); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(log(__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyNumber_Multiply(__pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Multiply(__pyx_t_4, __pyx_v_nReads); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = PyNumber_Add(__pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Multiply(__pyx_t_4, __pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Subtract(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(((PyObject *)__pyx_v_readPositions) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = PyObject_GetItem(((PyObject *)__pyx_v_readPositions), __pyx_v_i); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyNumber_Subtract(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyFloat_FromDouble(log(__pyx_t_9)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyNumber_Multiply(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyNumber_Add(__pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Multiply(__pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyNumber_InPlaceSubtract(__pyx_v_Asquared, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_v_Asquared); __pyx_v_Asquared = __pyx_t_11; __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":1211 * Asquared -= (1.0/nReads)*( (2.0*i - 1.0)*log(readPositions[i]) + (2.0*nReads + 1.0 - 2.0*i)*log(1.0 - readPositions[i]) ) * * return Asquared # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_Asquared); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_9; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_WriteUnraisable("vcfutils.andersonDarlingTest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_nReads); __Pyx_XDECREF(__pyx_v_Asquared); __Pyx_XDECREF(__pyx_v_i); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":1215 * ################################################################################################### * * cdef double computeSCValue(sequence): # <<<<<<<<<<<<<< * """ * Compute the value for Platypus' SC filter. This is simply the */ static double __pyx_f_8vcfutils_computeSCValue(PyObject *__pyx_v_sequence) { PyObject *__pyx_v_counter = NULL; PyObject *__pyx_v_char = NULL; int __pyx_v_lenSeq; int __pyx_v_nCharsFromTop2Bases; double __pyx_v_SC; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_base = NULL; PyObject *__pyx_v_nChars = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("computeSCValue", 0); /* "vcfutils.pyx":1222 * value of 1.0, as would a homopolymer. * """ * counter = {} # <<<<<<<<<<<<<< * * for char in sequence: */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_counter = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":1224 * counter = {} * * for char in sequence: # <<<<<<<<<<<<<< * if char not in counter: * counter[char] = 1 */ if (PyList_CheckExact(__pyx_v_sequence) || PyTuple_CheckExact(__pyx_v_sequence)) { __pyx_t_1 = __pyx_v_sequence; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF(__pyx_v_char); __pyx_v_char = __pyx_t_4; __pyx_t_4 = 0; /* "vcfutils.pyx":1225 * * for char in sequence: * if char not in counter: # <<<<<<<<<<<<<< * counter[char] = 1 * else: */ __pyx_t_5 = (__Pyx_PyDict_Contains(__pyx_v_char, ((PyObject *)__pyx_v_counter), Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { /* "vcfutils.pyx":1226 * for char in sequence: * if char not in counter: * counter[char] = 1 # <<<<<<<<<<<<<< * else: * counter[char] += 1 */ if (PyDict_SetItem(((PyObject *)__pyx_v_counter), __pyx_v_char, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } /*else*/ { /* "vcfutils.pyx":1228 * counter[char] = 1 * else: * counter[char] += 1 # <<<<<<<<<<<<<< * * cdef int lenSeq = len(sequence) */ __Pyx_INCREF(__pyx_v_char); __pyx_t_4 = __pyx_v_char; __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_counter), __pyx_t_4); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_counter), __pyx_t_4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L5:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":1230 * counter[char] += 1 * * cdef int lenSeq = len(sequence) # <<<<<<<<<<<<<< * cdef int nCharsFromTop2Bases = sum([x[0] for x in sorted( [(nChars,base) for base,nChars in counter.iteritems()], reverse=True)[0:2] ]) * cdef double SC = (nCharsFromTop2Bases)/(lenSeq) */ __pyx_t_2 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lenSeq = __pyx_t_2; /* "vcfutils.pyx":1231 * * cdef int lenSeq = len(sequence) * cdef int nCharsFromTop2Bases = sum([x[0] for x in sorted( [(nChars,base) for base,nChars in counter.iteritems()], reverse=True)[0:2] ]) # <<<<<<<<<<<<<< * cdef double SC = (nCharsFromTop2Bases)/(lenSeq) * return SC */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_dict_iterator(((PyObject *)__pyx_v_counter), 1, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_8, &__pyx_t_2, &__pyx_t_6, &__pyx_t_10, NULL, __pyx_t_9); if (unlikely(__pyx_t_11 == 0)) break; if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF(__pyx_v_base); __pyx_v_base = __pyx_t_6; __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_nChars); __pyx_v_nChars = __pyx_t_10; __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_nChars); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_nChars); __Pyx_GIVEREF(__pyx_v_nChars); __Pyx_INCREF(__pyx_v_base); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_base); __Pyx_GIVEREF(__pyx_v_base); if (unlikely(__Pyx_PyList_Append(__pyx_t_4, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_t_4)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_10 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__reverse), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PySequence_GetSlice(__pyx_t_10, 0, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_10 = __pyx_t_4; __Pyx_INCREF(__pyx_t_10); __pyx_t_8 = 0; __pyx_t_3 = NULL; } else { __pyx_t_8 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_3 = Py_TYPE(__pyx_t_10)->tp_iternext; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_10)) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_10)) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_10); if (unlikely(!__pyx_t_4)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF(__pyx_v_x); __pyx_v_x = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_x, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_sum, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nCharsFromTop2Bases = __pyx_t_9; /* "vcfutils.pyx":1232 * cdef int lenSeq = len(sequence) * cdef int nCharsFromTop2Bases = sum([x[0] for x in sorted( [(nChars,base) for base,nChars in counter.iteritems()], reverse=True)[0:2] ]) * cdef double SC = (nCharsFromTop2Bases)/(lenSeq) # <<<<<<<<<<<<<< * return SC * */ __pyx_v_SC = (((double)__pyx_v_nCharsFromTop2Bases) / ((double)__pyx_v_lenSeq)); /* "vcfutils.pyx":1233 * cdef int nCharsFromTop2Bases = sum([x[0] for x in sorted( [(nChars,base) for base,nChars in counter.iteritems()], reverse=True)[0:2] ]) * cdef double SC = (nCharsFromTop2Bases)/(lenSeq) * return SC # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = __pyx_v_SC; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_10); __Pyx_WriteUnraisable("vcfutils.computeSCValue", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_counter); __Pyx_XDECREF(__pyx_v_char); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_base); __Pyx_XDECREF(__pyx_v_nChars); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "vcfutils.pyx":1237 * ################################################################################################### * * cdef dict vcfFILTER(list genotypeCalls, list haplotypes, dict vcfInfo, dict varsByPos, options): # <<<<<<<<<<<<<< * """ * FILTER field for vcf output, two level dictionary of variant - info field - value */ static PyObject *__pyx_f_8vcfutils_vcfFILTER(CYTHON_UNUSED PyObject *__pyx_v_genotypeCalls, CYTHON_UNUSED PyObject *__pyx_v_haplotypes, PyObject *__pyx_v_vcfInfo, PyObject *__pyx_v_varsByPos, PyObject *__pyx_v_options) { struct __pyx_obj_7variant_Variant *__pyx_v_v = 0; PyObject *__pyx_v_FILTER = 0; PyObject *__pyx_v_infoThisVar = 0; int __pyx_v_nVars; int __pyx_v_nVarsQD; int __pyx_v_nVarsHapScore; int __pyx_v_nVarsSB; int __pyx_v_nVarsAB; int __pyx_v_nVarsRMSMQ; CYTHON_UNUSED int __pyx_v_totalVarReads; int __pyx_v_hapScore; int __pyx_v_totalReads; CYTHON_UNUSED int __pyx_v_totalFwdReads; CYTHON_UNUSED int __pyx_v_totalRevReads; int __pyx_v_nVarsFailingMMLQFilter; int __pyx_v_medMinQualBases; double __pyx_v_abPVal; double __pyx_v_sbPVal; double __pyx_v_BRF; double __pyx_v_RMSMQ; double __pyx_v_QD; int __pyx_v_bestQual; int __pyx_v_thisQual; int __pyx_v_badReadsThreshold; double __pyx_v_abThreshold; double __pyx_v_sbThreshold; double __pyx_v_rmsmqThreshold; double __pyx_v_filteredReadsFrac; double __pyx_v_qdThreshold; double __pyx_v_hapScoreThreshold; double __pyx_v_scThreshold; int __pyx_v_failsSCFilter; CYTHON_UNUSED PyObject *__pyx_v_pos = NULL; PyObject *__pyx_v_varsAtPos = NULL; PyObject *__pyx_v_sequence = NULL; CYTHON_UNUSED PyObject *__pyx_v_totalForwardVarReads = NULL; CYTHON_UNUSED PyObject *__pyx_v_totalReverseVarReads = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; double __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("vcfFILTER", 0); /* "vcfutils.pyx":1242 * """ * cdef Variant v * cdef dict FILTER = {} # <<<<<<<<<<<<<< * cdef dict hapFILTER * cdef dict infoThisVar */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_FILTER = __pyx_t_1; __pyx_t_1 = 0; /* "vcfutils.pyx":1245 * cdef dict hapFILTER * cdef dict infoThisVar * cdef int nVars = 0 # <<<<<<<<<<<<<< * cdef int nVarsQD = 0 * cdef int nVarsHapScore = 0 */ __pyx_v_nVars = 0; /* "vcfutils.pyx":1246 * cdef dict infoThisVar * cdef int nVars = 0 * cdef int nVarsQD = 0 # <<<<<<<<<<<<<< * cdef int nVarsHapScore = 0 * cdef int nVarsSB = 0 */ __pyx_v_nVarsQD = 0; /* "vcfutils.pyx":1247 * cdef int nVars = 0 * cdef int nVarsQD = 0 * cdef int nVarsHapScore = 0 # <<<<<<<<<<<<<< * cdef int nVarsSB = 0 * cdef int nVarsAB = 0 */ __pyx_v_nVarsHapScore = 0; /* "vcfutils.pyx":1248 * cdef int nVarsQD = 0 * cdef int nVarsHapScore = 0 * cdef int nVarsSB = 0 # <<<<<<<<<<<<<< * cdef int nVarsAB = 0 * cdef int nVarsRMSMQ = 0 */ __pyx_v_nVarsSB = 0; /* "vcfutils.pyx":1249 * cdef int nVarsHapScore = 0 * cdef int nVarsSB = 0 * cdef int nVarsAB = 0 # <<<<<<<<<<<<<< * cdef int nVarsRMSMQ = 0 * cdef int totalVarReads = 0 */ __pyx_v_nVarsAB = 0; /* "vcfutils.pyx":1250 * cdef int nVarsSB = 0 * cdef int nVarsAB = 0 * cdef int nVarsRMSMQ = 0 # <<<<<<<<<<<<<< * cdef int totalVarReads = 0 * cdef int hapScore = 0 */ __pyx_v_nVarsRMSMQ = 0; /* "vcfutils.pyx":1251 * cdef int nVarsAB = 0 * cdef int nVarsRMSMQ = 0 * cdef int totalVarReads = 0 # <<<<<<<<<<<<<< * cdef int hapScore = 0 * cdef int totalReads = 0 */ __pyx_v_totalVarReads = 0; /* "vcfutils.pyx":1252 * cdef int nVarsRMSMQ = 0 * cdef int totalVarReads = 0 * cdef int hapScore = 0 # <<<<<<<<<<<<<< * cdef int totalReads = 0 * cdef int totalFwdReads = 0 */ __pyx_v_hapScore = 0; /* "vcfutils.pyx":1253 * cdef int totalVarReads = 0 * cdef int hapScore = 0 * cdef int totalReads = 0 # <<<<<<<<<<<<<< * cdef int totalFwdReads = 0 * cdef int totalRevReads = 0 */ __pyx_v_totalReads = 0; /* "vcfutils.pyx":1254 * cdef int hapScore = 0 * cdef int totalReads = 0 * cdef int totalFwdReads = 0 # <<<<<<<<<<<<<< * cdef int totalRevReads = 0 * cdef int nVarsFailingMMLQFilter = 0 */ __pyx_v_totalFwdReads = 0; /* "vcfutils.pyx":1255 * cdef int totalReads = 0 * cdef int totalFwdReads = 0 * cdef int totalRevReads = 0 # <<<<<<<<<<<<<< * cdef int nVarsFailingMMLQFilter = 0 * cdef int medMinQualBases = 0 */ __pyx_v_totalRevReads = 0; /* "vcfutils.pyx":1256 * cdef int totalFwdReads = 0 * cdef int totalRevReads = 0 * cdef int nVarsFailingMMLQFilter = 0 # <<<<<<<<<<<<<< * cdef int medMinQualBases = 0 * cdef double abPVal = 0.0 */ __pyx_v_nVarsFailingMMLQFilter = 0; /* "vcfutils.pyx":1257 * cdef int totalRevReads = 0 * cdef int nVarsFailingMMLQFilter = 0 * cdef int medMinQualBases = 0 # <<<<<<<<<<<<<< * cdef double abPVal = 0.0 * cdef double sbPVal = 0.0 */ __pyx_v_medMinQualBases = 0; /* "vcfutils.pyx":1258 * cdef int nVarsFailingMMLQFilter = 0 * cdef int medMinQualBases = 0 * cdef double abPVal = 0.0 # <<<<<<<<<<<<<< * cdef double sbPVal = 0.0 * cdef double BRF = 0.0 */ __pyx_v_abPVal = 0.0; /* "vcfutils.pyx":1259 * cdef int medMinQualBases = 0 * cdef double abPVal = 0.0 * cdef double sbPVal = 0.0 # <<<<<<<<<<<<<< * cdef double BRF = 0.0 * cdef double RMSMQ = 0.0 */ __pyx_v_sbPVal = 0.0; /* "vcfutils.pyx":1260 * cdef double abPVal = 0.0 * cdef double sbPVal = 0.0 * cdef double BRF = 0.0 # <<<<<<<<<<<<<< * cdef double RMSMQ = 0.0 * cdef double QD = 0.0 */ __pyx_v_BRF = 0.0; /* "vcfutils.pyx":1261 * cdef double sbPVal = 0.0 * cdef double BRF = 0.0 * cdef double RMSMQ = 0.0 # <<<<<<<<<<<<<< * cdef double QD = 0.0 * cdef int bestQual = 0 */ __pyx_v_RMSMQ = 0.0; /* "vcfutils.pyx":1262 * cdef double BRF = 0.0 * cdef double RMSMQ = 0.0 * cdef double QD = 0.0 # <<<<<<<<<<<<<< * cdef int bestQual = 0 * cdef int thisQual = 0 */ __pyx_v_QD = 0.0; /* "vcfutils.pyx":1263 * cdef double RMSMQ = 0.0 * cdef double QD = 0.0 * cdef int bestQual = 0 # <<<<<<<<<<<<<< * cdef int thisQual = 0 * cdef int badReadsThreshold = options.badReadsThreshold */ __pyx_v_bestQual = 0; /* "vcfutils.pyx":1264 * cdef double QD = 0.0 * cdef int bestQual = 0 * cdef int thisQual = 0 # <<<<<<<<<<<<<< * cdef int badReadsThreshold = options.badReadsThreshold * cdef double abThreshold = options.abThreshold */ __pyx_v_thisQual = 0; /* "vcfutils.pyx":1265 * cdef int bestQual = 0 * cdef int thisQual = 0 * cdef int badReadsThreshold = options.badReadsThreshold # <<<<<<<<<<<<<< * cdef double abThreshold = options.abThreshold * cdef double sbThreshold = options.sbThreshold */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__badReadsThreshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_badReadsThreshold = __pyx_t_2; /* "vcfutils.pyx":1266 * cdef int thisQual = 0 * cdef int badReadsThreshold = options.badReadsThreshold * cdef double abThreshold = options.abThreshold # <<<<<<<<<<<<<< * cdef double sbThreshold = options.sbThreshold * cdef double rmsmqThreshold = options.rmsmqThreshold */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__abThreshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_abThreshold = __pyx_t_3; /* "vcfutils.pyx":1267 * cdef int badReadsThreshold = options.badReadsThreshold * cdef double abThreshold = options.abThreshold * cdef double sbThreshold = options.sbThreshold # <<<<<<<<<<<<<< * cdef double rmsmqThreshold = options.rmsmqThreshold * cdef double filteredReadsFrac = options.filteredReadsFrac */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__sbThreshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sbThreshold = __pyx_t_3; /* "vcfutils.pyx":1268 * cdef double abThreshold = options.abThreshold * cdef double sbThreshold = options.sbThreshold * cdef double rmsmqThreshold = options.rmsmqThreshold # <<<<<<<<<<<<<< * cdef double filteredReadsFrac = options.filteredReadsFrac * cdef double qdThreshold = options.qdThreshold */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__rmsmqThreshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rmsmqThreshold = __pyx_t_3; /* "vcfutils.pyx":1269 * cdef double sbThreshold = options.sbThreshold * cdef double rmsmqThreshold = options.rmsmqThreshold * cdef double filteredReadsFrac = options.filteredReadsFrac # <<<<<<<<<<<<<< * cdef double qdThreshold = options.qdThreshold * cdef double hapScoreThreshold = options.hapScoreThreshold */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__filteredReadsFrac); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_filteredReadsFrac = __pyx_t_3; /* "vcfutils.pyx":1270 * cdef double rmsmqThreshold = options.rmsmqThreshold * cdef double filteredReadsFrac = options.filteredReadsFrac * cdef double qdThreshold = options.qdThreshold # <<<<<<<<<<<<<< * cdef double hapScoreThreshold = options.hapScoreThreshold * cdef double scThreshold = options.scThreshold */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__qdThreshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_qdThreshold = __pyx_t_3; /* "vcfutils.pyx":1271 * cdef double filteredReadsFrac = options.filteredReadsFrac * cdef double qdThreshold = options.qdThreshold * cdef double hapScoreThreshold = options.hapScoreThreshold # <<<<<<<<<<<<<< * cdef double scThreshold = options.scThreshold * cdef int failsSCFilter = 0 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__hapScoreThreshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_hapScoreThreshold = __pyx_t_3; /* "vcfutils.pyx":1272 * cdef double qdThreshold = options.qdThreshold * cdef double hapScoreThreshold = options.hapScoreThreshold * cdef double scThreshold = options.scThreshold # <<<<<<<<<<<<<< * cdef int failsSCFilter = 0 * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__scThreshold); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_scThreshold = __pyx_t_3; /* "vcfutils.pyx":1273 * cdef double hapScoreThreshold = options.hapScoreThreshold * cdef double scThreshold = options.scThreshold * cdef int failsSCFilter = 0 # <<<<<<<<<<<<<< * * for pos,varsAtPos in varsByPos.iteritems(): */ __pyx_v_failsSCFilter = 0; /* "vcfutils.pyx":1275 * cdef int failsSCFilter = 0 * * for pos,varsAtPos in varsByPos.iteritems(): # <<<<<<<<<<<<<< * * nVars = len(varsAtPos) */ __pyx_t_4 = 0; if (unlikely(((PyObject *)__pyx_v_varsByPos) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_dict_iterator(((PyObject *)__pyx_v_varsByPos), 1, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_5), (&__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_5, &__pyx_t_4, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_2); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF(__pyx_v_pos); __pyx_v_pos = __pyx_t_6; __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_varsAtPos); __pyx_v_varsAtPos = __pyx_t_7; __pyx_t_7 = 0; /* "vcfutils.pyx":1277 * for pos,varsAtPos in varsByPos.iteritems(): * * nVars = len(varsAtPos) # <<<<<<<<<<<<<< * nVarsSB = 0 * nVarsAB = 0 */ __pyx_t_9 = PyObject_Length(__pyx_v_varsAtPos); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nVars = __pyx_t_9; /* "vcfutils.pyx":1278 * * nVars = len(varsAtPos) * nVarsSB = 0 # <<<<<<<<<<<<<< * nVarsAB = 0 * nVarsQD = 0 */ __pyx_v_nVarsSB = 0; /* "vcfutils.pyx":1279 * nVars = len(varsAtPos) * nVarsSB = 0 * nVarsAB = 0 # <<<<<<<<<<<<<< * nVarsQD = 0 * nVarsHapScore = 0 */ __pyx_v_nVarsAB = 0; /* "vcfutils.pyx":1280 * nVarsSB = 0 * nVarsAB = 0 * nVarsQD = 0 # <<<<<<<<<<<<<< * nVarsHapScore = 0 * nVarsRMSMQ = 0 */ __pyx_v_nVarsQD = 0; /* "vcfutils.pyx":1281 * nVarsAB = 0 * nVarsQD = 0 * nVarsHapScore = 0 # <<<<<<<<<<<<<< * nVarsRMSMQ = 0 * nVarsFailingMMLQFilter = 0 */ __pyx_v_nVarsHapScore = 0; /* "vcfutils.pyx":1282 * nVarsQD = 0 * nVarsHapScore = 0 * nVarsRMSMQ = 0 # <<<<<<<<<<<<<< * nVarsFailingMMLQFilter = 0 * hapScore = 0 */ __pyx_v_nVarsRMSMQ = 0; /* "vcfutils.pyx":1283 * nVarsHapScore = 0 * nVarsRMSMQ = 0 * nVarsFailingMMLQFilter = 0 # <<<<<<<<<<<<<< * hapScore = 0 * QD = 0.0 */ __pyx_v_nVarsFailingMMLQFilter = 0; /* "vcfutils.pyx":1284 * nVarsRMSMQ = 0 * nVarsFailingMMLQFilter = 0 * hapScore = 0 # <<<<<<<<<<<<<< * QD = 0.0 * bestQual = 0 */ __pyx_v_hapScore = 0; /* "vcfutils.pyx":1285 * nVarsFailingMMLQFilter = 0 * hapScore = 0 * QD = 0.0 # <<<<<<<<<<<<<< * bestQual = 0 * */ __pyx_v_QD = 0.0; /* "vcfutils.pyx":1286 * hapScore = 0 * QD = 0.0 * bestQual = 0 # <<<<<<<<<<<<<< * * sequence = vcfInfo[varsAtPos[0]]['SC'][0] */ __pyx_v_bestQual = 0; /* "vcfutils.pyx":1288 * bestQual = 0 * * sequence = vcfInfo[varsAtPos[0]]['SC'][0] # <<<<<<<<<<<<<< * * if computeSCValue(sequence) > scThreshold: */ if (unlikely(((PyObject *)__pyx_v_vcfInfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_varsAtPos, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfInfo), __pyx_t_7); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__SC)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_v_sequence); __pyx_v_sequence = __pyx_t_6; __pyx_t_6 = 0; /* "vcfutils.pyx":1290 * sequence = vcfInfo[varsAtPos[0]]['SC'][0] * * if computeSCValue(sequence) > scThreshold: # <<<<<<<<<<<<<< * failsSCFilter = 1 * else: */ __pyx_t_10 = (__pyx_f_8vcfutils_computeSCValue(__pyx_v_sequence) > __pyx_v_scThreshold); if (__pyx_t_10) { /* "vcfutils.pyx":1291 * * if computeSCValue(sequence) > scThreshold: * failsSCFilter = 1 # <<<<<<<<<<<<<< * else: * failsSCFilter = 0 */ __pyx_v_failsSCFilter = 1; goto __pyx_L5; } /*else*/ { /* "vcfutils.pyx":1293 * failsSCFilter = 1 * else: * failsSCFilter = 0 # <<<<<<<<<<<<<< * * for v in varsAtPos: */ __pyx_v_failsSCFilter = 0; } __pyx_L5:; /* "vcfutils.pyx":1295 * failsSCFilter = 0 * * for v in varsAtPos: # <<<<<<<<<<<<<< * * FILTER[v] = [] */ if (PyList_CheckExact(__pyx_v_varsAtPos) || PyTuple_CheckExact(__pyx_v_varsAtPos)) { __pyx_t_6 = __pyx_v_varsAtPos; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_11 = NULL; } else { __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_varsAtPos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; } for (;;) { if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_6)) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_6)) { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_v)); __pyx_v_v = ((struct __pyx_obj_7variant_Variant *)__pyx_t_7); __pyx_t_7 = 0; /* "vcfutils.pyx":1297 * for v in varsAtPos: * * FILTER[v] = [] # <<<<<<<<<<<<<< * infoThisVar = vcfInfo[v] * hapScore = int(infoThisVar['HapScore'][0]) */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v), ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "vcfutils.pyx":1298 * * FILTER[v] = [] * infoThisVar = vcfInfo[v] # <<<<<<<<<<<<<< * hapScore = int(infoThisVar['HapScore'][0]) * QD = float(infoThisVar['QD'][0]) */ if (unlikely(((PyObject *)__pyx_v_vcfInfo) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_vcfInfo), ((PyObject *)__pyx_v_v)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (!(likely(PyDict_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_infoThisVar)); __pyx_v_infoThisVar = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "vcfutils.pyx":1299 * FILTER[v] = [] * infoThisVar = vcfInfo[v] * hapScore = int(infoThisVar['HapScore'][0]) # <<<<<<<<<<<<<< * QD = float(infoThisVar['QD'][0]) * BRF = float(infoThisVar['BRF'][0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__HapScore)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_12); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_hapScore = __pyx_t_8; /* "vcfutils.pyx":1300 * infoThisVar = vcfInfo[v] * hapScore = int(infoThisVar['HapScore'][0]) * QD = float(infoThisVar['QD'][0]) # <<<<<<<<<<<<<< * BRF = float(infoThisVar['BRF'][0]) * RMSMQ = float(infoThisVar['MQ'][0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__QD)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_3 = __Pyx_PyObject_AsDouble(__pyx_t_7); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_QD = __pyx_t_3; /* "vcfutils.pyx":1301 * hapScore = int(infoThisVar['HapScore'][0]) * QD = float(infoThisVar['QD'][0]) * BRF = float(infoThisVar['BRF'][0]) # <<<<<<<<<<<<<< * RMSMQ = float(infoThisVar['MQ'][0]) * totalForwardVarReads = int(infoThisVar['NF'][0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__BRF)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_AsDouble(__pyx_t_12); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_BRF = __pyx_t_3; /* "vcfutils.pyx":1302 * QD = float(infoThisVar['QD'][0]) * BRF = float(infoThisVar['BRF'][0]) * RMSMQ = float(infoThisVar['MQ'][0]) # <<<<<<<<<<<<<< * totalForwardVarReads = int(infoThisVar['NF'][0]) * totalReverseVarReads = int(infoThisVar['NR'][0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__MQ)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_3 = __Pyx_PyObject_AsDouble(__pyx_t_7); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_RMSMQ = __pyx_t_3; /* "vcfutils.pyx":1303 * BRF = float(infoThisVar['BRF'][0]) * RMSMQ = float(infoThisVar['MQ'][0]) * totalForwardVarReads = int(infoThisVar['NF'][0]) # <<<<<<<<<<<<<< * totalReverseVarReads = int(infoThisVar['NR'][0]) * totalVarReads = int(infoThisVar['TR'][0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__NF)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_v_totalForwardVarReads); __pyx_v_totalForwardVarReads = __pyx_t_12; __pyx_t_12 = 0; /* "vcfutils.pyx":1304 * RMSMQ = float(infoThisVar['MQ'][0]) * totalForwardVarReads = int(infoThisVar['NF'][0]) * totalReverseVarReads = int(infoThisVar['NR'][0]) # <<<<<<<<<<<<<< * totalVarReads = int(infoThisVar['TR'][0]) * totalReads = int(infoThisVar['TC'][0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__NR)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_v_totalReverseVarReads); __pyx_v_totalReverseVarReads = __pyx_t_7; __pyx_t_7 = 0; /* "vcfutils.pyx":1305 * totalForwardVarReads = int(infoThisVar['NF'][0]) * totalReverseVarReads = int(infoThisVar['NR'][0]) * totalVarReads = int(infoThisVar['TR'][0]) # <<<<<<<<<<<<<< * totalReads = int(infoThisVar['TC'][0]) * totalFwdReads = int(infoThisVar['TCF'][0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__TR)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_12); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_totalVarReads = __pyx_t_8; /* "vcfutils.pyx":1306 * totalReverseVarReads = int(infoThisVar['NR'][0]) * totalVarReads = int(infoThisVar['TR'][0]) * totalReads = int(infoThisVar['TC'][0]) # <<<<<<<<<<<<<< * totalFwdReads = int(infoThisVar['TCF'][0]) * totalRevReads = int(infoThisVar['TCR'][0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__TC)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_totalReads = __pyx_t_8; /* "vcfutils.pyx":1307 * totalVarReads = int(infoThisVar['TR'][0]) * totalReads = int(infoThisVar['TC'][0]) * totalFwdReads = int(infoThisVar['TCF'][0]) # <<<<<<<<<<<<<< * totalRevReads = int(infoThisVar['TCR'][0]) * medMinQualBases = int(infoThisVar.get('MMLQ', [100])[0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__TCF)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_12); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_totalFwdReads = __pyx_t_8; /* "vcfutils.pyx":1308 * totalReads = int(infoThisVar['TC'][0]) * totalFwdReads = int(infoThisVar['TCF'][0]) * totalRevReads = int(infoThisVar['TCR'][0]) # <<<<<<<<<<<<<< * medMinQualBases = int(infoThisVar.get('MMLQ', [100])[0]) * thisQual = int(infoThisVar.get('PP', [0])[0]) */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__TCR)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_totalRevReads = __pyx_t_8; /* "vcfutils.pyx":1309 * totalFwdReads = int(infoThisVar['TCF'][0]) * totalRevReads = int(infoThisVar['TCR'][0]) * medMinQualBases = int(infoThisVar.get('MMLQ', [100])[0]) # <<<<<<<<<<<<<< * thisQual = int(infoThisVar.get('PP', [0])[0]) * */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_int_100); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_100); __Pyx_GIVEREF(__pyx_int_100); __pyx_t_12 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__MMLQ), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_medMinQualBases = __pyx_t_8; /* "vcfutils.pyx":1310 * totalRevReads = int(infoThisVar['TCR'][0]) * medMinQualBases = int(infoThisVar.get('MMLQ', [100])[0]) * thisQual = int(infoThisVar.get('PP', [0])[0]) # <<<<<<<<<<<<<< * * if thisQual > bestQual: */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_12 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__PP), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_thisQual = __pyx_t_8; /* "vcfutils.pyx":1312 * thisQual = int(infoThisVar.get('PP', [0])[0]) * * if thisQual > bestQual: # <<<<<<<<<<<<<< * bestQual = thisQual * */ __pyx_t_10 = (__pyx_v_thisQual > __pyx_v_bestQual); if (__pyx_t_10) { /* "vcfutils.pyx":1313 * * if thisQual > bestQual: * bestQual = thisQual # <<<<<<<<<<<<<< * * if medMinQualBases < badReadsThreshold: */ __pyx_v_bestQual = __pyx_v_thisQual; goto __pyx_L8; } __pyx_L8:; /* "vcfutils.pyx":1315 * bestQual = thisQual * * if medMinQualBases < badReadsThreshold: # <<<<<<<<<<<<<< * nVarsFailingMMLQFilter += 1 * */ __pyx_t_10 = (__pyx_v_medMinQualBases < __pyx_v_badReadsThreshold); if (__pyx_t_10) { /* "vcfutils.pyx":1316 * * if medMinQualBases < badReadsThreshold: * nVarsFailingMMLQFilter += 1 # <<<<<<<<<<<<<< * * abPVal = float(infoThisVar['ABPV'][0]) */ __pyx_v_nVarsFailingMMLQFilter = (__pyx_v_nVarsFailingMMLQFilter + 1); goto __pyx_L9; } __pyx_L9:; /* "vcfutils.pyx":1318 * nVarsFailingMMLQFilter += 1 * * abPVal = float(infoThisVar['ABPV'][0]) # <<<<<<<<<<<<<< * sbPVal = float(infoThisVar['SbPval'][0]) * */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__ABPV)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_AsDouble(__pyx_t_12); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_abPVal = __pyx_t_3; /* "vcfutils.pyx":1319 * * abPVal = float(infoThisVar['ABPV'][0]) * sbPVal = float(infoThisVar['SbPval'][0]) # <<<<<<<<<<<<<< * * if QD < qdThreshold: */ if (unlikely(((PyObject *)__pyx_v_infoThisVar) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_infoThisVar), ((PyObject *)__pyx_n_s__SbPval)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_3 = __Pyx_PyObject_AsDouble(__pyx_t_7); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_sbPVal = __pyx_t_3; /* "vcfutils.pyx":1321 * sbPVal = float(infoThisVar['SbPval'][0]) * * if QD < qdThreshold: # <<<<<<<<<<<<<< * nVarsQD += 1 * */ __pyx_t_10 = (__pyx_v_QD < __pyx_v_qdThreshold); if (__pyx_t_10) { /* "vcfutils.pyx":1322 * * if QD < qdThreshold: * nVarsQD += 1 # <<<<<<<<<<<<<< * * if hapScore > hapScoreThreshold: */ __pyx_v_nVarsQD = (__pyx_v_nVarsQD + 1); goto __pyx_L10; } __pyx_L10:; /* "vcfutils.pyx":1324 * nVarsQD += 1 * * if hapScore > hapScoreThreshold: # <<<<<<<<<<<<<< * nVarsHapScore += 1 * */ __pyx_t_10 = (__pyx_v_hapScore > __pyx_v_hapScoreThreshold); if (__pyx_t_10) { /* "vcfutils.pyx":1325 * * if hapScore > hapScoreThreshold: * nVarsHapScore += 1 # <<<<<<<<<<<<<< * * if totalReads > 0 and abPVal < abThreshold: */ __pyx_v_nVarsHapScore = (__pyx_v_nVarsHapScore + 1); goto __pyx_L11; } __pyx_L11:; /* "vcfutils.pyx":1327 * nVarsHapScore += 1 * * if totalReads > 0 and abPVal < abThreshold: # <<<<<<<<<<<<<< * nVarsAB += 1 * */ __pyx_t_10 = (__pyx_v_totalReads > 0); if (__pyx_t_10) { __pyx_t_13 = (__pyx_v_abPVal < __pyx_v_abThreshold); __pyx_t_14 = __pyx_t_13; } else { __pyx_t_14 = __pyx_t_10; } if (__pyx_t_14) { /* "vcfutils.pyx":1328 * * if totalReads > 0 and abPVal < abThreshold: * nVarsAB += 1 # <<<<<<<<<<<<<< * * if sbPVal < sbThreshold: */ __pyx_v_nVarsAB = (__pyx_v_nVarsAB + 1); goto __pyx_L12; } __pyx_L12:; /* "vcfutils.pyx":1330 * nVarsAB += 1 * * if sbPVal < sbThreshold: # <<<<<<<<<<<<<< * nVarsSB += 1 * */ __pyx_t_14 = (__pyx_v_sbPVal < __pyx_v_sbThreshold); if (__pyx_t_14) { /* "vcfutils.pyx":1331 * * if sbPVal < sbThreshold: * nVarsSB += 1 # <<<<<<<<<<<<<< * * if RMSMQ < rmsmqThreshold: */ __pyx_v_nVarsSB = (__pyx_v_nVarsSB + 1); goto __pyx_L13; } __pyx_L13:; /* "vcfutils.pyx":1333 * nVarsSB += 1 * * if RMSMQ < rmsmqThreshold: # <<<<<<<<<<<<<< * nVarsRMSMQ += 1 * */ __pyx_t_14 = (__pyx_v_RMSMQ < __pyx_v_rmsmqThreshold); if (__pyx_t_14) { /* "vcfutils.pyx":1334 * * if RMSMQ < rmsmqThreshold: * nVarsRMSMQ += 1 # <<<<<<<<<<<<<< * * if failsSCFilter: */ __pyx_v_nVarsRMSMQ = (__pyx_v_nVarsRMSMQ + 1); goto __pyx_L14; } __pyx_L14:; /* "vcfutils.pyx":1336 * nVarsRMSMQ += 1 * * if failsSCFilter: # <<<<<<<<<<<<<< * FILTER[v].append('SC') * */ if (__pyx_v_failsSCFilter) { /* "vcfutils.pyx":1337 * * if failsSCFilter: * FILTER[v].append('SC') # <<<<<<<<<<<<<< * * for v in varsAtPos: */ __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_7, ((PyObject *)__pyx_n_s__SC)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L15; } __pyx_L15:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "vcfutils.pyx":1339 * FILTER[v].append('SC') * * for v in varsAtPos: # <<<<<<<<<<<<<< * * if nVarsQD == nVars: */ if (PyList_CheckExact(__pyx_v_varsAtPos) || PyTuple_CheckExact(__pyx_v_varsAtPos)) { __pyx_t_6 = __pyx_v_varsAtPos; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_11 = NULL; } else { __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_varsAtPos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; } for (;;) { if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_6)) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_12); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_6)) { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_12); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_12 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_12)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_12); } if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_v)); __pyx_v_v = ((struct __pyx_obj_7variant_Variant *)__pyx_t_12); __pyx_t_12 = 0; /* "vcfutils.pyx":1341 * for v in varsAtPos: * * if nVarsQD == nVars: # <<<<<<<<<<<<<< * FILTER[v].append('QD') * */ __pyx_t_14 = (__pyx_v_nVarsQD == __pyx_v_nVars); if (__pyx_t_14) { /* "vcfutils.pyx":1342 * * if nVarsQD == nVars: * FILTER[v].append('QD') # <<<<<<<<<<<<<< * * if nVarsHapScore == nVars: */ __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_12, ((PyObject *)__pyx_n_s__QD)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L18; } __pyx_L18:; /* "vcfutils.pyx":1344 * FILTER[v].append('QD') * * if nVarsHapScore == nVars: # <<<<<<<<<<<<<< * FILTER[v].append('HapScore') * */ __pyx_t_14 = (__pyx_v_nVarsHapScore == __pyx_v_nVars); if (__pyx_t_14) { /* "vcfutils.pyx":1345 * * if nVarsHapScore == nVars: * FILTER[v].append('HapScore') # <<<<<<<<<<<<<< * * if nVarsRMSMQ == nVars: */ __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_7, ((PyObject *)__pyx_n_s__HapScore)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L19; } __pyx_L19:; /* "vcfutils.pyx":1347 * FILTER[v].append('HapScore') * * if nVarsRMSMQ == nVars: # <<<<<<<<<<<<<< * FILTER[v].append('MQ') * */ __pyx_t_14 = (__pyx_v_nVarsRMSMQ == __pyx_v_nVars); if (__pyx_t_14) { /* "vcfutils.pyx":1348 * * if nVarsRMSMQ == nVars: * FILTER[v].append('MQ') # <<<<<<<<<<<<<< * * if nVarsSB == nVars: */ __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_12, ((PyObject *)__pyx_n_s__MQ)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L20; } __pyx_L20:; /* "vcfutils.pyx":1350 * FILTER[v].append('MQ') * * if nVarsSB == nVars: # <<<<<<<<<<<<<< * FILTER[v].append('strandBias') * */ __pyx_t_14 = (__pyx_v_nVarsSB == __pyx_v_nVars); if (__pyx_t_14) { /* "vcfutils.pyx":1351 * * if nVarsSB == nVars: * FILTER[v].append('strandBias') # <<<<<<<<<<<<<< * * if nVarsAB == nVars: */ __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_7, ((PyObject *)__pyx_n_s__strandBias)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L21; } __pyx_L21:; /* "vcfutils.pyx":1353 * FILTER[v].append('strandBias') * * if nVarsAB == nVars: # <<<<<<<<<<<<<< * FILTER[v].append('alleleBias') * */ __pyx_t_14 = (__pyx_v_nVarsAB == __pyx_v_nVars); if (__pyx_t_14) { /* "vcfutils.pyx":1354 * * if nVarsAB == nVars: * FILTER[v].append('alleleBias') # <<<<<<<<<<<<<< * * if nVarsFailingMMLQFilter == nVars or BRF >= filteredReadsFrac: */ __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_12, ((PyObject *)__pyx_n_s__alleleBias)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L22; } __pyx_L22:; /* "vcfutils.pyx":1356 * FILTER[v].append('alleleBias') * * if nVarsFailingMMLQFilter == nVars or BRF >= filteredReadsFrac: # <<<<<<<<<<<<<< * FILTER[v].append('badReads') * */ __pyx_t_14 = (__pyx_v_nVarsFailingMMLQFilter == __pyx_v_nVars); if (!__pyx_t_14) { __pyx_t_10 = (__pyx_v_BRF >= __pyx_v_filteredReadsFrac); __pyx_t_13 = __pyx_t_10; } else { __pyx_t_13 = __pyx_t_14; } if (__pyx_t_13) { /* "vcfutils.pyx":1357 * * if nVarsFailingMMLQFilter == nVars or BRF >= filteredReadsFrac: * FILTER[v].append('badReads') # <<<<<<<<<<<<<< * * if bestQual < 20: */ __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_7, ((PyObject *)__pyx_n_s__badReads)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L23; } __pyx_L23:; /* "vcfutils.pyx":1359 * FILTER[v].append('badReads') * * if bestQual < 20: # <<<<<<<<<<<<<< * FILTER[v].append('Q20') * */ __pyx_t_13 = (__pyx_v_bestQual < 20); if (__pyx_t_13) { /* "vcfutils.pyx":1360 * * if bestQual < 20: * FILTER[v].append('Q20') # <<<<<<<<<<<<<< * * return FILTER */ __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_FILTER), ((PyObject *)__pyx_v_v)); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_12, ((PyObject *)__pyx_n_s__Q20)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L24; } __pyx_L24:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "vcfutils.pyx":1362 * FILTER[v].append('Q20') * * return FILTER # <<<<<<<<<<<<<< * * ################################################################################################### */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_FILTER)); __pyx_r = __pyx_v_FILTER; goto __pyx_L0; __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("vcfutils.vcfFILTER", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_v); __Pyx_XDECREF(__pyx_v_FILTER); __Pyx_XDECREF(__pyx_v_infoThisVar); __Pyx_XDECREF(__pyx_v_pos); __Pyx_XDECREF(__pyx_v_varsAtPos); __Pyx_XDECREF(__pyx_v_sequence); __Pyx_XDECREF(__pyx_v_totalForwardVarReads); __Pyx_XDECREF(__pyx_v_totalReverseVarReads); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":346 * * # And here are accessor functions for the bit-fields * cdef inline int Read_IsReverse(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FREVERSE) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsReverse(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsReverse", 0); /* "samtoolsWrapper.pxd":347 * # And here are accessor functions for the bit-fields * cdef inline int Read_IsReverse(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FREVERSE) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_IsPaired(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 16) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":349 * return ( (theRead.bitFlag & BAM_FREVERSE) != 0) * * cdef inline int Read_IsPaired(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FPAIRED) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsPaired(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsPaired", 0); /* "samtoolsWrapper.pxd":350 * * cdef inline int Read_IsPaired(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FPAIRED) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_IsProperPair(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 1) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":352 * return ( (theRead.bitFlag & BAM_FPAIRED) != 0) * * cdef inline int Read_IsProperPair(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FPROPER_PAIR) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsProperPair(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsProperPair", 0); /* "samtoolsWrapper.pxd":353 * * cdef inline int Read_IsProperPair(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FPROPER_PAIR) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_IsDuplicate(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 2) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":355 * return ( (theRead.bitFlag & BAM_FPROPER_PAIR) != 0) * * cdef inline int Read_IsDuplicate(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FDUP) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsDuplicate(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsDuplicate", 0); /* "samtoolsWrapper.pxd":356 * * cdef inline int Read_IsDuplicate(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FDUP) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_IsUnmapped(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 1024) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":358 * return ( (theRead.bitFlag & BAM_FDUP) != 0) * * cdef inline int Read_IsUnmapped(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FUNMAP) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsUnmapped(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsUnmapped", 0); /* "samtoolsWrapper.pxd":359 * * cdef inline int Read_IsUnmapped(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FUNMAP) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_MateIsUnmapped(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 4) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":361 * return ( (theRead.bitFlag & BAM_FUNMAP) != 0) * * cdef inline int Read_MateIsUnmapped(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FMUNMAP) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_MateIsUnmapped(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_MateIsUnmapped", 0); /* "samtoolsWrapper.pxd":362 * * cdef inline int Read_MateIsUnmapped(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FMUNMAP) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_MateIsReverse(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 8) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":364 * return ( (theRead.bitFlag & BAM_FMUNMAP) != 0) * * cdef inline int Read_MateIsReverse(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FMREVERSE) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_MateIsReverse(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_MateIsReverse", 0); /* "samtoolsWrapper.pxd":365 * * cdef inline int Read_MateIsReverse(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FMREVERSE) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_IsQCFail(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 32) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":367 * return ( (theRead.bitFlag & BAM_FMREVERSE) != 0) * * cdef inline int Read_IsQCFail(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FQCFAIL) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsQCFail(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsQCFail", 0); /* "samtoolsWrapper.pxd":368 * * cdef inline int Read_IsQCFail(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FQCFAIL) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_IsReadOne(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 512) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":370 * return ( (theRead.bitFlag & BAM_FQCFAIL) != 0) * * cdef inline int Read_IsReadOne(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FREAD1) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsReadOne(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsReadOne", 0); /* "samtoolsWrapper.pxd":371 * * cdef inline int Read_IsReadOne(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FREAD1) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_IsSecondaryAlignment(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 64) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":373 * return ( (theRead.bitFlag & BAM_FREAD1) != 0) * * cdef inline int Read_IsSecondaryAlignment(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FSECONDARY) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsSecondaryAlignment(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsSecondaryAlignment", 0); /* "samtoolsWrapper.pxd":374 * * cdef inline int Read_IsSecondaryAlignment(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FSECONDARY) != 0) # <<<<<<<<<<<<<< * * cdef inline int Read_IsCompressed(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 256) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":376 * return ( (theRead.bitFlag & BAM_FSECONDARY) != 0) * * cdef inline int Read_IsCompressed(cAlignedRead* theRead): # <<<<<<<<<<<<<< * return ( (theRead.bitFlag & BAM_FCOMPRESSED) != 0) * */ static CYTHON_INLINE int __pyx_f_15samtoolsWrapper_Read_IsCompressed(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_IsCompressed", 0); /* "samtoolsWrapper.pxd":377 * * cdef inline int Read_IsCompressed(cAlignedRead* theRead): * return ( (theRead.bitFlag & BAM_FCOMPRESSED) != 0) # <<<<<<<<<<<<<< * * cdef inline void Read_SetQCFail(cAlignedRead* theRead): */ __pyx_r = ((__pyx_v_theRead->bitFlag & 2048) != 0); goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "samtoolsWrapper.pxd":379 * return ( (theRead.bitFlag & BAM_FCOMPRESSED) != 0) * * cdef inline void Read_SetQCFail(cAlignedRead* theRead): # <<<<<<<<<<<<<< * theRead.bitFlag |= BAM_FQCFAIL * */ static CYTHON_INLINE void __pyx_f_15samtoolsWrapper_Read_SetQCFail(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_SetQCFail", 0); /* "samtoolsWrapper.pxd":380 * * cdef inline void Read_SetQCFail(cAlignedRead* theRead): * theRead.bitFlag |= BAM_FQCFAIL # <<<<<<<<<<<<<< * * cdef inline void Read_SetCompressed(cAlignedRead* theRead): */ __pyx_v_theRead->bitFlag = (__pyx_v_theRead->bitFlag | 512); __Pyx_RefNannyFinishContext(); } /* "samtoolsWrapper.pxd":382 * theRead.bitFlag |= BAM_FQCFAIL * * cdef inline void Read_SetCompressed(cAlignedRead* theRead): # <<<<<<<<<<<<<< * theRead.bitFlag |= BAM_FCOMPRESSED * */ static CYTHON_INLINE void __pyx_f_15samtoolsWrapper_Read_SetCompressed(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_SetCompressed", 0); /* "samtoolsWrapper.pxd":383 * * cdef inline void Read_SetCompressed(cAlignedRead* theRead): * theRead.bitFlag |= BAM_FCOMPRESSED # <<<<<<<<<<<<<< * * cdef inline void Read_SetUnCompressed(cAlignedRead* theRead): */ __pyx_v_theRead->bitFlag = (__pyx_v_theRead->bitFlag | 2048); __Pyx_RefNannyFinishContext(); } /* "samtoolsWrapper.pxd":385 * theRead.bitFlag |= BAM_FCOMPRESSED * * cdef inline void Read_SetUnCompressed(cAlignedRead* theRead): # <<<<<<<<<<<<<< * theRead.bitFlag &= (~BAM_FCOMPRESSED) * */ static CYTHON_INLINE void __pyx_f_15samtoolsWrapper_Read_SetUnCompressed(__pyx_t_15samtoolsWrapper_cAlignedRead *__pyx_v_theRead) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_SetUnCompressed", 0); /* "samtoolsWrapper.pxd":386 * * cdef inline void Read_SetUnCompressed(cAlignedRead* theRead): * theRead.bitFlag &= (~BAM_FCOMPRESSED) # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_v_theRead->bitFlag = (__pyx_v_theRead->bitFlag & (~2048)); __Pyx_RefNannyFinishContext(); } static PyObject *__pyx_tp_new_8vcfutils___pyx_scope_struct__trimLeftPadding(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; p = ((struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *)o); p->__pyx_v_alt = 0; return o; } static void __pyx_tp_dealloc_8vcfutils___pyx_scope_struct__trimLeftPadding(PyObject *o) { struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *p = (struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *)o; Py_CLEAR(p->__pyx_v_alt); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_8vcfutils___pyx_scope_struct__trimLeftPadding(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *p = (struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *)o; if (p->__pyx_v_alt) { e = (*v)(p->__pyx_v_alt, a); if (e) return e; } return 0; } static int __pyx_tp_clear_8vcfutils___pyx_scope_struct__trimLeftPadding(PyObject *o) { struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *p = (struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_alt); p->__pyx_v_alt = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_8vcfutils___pyx_scope_struct__trimLeftPadding[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct__trimLeftPadding = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__trimLeftPadding = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct__trimLeftPadding = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct__trimLeftPadding = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*bf_getbuffer*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*bf_releasebuffer*/ #endif }; static PyTypeObject __pyx_type_8vcfutils___pyx_scope_struct__trimLeftPadding = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("vcfutils.__pyx_scope_struct__trimLeftPadding"), /*tp_name*/ sizeof(struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8vcfutils___pyx_scope_struct__trimLeftPadding, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number___pyx_scope_struct__trimLeftPadding, /*tp_as_number*/ &__pyx_tp_as_sequence___pyx_scope_struct__trimLeftPadding, /*tp_as_sequence*/ &__pyx_tp_as_mapping___pyx_scope_struct__trimLeftPadding, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer___pyx_scope_struct__trimLeftPadding, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_8vcfutils___pyx_scope_struct__trimLeftPadding, /*tp_traverse*/ __pyx_tp_clear_8vcfutils___pyx_scope_struct__trimLeftPadding, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8vcfutils___pyx_scope_struct__trimLeftPadding, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8vcfutils___pyx_scope_struct__trimLeftPadding, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif }; static PyObject *__pyx_tp_new_8vcfutils___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; p = ((struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *)o); p->__pyx_outer_scope = 0; p->__pyx_v_allele = 0; p->__pyx_t_0 = 0; return o; } static void __pyx_tp_dealloc_8vcfutils___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *)o; Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_allele); Py_CLEAR(p->__pyx_t_0); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_8vcfutils___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_allele) { e = (*v)(p->__pyx_v_allele, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static int __pyx_tp_clear_8vcfutils___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_8vcfutils___pyx_scope_struct__trimLeftPadding *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_allele); p->__pyx_v_allele = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_8vcfutils___pyx_scope_struct_1_genexpr[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1_genexpr = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_1_genexpr = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_1_genexpr = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1_genexpr = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*bf_getbuffer*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*bf_releasebuffer*/ #endif }; static PyTypeObject __pyx_type_8vcfutils___pyx_scope_struct_1_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("vcfutils.__pyx_scope_struct_1_genexpr"), /*tp_name*/ sizeof(struct __pyx_obj_8vcfutils___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8vcfutils___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number___pyx_scope_struct_1_genexpr, /*tp_as_number*/ &__pyx_tp_as_sequence___pyx_scope_struct_1_genexpr, /*tp_as_sequence*/ &__pyx_tp_as_mapping___pyx_scope_struct_1_genexpr, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer___pyx_scope_struct_1_genexpr, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_8vcfutils___pyx_scope_struct_1_genexpr, /*tp_traverse*/ __pyx_tp_clear_8vcfutils___pyx_scope_struct_1_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8vcfutils___pyx_scope_struct_1_genexpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8vcfutils___pyx_scope_struct_1_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, __Pyx_NAMESTR("vcfutils"), __Pyx_DOCSTR(__pyx_k_20), /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, {&__pyx_kp_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 0}, {&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0}, {&__pyx_kp_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 0}, {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_kp_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 0}, {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, {&__pyx_n_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 1}, {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0}, {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0}, {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0}, {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0}, {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0}, {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0}, {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0}, {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0}, {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0}, {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0}, {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0}, {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0}, {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0}, {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0}, {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0}, {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0}, {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0}, {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0}, {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, {&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0}, {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0}, {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0}, {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0}, {&__pyx_kp_s_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 0, 1, 0}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0}, {&__pyx_kp_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 0}, {&__pyx_kp_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 0}, {&__pyx_kp_s_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 0, 1, 0}, {&__pyx_kp_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 0}, {&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0}, {&__pyx_n_s__ABPV, __pyx_k__ABPV, sizeof(__pyx_k__ABPV), 0, 0, 1, 1}, {&__pyx_n_s__Assembler, __pyx_k__Assembler, sizeof(__pyx_k__Assembler), 0, 0, 1, 1}, {&__pyx_n_s__BE, __pyx_k__BE, sizeof(__pyx_k__BE), 0, 0, 1, 1}, {&__pyx_n_s__BRF, __pyx_k__BRF, sizeof(__pyx_k__BRF), 0, 0, 1, 1}, {&__pyx_n_s__BS, __pyx_k__BS, sizeof(__pyx_k__BS), 0, 0, 1, 1}, {&__pyx_n_s__FORMAT, __pyx_k__FORMAT, sizeof(__pyx_k__FORMAT), 0, 0, 1, 1}, {&__pyx_n_s__FR, __pyx_k__FR, sizeof(__pyx_k__FR), 0, 0, 1, 1}, {&__pyx_n_s__FS, __pyx_k__FS, sizeof(__pyx_k__FS), 0, 0, 1, 1}, {&__pyx_n_s__File, __pyx_k__File, sizeof(__pyx_k__File), 0, 0, 1, 1}, {&__pyx_n_s__Flag, __pyx_k__Flag, sizeof(__pyx_k__Flag), 0, 0, 1, 1}, {&__pyx_n_s__Float, __pyx_k__Float, sizeof(__pyx_k__Float), 0, 0, 1, 1}, {&__pyx_n_s__GL, __pyx_k__GL, sizeof(__pyx_k__GL), 0, 0, 1, 1}, {&__pyx_n_s__GOF, __pyx_k__GOF, sizeof(__pyx_k__GOF), 0, 0, 1, 1}, {&__pyx_n_s__GQ, __pyx_k__GQ, sizeof(__pyx_k__GQ), 0, 0, 1, 1}, {&__pyx_n_s__GT, __pyx_k__GT, sizeof(__pyx_k__GT), 0, 0, 1, 1}, {&__pyx_n_s__HP, __pyx_k__HP, sizeof(__pyx_k__HP), 0, 0, 1, 1}, {&__pyx_n_s__HapScore, __pyx_k__HapScore, sizeof(__pyx_k__HapScore), 0, 0, 1, 1}, {&__pyx_n_s__Integer, __pyx_k__Integer, sizeof(__pyx_k__Integer), 0, 0, 1, 1}, {&__pyx_n_s__Log, __pyx_k__Log, sizeof(__pyx_k__Log), 0, 0, 1, 1}, {&__pyx_n_s__MGOF, __pyx_k__MGOF, sizeof(__pyx_k__MGOF), 0, 0, 1, 1}, {&__pyx_n_s__MMLQ, __pyx_k__MMLQ, sizeof(__pyx_k__MMLQ), 0, 0, 1, 1}, {&__pyx_n_s__MQ, __pyx_k__MQ, sizeof(__pyx_k__MQ), 0, 0, 1, 1}, {&__pyx_n_s__NF, __pyx_k__NF, sizeof(__pyx_k__NF), 0, 0, 1, 1}, {&__pyx_n_s__NR, __pyx_k__NR, sizeof(__pyx_k__NR), 0, 0, 1, 1}, {&__pyx_n_s__NV, __pyx_k__NV, sizeof(__pyx_k__NV), 0, 0, 1, 1}, {&__pyx_n_s__PP, __pyx_k__PP, sizeof(__pyx_k__PP), 0, 0, 1, 1}, {&__pyx_n_s__Platypus, __pyx_k__Platypus, sizeof(__pyx_k__Platypus), 0, 0, 1, 1}, {&__pyx_n_s__Q20, __pyx_k__Q20, sizeof(__pyx_k__Q20), 0, 0, 1, 1}, {&__pyx_n_s__QD, __pyx_k__QD, sizeof(__pyx_k__QD), 0, 0, 1, 1}, {&__pyx_n_s__QualDepth, __pyx_k__QualDepth, sizeof(__pyx_k__QualDepth), 0, 0, 1, 1}, {&__pyx_n_s__REFCALL, __pyx_k__REFCALL, sizeof(__pyx_k__REFCALL), 0, 0, 1, 1}, {&__pyx_n_s__ReadPosRankSum, __pyx_k__ReadPosRankSum, sizeof(__pyx_k__ReadPosRankSum), 0, 0, 1, 1}, {&__pyx_n_s__SC, __pyx_k__SC, sizeof(__pyx_k__SC), 0, 0, 1, 1}, {&__pyx_n_s__SbPval, __pyx_k__SbPval, sizeof(__pyx_k__SbPval), 0, 0, 1, 1}, {&__pyx_n_s__Size, __pyx_k__Size, sizeof(__pyx_k__Size), 0, 0, 1, 1}, {&__pyx_n_s__Source, __pyx_k__Source, sizeof(__pyx_k__Source), 0, 0, 1, 1}, {&__pyx_n_s__String, __pyx_k__String, sizeof(__pyx_k__String), 0, 0, 1, 1}, {&__pyx_n_s__TC, __pyx_k__TC, sizeof(__pyx_k__TC), 0, 0, 1, 1}, {&__pyx_n_s__TCF, __pyx_k__TCF, sizeof(__pyx_k__TCF), 0, 0, 1, 1}, {&__pyx_n_s__TCR, __pyx_k__TCR, sizeof(__pyx_k__TCR), 0, 0, 1, 1}, {&__pyx_n_s__TR, __pyx_k__TR, sizeof(__pyx_k__TR), 0, 0, 1, 1}, {&__pyx_n_s__WE, __pyx_k__WE, sizeof(__pyx_k__WE), 0, 0, 1, 1}, {&__pyx_n_s__WS, __pyx_k__WS, sizeof(__pyx_k__WS), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s__abThreshold, __pyx_k__abThreshold, sizeof(__pyx_k__abThreshold), 0, 0, 1, 1}, {&__pyx_n_s__allele, __pyx_k__allele, sizeof(__pyx_k__allele), 0, 0, 1, 1}, {&__pyx_n_s__alleleBias, __pyx_k__alleleBias, sizeof(__pyx_k__alleleBias), 0, 0, 1, 1}, {&__pyx_n_s__alt, __pyx_k__alt, sizeof(__pyx_k__alt), 0, 0, 1, 1}, {&__pyx_n_s__badReads, __pyx_k__badReads, sizeof(__pyx_k__badReads), 0, 0, 1, 1}, {&__pyx_n_s__badReadsThreshold, __pyx_k__badReadsThreshold, sizeof(__pyx_k__badReadsThreshold), 0, 0, 1, 1}, {&__pyx_n_s__badReadsWindow, __pyx_k__badReadsWindow, sizeof(__pyx_k__badReadsWindow), 0, 0, 1, 1}, {&__pyx_n_s__chrom, __pyx_k__chrom, sizeof(__pyx_k__chrom), 0, 0, 1, 1}, {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1}, {&__pyx_n_s__debug, __pyx_k__debug, sizeof(__pyx_k__debug), 0, 0, 1, 1}, {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1}, {&__pyx_n_s__filter, __pyx_k__filter, sizeof(__pyx_k__filter), 0, 0, 1, 1}, {&__pyx_n_s__filteredReadsFrac, __pyx_k__filteredReadsFrac, sizeof(__pyx_k__filteredReadsFrac), 0, 0, 1, 1}, {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1}, {&__pyx_n_s__getLogger, __pyx_k__getLogger, sizeof(__pyx_k__getLogger), 0, 0, 1, 1}, {&__pyx_n_s__getfilter, __pyx_k__getfilter, sizeof(__pyx_k__getfilter), 0, 0, 1, 1}, {&__pyx_n_s__hapScoreThreshold, __pyx_k__hapScoreThreshold, sizeof(__pyx_k__hapScoreThreshold), 0, 0, 1, 1}, {&__pyx_n_s__hp10, __pyx_k__hp10, sizeof(__pyx_k__hp10), 0, 0, 1, 1}, {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1}, {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1}, {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1}, {&__pyx_n_s__iteritems, __pyx_k__iteritems, sizeof(__pyx_k__iteritems), 0, 0, 1, 1}, {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1}, {&__pyx_n_s__len, __pyx_k__len, sizeof(__pyx_k__len), 0, 0, 1, 1}, {&__pyx_n_s__logger, __pyx_k__logger, sizeof(__pyx_k__logger), 0, 0, 1, 1}, {&__pyx_n_s__logging, __pyx_k__logging, sizeof(__pyx_k__logging), 0, 0, 1, 1}, {&__pyx_n_s__map, __pyx_k__map, sizeof(__pyx_k__map), 0, 0, 1, 1}, {&__pyx_n_s__max, __pyx_k__max, sizeof(__pyx_k__max), 0, 0, 1, 1}, {&__pyx_n_s__maxGOF, __pyx_k__maxGOF, sizeof(__pyx_k__maxGOF), 0, 0, 1, 1}, {&__pyx_n_s__maxRefPos, __pyx_k__maxRefPos, sizeof(__pyx_k__maxRefPos), 0, 0, 1, 1}, {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1}, {&__pyx_n_s__minBaseQual, __pyx_k__minBaseQual, sizeof(__pyx_k__minBaseQual), 0, 0, 1, 1}, {&__pyx_n_s__minMapQual, __pyx_k__minMapQual, sizeof(__pyx_k__minMapQual), 0, 0, 1, 1}, {&__pyx_n_s__minPosterior, __pyx_k__minPosterior, sizeof(__pyx_k__minPosterior), 0, 0, 1, 1}, {&__pyx_n_s__minReads, __pyx_k__minReads, sizeof(__pyx_k__minReads), 0, 0, 1, 1}, {&__pyx_n_s__minRefPos, __pyx_k__minRefPos, sizeof(__pyx_k__minRefPos), 0, 0, 1, 1}, {&__pyx_n_s__nReadsPerSample, __pyx_k__nReadsPerSample, sizeof(__pyx_k__nReadsPerSample), 0, 0, 1, 1}, {&__pyx_n_s__nVarReadsPerSample, __pyx_k__nVarReadsPerSample, sizeof(__pyx_k__nVarReadsPerSample), 0, 0, 1, 1}, {&__pyx_n_s__options, __pyx_k__options, sizeof(__pyx_k__options), 0, 0, 1, 1}, {&__pyx_n_s__outputFile, __pyx_k__outputFile, sizeof(__pyx_k__outputFile), 0, 0, 1, 1}, {&__pyx_n_s__outputRefCalls, __pyx_k__outputRefCalls, sizeof(__pyx_k__outputRefCalls), 0, 0, 1, 1}, {&__pyx_n_s__pop, __pyx_k__pop, sizeof(__pyx_k__pop), 0, 0, 1, 1}, {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1}, {&__pyx_n_s__pyvcf, __pyx_k__pyvcf, sizeof(__pyx_k__pyvcf), 0, 0, 1, 1}, {&__pyx_n_s__qdThreshold, __pyx_k__qdThreshold, sizeof(__pyx_k__qdThreshold), 0, 0, 1, 1}, {&__pyx_n_s__qual, __pyx_k__qual, sizeof(__pyx_k__qual), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1}, {&__pyx_n_s__refName, __pyx_k__refName, sizeof(__pyx_k__refName), 0, 0, 1, 1}, {&__pyx_n_s__reverse, __pyx_k__reverse, sizeof(__pyx_k__reverse), 0, 0, 1, 1}, {&__pyx_n_s__rmsmqThreshold, __pyx_k__rmsmqThreshold, sizeof(__pyx_k__rmsmqThreshold), 0, 0, 1, 1}, {&__pyx_n_s__round, __pyx_k__round, sizeof(__pyx_k__round), 0, 0, 1, 1}, {&__pyx_n_s__sbThreshold, __pyx_k__sbThreshold, sizeof(__pyx_k__sbThreshold), 0, 0, 1, 1}, {&__pyx_n_s__scThreshold, __pyx_k__scThreshold, sizeof(__pyx_k__scThreshold), 0, 0, 1, 1}, {&__pyx_n_s__sorted, __pyx_k__sorted, sizeof(__pyx_k__sorted), 0, 0, 1, 1}, {&__pyx_n_s__strandBias, __pyx_k__strandBias, sizeof(__pyx_k__strandBias), 0, 0, 1, 1}, {&__pyx_n_s__sum, __pyx_k__sum, sizeof(__pyx_k__sum), 0, 0, 1, 1}, {&__pyx_n_s__trimLeftPadding, __pyx_k__trimLeftPadding, sizeof(__pyx_k__trimLeftPadding), 0, 0, 1, 1}, {&__pyx_n_s__upper, __pyx_k__upper, sizeof(__pyx_k__upper), 0, 0, 1, 1}, {&__pyx_n_s__vcfDataLine, __pyx_k__vcfDataLine, sizeof(__pyx_k__vcfDataLine), 0, 0, 1, 1}, {&__pyx_n_s__vcfFile, __pyx_k__vcfFile, sizeof(__pyx_k__vcfFile), 0, 0, 1, 1}, {&__pyx_n_s__vcfFilterSignature, __pyx_k__vcfFilterSignature, sizeof(__pyx_k__vcfFilterSignature), 0, 0, 1, 1}, {&__pyx_n_s__vcfFormatSignature, __pyx_k__vcfFormatSignature, sizeof(__pyx_k__vcfFormatSignature), 0, 0, 1, 1}, {&__pyx_n_s__vcfInfoSignature, __pyx_k__vcfInfoSignature, sizeof(__pyx_k__vcfInfoSignature), 0, 0, 1, 1}, {&__pyx_n_s__vcfutils, __pyx_k__vcfutils, sizeof(__pyx_k__vcfutils), 0, 0, 1, 1}, {&__pyx_n_s__verbosity, __pyx_k__verbosity, sizeof(__pyx_k__verbosity), 0, 0, 1, 1}, {&__pyx_n_s__write_data, __pyx_k__write_data, sizeof(__pyx_k__write_data), 0, 0, 1, 1}, {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_sorted = __Pyx_GetName(__pyx_b, __pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_max = __Pyx_GetName(__pyx_b, __pyx_n_s__max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_round = __Pyx_GetName(__pyx_b, __pyx_n_s__round); if (!__pyx_builtin_round) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_min = __Pyx_GetName(__pyx_b, __pyx_n_s__min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION >= 3 __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __pyx_builtin_sum = __Pyx_GetName(__pyx_b, __pyx_n_s__sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "vcfutils.pyx":425 * if options.verbosity >= 3: * logger.debug("Haps are %s" %(haplotypes)) * logger.debug("Logging mutated sequences...") # <<<<<<<<<<<<<< * logger.debug("Lengths are %s" %([len(str(haplotype.getMutatedSequence())) for haplotype in haplotypes])) * */ __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_3); __Pyx_INCREF(((PyObject *)__pyx_kp_s_2)); PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_kp_s_2)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3)); /* "vcfutils.pyx":551 * * # These are just temporary values. Don't output them * vcfDataLine['info'].pop('nReadsPerSample') # <<<<<<<<<<<<<< * vcfDataLine['info'].pop('nVarReadsPerSample') * vcfDataLine['info'].pop('ABPV') */ __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_13); __Pyx_INCREF(((PyObject *)__pyx_n_s__nReadsPerSample)); PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_n_s__nReadsPerSample)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nReadsPerSample)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13)); /* "vcfutils.pyx":552 * # These are just temporary values. Don't output them * vcfDataLine['info'].pop('nReadsPerSample') * vcfDataLine['info'].pop('nVarReadsPerSample') # <<<<<<<<<<<<<< * vcfDataLine['info'].pop('ABPV') * vcfDataLine['info']['MGOF'] = [int(round(maxGofValue, 2))] */ __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_14); __Pyx_INCREF(((PyObject *)__pyx_n_s__nVarReadsPerSample)); PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_n_s__nVarReadsPerSample)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nVarReadsPerSample)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); /* "vcfutils.pyx":553 * vcfDataLine['info'].pop('nReadsPerSample') * vcfDataLine['info'].pop('nVarReadsPerSample') * vcfDataLine['info'].pop('ABPV') # <<<<<<<<<<<<<< * vcfDataLine['info']['MGOF'] = [int(round(maxGofValue, 2))] * */ __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_15); __Pyx_INCREF(((PyObject *)__pyx_n_s__ABPV)); PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_n_s__ABPV)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ABPV)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15)); /* "vcfutils.pyx":35 * from samtoolsWrapper cimport Read_SetQCFail * * logger = logging.getLogger("Log") # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_21); __Pyx_INCREF(((PyObject *)__pyx_n_s__Log)); PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_n_s__Log)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Log)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21)); /* "vcfutils.pyx":69 * # Definititons for the individual and filter fields included in the header * vcfInfoSignature = { * "FR":pyvcf.FORMAT('FR',1,".",'Float','Estimated population frequency of variant',-1), # <<<<<<<<<<<<<< * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), */ __pyx_k_tuple_23 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_23); __Pyx_INCREF(((PyObject *)__pyx_n_s__FR)); PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_n_s__FR)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FR)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_23, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_23, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_23, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyTuple_SET_ITEM(__pyx_k_tuple_23, 4, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_23, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); /* "vcfutils.pyx":70 * vcfInfoSignature = { * "FR":pyvcf.FORMAT('FR',1,".",'Float','Estimated population frequency of variant',-1), * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), # <<<<<<<<<<<<<< * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), */ __pyx_k_tuple_25 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_25); __Pyx_INCREF(((PyObject *)__pyx_n_s__PP)); PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_n_s__PP)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PP)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_25, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_25, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_25, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_24)); PyTuple_SET_ITEM(__pyx_k_tuple_25, 4, ((PyObject *)__pyx_kp_s_24)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_25, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); /* "vcfutils.pyx":71 * "FR":pyvcf.FORMAT('FR',1,".",'Float','Estimated population frequency of variant',-1), * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), # <<<<<<<<<<<<<< * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), */ __pyx_k_tuple_27 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_27); __Pyx_INCREF(((PyObject *)__pyx_n_s__TC)); PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_n_s__TC)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__TC)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_27, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_27, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_27, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_26)); PyTuple_SET_ITEM(__pyx_k_tuple_27, 4, ((PyObject *)__pyx_kp_s_26)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_26)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_27, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27)); /* "vcfutils.pyx":72 * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), # <<<<<<<<<<<<<< * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), */ __pyx_k_tuple_29 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_29); __Pyx_INCREF(((PyObject *)__pyx_n_s__WS)); PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_n_s__WS)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__WS)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_29, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_29, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_29, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_28)); PyTuple_SET_ITEM(__pyx_k_tuple_29, 4, ((PyObject *)__pyx_kp_s_28)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_29, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29)); /* "vcfutils.pyx":73 * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), # <<<<<<<<<<<<<< * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), */ __pyx_k_tuple_31 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_31); __Pyx_INCREF(((PyObject *)__pyx_n_s__WE)); PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_n_s__WE)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__WE)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_31, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_31, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_31, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_30)); PyTuple_SET_ITEM(__pyx_k_tuple_31, 4, ((PyObject *)__pyx_kp_s_30)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_31, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31)); /* "vcfutils.pyx":74 * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), # <<<<<<<<<<<<<< * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), */ __pyx_k_tuple_33 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_33); __Pyx_INCREF(((PyObject *)__pyx_n_s__TCR)); PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_n_s__TCR)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__TCR)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_33, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_33, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_33, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_32)); PyTuple_SET_ITEM(__pyx_k_tuple_33, 4, ((PyObject *)__pyx_kp_s_32)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_33, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); /* "vcfutils.pyx":75 * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), # <<<<<<<<<<<<<< * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), */ __pyx_k_tuple_35 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_35); __Pyx_INCREF(((PyObject *)__pyx_n_s__TCF)); PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_n_s__TCF)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__TCF)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_35, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_35, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_35, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); PyTuple_SET_ITEM(__pyx_k_tuple_35, 4, ((PyObject *)__pyx_kp_s_34)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_35, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); /* "vcfutils.pyx":76 * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), # <<<<<<<<<<<<<< * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), */ __pyx_k_tuple_37 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_37); __Pyx_INCREF(((PyObject *)__pyx_n_s__TR)); PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_n_s__TR)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__TR)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_37, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_37, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_37, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_36)); PyTuple_SET_ITEM(__pyx_k_tuple_37, 4, ((PyObject *)__pyx_kp_s_36)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_36)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_37, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37)); /* "vcfutils.pyx":77 * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), # <<<<<<<<<<<<<< * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), */ __pyx_k_tuple_39 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_39); __Pyx_INCREF(((PyObject *)__pyx_n_s__NF)); PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_n_s__NF)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NF)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_39, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_39, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_39, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_38)); PyTuple_SET_ITEM(__pyx_k_tuple_39, 4, ((PyObject *)__pyx_kp_s_38)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_39, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39)); /* "vcfutils.pyx":78 * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), # <<<<<<<<<<<<<< * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), */ __pyx_k_tuple_41 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_41); __Pyx_INCREF(((PyObject *)__pyx_n_s__NR)); PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, ((PyObject *)__pyx_n_s__NR)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NR)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_41, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_41, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_41, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_40)); PyTuple_SET_ITEM(__pyx_k_tuple_41, 4, ((PyObject *)__pyx_kp_s_40)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_41, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); /* "vcfutils.pyx":79 * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), # <<<<<<<<<<<<<< * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), */ __pyx_k_tuple_43 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_43); __Pyx_INCREF(((PyObject *)__pyx_n_s__MGOF)); PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, ((PyObject *)__pyx_n_s__MGOF)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MGOF)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_43, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_43, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_43, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_42)); PyTuple_SET_ITEM(__pyx_k_tuple_43, 4, ((PyObject *)__pyx_kp_s_42)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_43, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); /* "vcfutils.pyx":80 * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), # <<<<<<<<<<<<<< * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), */ __pyx_k_tuple_45 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_45); __Pyx_INCREF(((PyObject *)__pyx_n_s__SC)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_n_s__SC)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SC)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_45, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_45, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__String)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 3, ((PyObject *)__pyx_n_s__String)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_44)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 4, ((PyObject *)__pyx_kp_s_44)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_44)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_45, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45)); /* "vcfutils.pyx":81 * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), # <<<<<<<<<<<<<< * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), */ __pyx_k_tuple_47 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_47); __Pyx_INCREF(((PyObject *)__pyx_n_s__HP)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_n_s__HP)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HP)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_47, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_47, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_46)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 4, ((PyObject *)__pyx_kp_s_46)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_46)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_47, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47)); /* "vcfutils.pyx":82 * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), # <<<<<<<<<<<<<< * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), */ __pyx_k_tuple_49 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_49); __Pyx_INCREF(((PyObject *)__pyx_n_s__BRF)); PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_n_s__BRF)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__BRF)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_49, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_49, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_49, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_48)); PyTuple_SET_ITEM(__pyx_k_tuple_49, 4, ((PyObject *)__pyx_kp_s_48)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_48)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_49, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49)); /* "vcfutils.pyx":83 * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), # <<<<<<<<<<<<<< * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), */ __pyx_k_tuple_51 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_51); __Pyx_INCREF(((PyObject *)__pyx_n_s__MMLQ)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_n_s__MMLQ)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MMLQ)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_51, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_51, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_50)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 4, ((PyObject *)__pyx_kp_s_50)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_50)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_51, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); /* "vcfutils.pyx":84 * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), # <<<<<<<<<<<<<< * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), */ __pyx_k_tuple_53 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_53); __Pyx_INCREF(((PyObject *)__pyx_n_s__QD)); PyTuple_SET_ITEM(__pyx_k_tuple_53, 0, ((PyObject *)__pyx_n_s__QD)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__QD)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_53, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_53, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_53, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_53, 4, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_53, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53)); /* "vcfutils.pyx":85 * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), # <<<<<<<<<<<<<< * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), */ __pyx_k_tuple_55 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_55); __Pyx_INCREF(((PyObject *)__pyx_n_s__Source)); PyTuple_SET_ITEM(__pyx_k_tuple_55, 0, ((PyObject *)__pyx_n_s__Source)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Source)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_55, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_55, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__String)); PyTuple_SET_ITEM(__pyx_k_tuple_55, 3, ((PyObject *)__pyx_n_s__String)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_54)); PyTuple_SET_ITEM(__pyx_k_tuple_55, 4, ((PyObject *)__pyx_kp_s_54)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_54)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_55, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55)); /* "vcfutils.pyx":86 * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), # <<<<<<<<<<<<<< * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), */ __pyx_k_tuple_57 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_57); __Pyx_INCREF(((PyObject *)__pyx_n_s__BS)); PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, ((PyObject *)__pyx_n_s__BS)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__BS)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_57, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_57, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_57, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_56)); PyTuple_SET_ITEM(__pyx_k_tuple_57, 4, ((PyObject *)__pyx_kp_s_56)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_57, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57)); /* "vcfutils.pyx":87 * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), # <<<<<<<<<<<<<< * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), */ __pyx_k_tuple_59 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_59); __Pyx_INCREF(((PyObject *)__pyx_n_s__BE)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_n_s__BE)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__BE)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_59, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_58)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 4, ((PyObject *)__pyx_kp_s_58)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_58)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_59, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); /* "vcfutils.pyx":88 * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), # <<<<<<<<<<<<<< * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), */ __pyx_k_tuple_61 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_61); __Pyx_INCREF(((PyObject *)__pyx_n_s__Size)); PyTuple_SET_ITEM(__pyx_k_tuple_61, 0, ((PyObject *)__pyx_n_s__Size)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Size)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_61, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_61, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_61, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_60)); PyTuple_SET_ITEM(__pyx_k_tuple_61, 4, ((PyObject *)__pyx_kp_s_60)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_61, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); /* "vcfutils.pyx":89 * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), # <<<<<<<<<<<<<< * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), * "FS":pyvcf.FORMAT('FS',1,".",'Float','Fisher\'s exact test for strand bias (Phred scale)',-1), */ __pyx_k_tuple_63 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_63); __Pyx_INCREF(((PyObject *)__pyx_n_s__HapScore)); PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_n_s__HapScore)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HapScore)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_63, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_63, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_63, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_62)); PyTuple_SET_ITEM(__pyx_k_tuple_63, 4, ((PyObject *)__pyx_kp_s_62)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_62)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_63, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); /* "vcfutils.pyx":90 * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), # <<<<<<<<<<<<<< * "FS":pyvcf.FORMAT('FS',1,".",'Float','Fisher\'s exact test for strand bias (Phred scale)',-1), * "SbPval":pyvcf.FORMAT('SbPval',1,".",'Float','Binomial P-value for strand bias test',-1), */ __pyx_k_tuple_65 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_65); __Pyx_INCREF(((PyObject *)__pyx_n_s__MQ)); PyTuple_SET_ITEM(__pyx_k_tuple_65, 0, ((PyObject *)__pyx_n_s__MQ)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MQ)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_65, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_65, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_65, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_64)); PyTuple_SET_ITEM(__pyx_k_tuple_65, 4, ((PyObject *)__pyx_kp_s_64)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_64)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_65, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65)); /* "vcfutils.pyx":91 * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), * "FS":pyvcf.FORMAT('FS',1,".",'Float','Fisher\'s exact test for strand bias (Phred scale)',-1), # <<<<<<<<<<<<<< * "SbPval":pyvcf.FORMAT('SbPval',1,".",'Float','Binomial P-value for strand bias test',-1), * # "MQRankSum":pyvcf.FORMAT('MQRankSum',1,".",'Float','Mann-Whitney Rank sum test for mapping quality difference between ref and alt (Phred scale)',-1), */ __pyx_k_tuple_67 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_67); __Pyx_INCREF(((PyObject *)__pyx_n_s__FS)); PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_n_s__FS)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FS)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_67, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_67, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_67, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_66)); PyTuple_SET_ITEM(__pyx_k_tuple_67, 4, ((PyObject *)__pyx_kp_s_66)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_67, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67)); /* "vcfutils.pyx":92 * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), * "FS":pyvcf.FORMAT('FS',1,".",'Float','Fisher\'s exact test for strand bias (Phred scale)',-1), * "SbPval":pyvcf.FORMAT('SbPval',1,".",'Float','Binomial P-value for strand bias test',-1), # <<<<<<<<<<<<<< * # "MQRankSum":pyvcf.FORMAT('MQRankSum',1,".",'Float','Mann-Whitney Rank sum test for mapping quality difference between ref and alt (Phred scale)',-1), * "ReadPosRankSum":pyvcf.FORMAT('ReadPosRankSum',1,".",'Float','Mann-Whitney Rank sum test for difference between in positions of variants in reads from ref and alt',-1), */ __pyx_k_tuple_69 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_69); __Pyx_INCREF(((PyObject *)__pyx_n_s__SbPval)); PyTuple_SET_ITEM(__pyx_k_tuple_69, 0, ((PyObject *)__pyx_n_s__SbPval)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SbPval)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_69, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_69, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_69, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_68)); PyTuple_SET_ITEM(__pyx_k_tuple_69, 4, ((PyObject *)__pyx_kp_s_68)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_68)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_69, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69)); /* "vcfutils.pyx":94 * "SbPval":pyvcf.FORMAT('SbPval',1,".",'Float','Binomial P-value for strand bias test',-1), * # "MQRankSum":pyvcf.FORMAT('MQRankSum',1,".",'Float','Mann-Whitney Rank sum test for mapping quality difference between ref and alt (Phred scale)',-1), * "ReadPosRankSum":pyvcf.FORMAT('ReadPosRankSum',1,".",'Float','Mann-Whitney Rank sum test for difference between in positions of variants in reads from ref and alt',-1), # <<<<<<<<<<<<<< * } * */ __pyx_k_tuple_71 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_71); __Pyx_INCREF(((PyObject *)__pyx_n_s__ReadPosRankSum)); PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_n_s__ReadPosRankSum)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ReadPosRankSum)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_71, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_71, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_71, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_70)); PyTuple_SET_ITEM(__pyx_k_tuple_71, 4, ((PyObject *)__pyx_kp_s_70)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_70)); __Pyx_INCREF(__pyx_int_neg_1); PyTuple_SET_ITEM(__pyx_k_tuple_71, 5, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71)); /* "vcfutils.pyx":98 * * vcfFilterSignature = { * "alleleBias":pyvcf.FORMAT('alleleBias',1,0,'Flag','Variant frequency is lower than expected for het','.'), # <<<<<<<<<<<<<< * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), */ __pyx_k_tuple_73 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_73); __Pyx_INCREF(((PyObject *)__pyx_n_s__alleleBias)); PyTuple_SET_ITEM(__pyx_k_tuple_73, 0, ((PyObject *)__pyx_n_s__alleleBias)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alleleBias)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_73, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_73, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_73, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_72)); PyTuple_SET_ITEM(__pyx_k_tuple_73, 4, ((PyObject *)__pyx_kp_s_72)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_72)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_73, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73)); /* "vcfutils.pyx":99 * vcfFilterSignature = { * "alleleBias":pyvcf.FORMAT('alleleBias',1,0,'Flag','Variant frequency is lower than expected for het','.'), * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), # <<<<<<<<<<<<<< * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), */ __pyx_k_tuple_75 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_75); __Pyx_INCREF(((PyObject *)__pyx_n_s__strandBias)); PyTuple_SET_ITEM(__pyx_k_tuple_75, 0, ((PyObject *)__pyx_n_s__strandBias)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__strandBias)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_75, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_75, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_75, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_74)); PyTuple_SET_ITEM(__pyx_k_tuple_75, 4, ((PyObject *)__pyx_kp_s_74)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_74)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_75, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75)); /* "vcfutils.pyx":100 * "alleleBias":pyvcf.FORMAT('alleleBias',1,0,'Flag','Variant frequency is lower than expected for het','.'), * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), # <<<<<<<<<<<<<< * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), */ __pyx_k_tuple_77 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_77); __Pyx_INCREF(((PyObject *)__pyx_n_s__badReads)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 0, ((PyObject *)__pyx_n_s__badReads)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__badReads)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_77, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_77, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_76)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 4, ((PyObject *)__pyx_kp_s_76)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_76)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77)); /* "vcfutils.pyx":101 * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), # <<<<<<<<<<<<<< * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), */ __pyx_k_tuple_79 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_79); __Pyx_INCREF(((PyObject *)__pyx_n_s__MQ)); PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, ((PyObject *)__pyx_n_s__MQ)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MQ)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_79, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_79, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_79, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_78)); PyTuple_SET_ITEM(__pyx_k_tuple_79, 4, ((PyObject *)__pyx_kp_s_78)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_78)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_79, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79)); /* "vcfutils.pyx":102 * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), # <<<<<<<<<<<<<< * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), */ __pyx_k_tuple_81 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_81); __Pyx_INCREF(((PyObject *)__pyx_n_s__Q20)); PyTuple_SET_ITEM(__pyx_k_tuple_81, 0, ((PyObject *)__pyx_n_s__Q20)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Q20)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_81, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_81, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_81, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_80)); PyTuple_SET_ITEM(__pyx_k_tuple_81, 4, ((PyObject *)__pyx_kp_s_80)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_80)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_81, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81)); /* "vcfutils.pyx":103 * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), # <<<<<<<<<<<<<< * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), */ __pyx_k_tuple_83 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_83); __Pyx_INCREF(((PyObject *)__pyx_n_s__HapScore)); PyTuple_SET_ITEM(__pyx_k_tuple_83, 0, ((PyObject *)__pyx_n_s__HapScore)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HapScore)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_83, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_83, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_83, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_82)); PyTuple_SET_ITEM(__pyx_k_tuple_83, 4, ((PyObject *)__pyx_kp_s_82)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_82)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_83, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83)); /* "vcfutils.pyx":104 * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), # <<<<<<<<<<<<<< * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), */ __pyx_k_tuple_85 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_85); __Pyx_INCREF(((PyObject *)__pyx_n_s__QualDepth)); PyTuple_SET_ITEM(__pyx_k_tuple_85, 0, ((PyObject *)__pyx_n_s__QualDepth)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__QualDepth)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_85, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_85, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_85, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_84)); PyTuple_SET_ITEM(__pyx_k_tuple_85, 4, ((PyObject *)__pyx_kp_s_84)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_84)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_85, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85)); /* "vcfutils.pyx":105 * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), # <<<<<<<<<<<<<< * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), */ __pyx_k_tuple_87 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_87); __Pyx_INCREF(((PyObject *)__pyx_n_s__GOF)); PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_n_s__GOF)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GOF)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_87, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_87, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_87, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_86)); PyTuple_SET_ITEM(__pyx_k_tuple_87, 4, ((PyObject *)__pyx_kp_s_86)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_86)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_87, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87)); /* "vcfutils.pyx":106 * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), # <<<<<<<<<<<<<< * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), * "QD":pyvcf.FORMAT('QD',1,0,'Flag','Variants fail quality/depth filter.','.'), */ __pyx_k_tuple_89 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_89); __Pyx_INCREF(((PyObject *)__pyx_n_s__hp10)); PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, ((PyObject *)__pyx_n_s__hp10)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hp10)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_89, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_89, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_89, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_88)); PyTuple_SET_ITEM(__pyx_k_tuple_89, 4, ((PyObject *)__pyx_kp_s_88)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_88)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_89, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89)); /* "vcfutils.pyx":107 * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), # <<<<<<<<<<<<<< * "QD":pyvcf.FORMAT('QD',1,0,'Flag','Variants fail quality/depth filter.','.'), * "SC":pyvcf.FORMAT('SC',1,0,'Flag','Variants fail sequence-context filter. Surrounding sequence is low-complexity','.'), */ __pyx_k_tuple_91 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_91); __Pyx_INCREF(((PyObject *)__pyx_n_s__REFCALL)); PyTuple_SET_ITEM(__pyx_k_tuple_91, 0, ((PyObject *)__pyx_n_s__REFCALL)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__REFCALL)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_91, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_91, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_91, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_90)); PyTuple_SET_ITEM(__pyx_k_tuple_91, 4, ((PyObject *)__pyx_kp_s_90)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_90)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_91, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91)); /* "vcfutils.pyx":108 * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), * "QD":pyvcf.FORMAT('QD',1,0,'Flag','Variants fail quality/depth filter.','.'), # <<<<<<<<<<<<<< * "SC":pyvcf.FORMAT('SC',1,0,'Flag','Variants fail sequence-context filter. Surrounding sequence is low-complexity','.'), * } */ __pyx_k_tuple_93 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_93); __Pyx_INCREF(((PyObject *)__pyx_n_s__QD)); PyTuple_SET_ITEM(__pyx_k_tuple_93, 0, ((PyObject *)__pyx_n_s__QD)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__QD)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_93, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_93, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_93, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_92)); PyTuple_SET_ITEM(__pyx_k_tuple_93, 4, ((PyObject *)__pyx_kp_s_92)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_92)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_93, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93)); /* "vcfutils.pyx":109 * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), * "QD":pyvcf.FORMAT('QD',1,0,'Flag','Variants fail quality/depth filter.','.'), * "SC":pyvcf.FORMAT('SC',1,0,'Flag','Variants fail sequence-context filter. Surrounding sequence is low-complexity','.'), # <<<<<<<<<<<<<< * } * */ __pyx_k_tuple_95 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_95); __Pyx_INCREF(((PyObject *)__pyx_n_s__SC)); PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, ((PyObject *)__pyx_n_s__SC)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SC)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_95, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_k_tuple_95, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag)); PyTuple_SET_ITEM(__pyx_k_tuple_95, 3, ((PyObject *)__pyx_n_s__Flag)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_94)); PyTuple_SET_ITEM(__pyx_k_tuple_95, 4, ((PyObject *)__pyx_kp_s_94)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_94)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_95, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95)); /* "vcfutils.pyx":113 * * vcfFormatSignature = { * "GT":pyvcf.FORMAT('GT',1,1,'String','Unphased genotypes','.'), # <<<<<<<<<<<<<< * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), */ __pyx_k_tuple_97 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_97); __Pyx_INCREF(((PyObject *)__pyx_n_s__GT)); PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_n_s__GT)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GT)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_97, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_97, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_n_s__String)); PyTuple_SET_ITEM(__pyx_k_tuple_97, 3, ((PyObject *)__pyx_n_s__String)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_96)); PyTuple_SET_ITEM(__pyx_k_tuple_97, 4, ((PyObject *)__pyx_kp_s_96)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_96)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_97, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97)); /* "vcfutils.pyx":114 * vcfFormatSignature = { * "GT":pyvcf.FORMAT('GT',1,1,'String','Unphased genotypes','.'), * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), # <<<<<<<<<<<<<< * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), */ __pyx_k_tuple_99 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_99); __Pyx_INCREF(((PyObject *)__pyx_n_s__GL)); PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_n_s__GL)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GL)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_99, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_99, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_99, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_98)); PyTuple_SET_ITEM(__pyx_k_tuple_99, 4, ((PyObject *)__pyx_kp_s_98)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_98)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_99, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99)); /* "vcfutils.pyx":115 * "GT":pyvcf.FORMAT('GT',1,1,'String','Unphased genotypes','.'), * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), # <<<<<<<<<<<<<< * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), * "NR":pyvcf.FORMAT('NR',1,'.','Integer','Number of reads covering variant location in this sample','.'), */ __pyx_k_tuple_101 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_101); __Pyx_INCREF(((PyObject *)__pyx_n_s__GQ)); PyTuple_SET_ITEM(__pyx_k_tuple_101, 0, ((PyObject *)__pyx_n_s__GQ)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GQ)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_101, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_101, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_101, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_100)); PyTuple_SET_ITEM(__pyx_k_tuple_101, 4, ((PyObject *)__pyx_kp_s_100)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_100)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_101, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101)); /* "vcfutils.pyx":116 * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), # <<<<<<<<<<<<<< * "NR":pyvcf.FORMAT('NR',1,'.','Integer','Number of reads covering variant location in this sample','.'), * "NV":pyvcf.FORMAT('NV',1,'.','Integer','Number of reads containing variant in this sample','.'), */ __pyx_k_tuple_103 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_103); __Pyx_INCREF(((PyObject *)__pyx_n_s__GOF)); PyTuple_SET_ITEM(__pyx_k_tuple_103, 0, ((PyObject *)__pyx_n_s__GOF)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GOF)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_103, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_103, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Float)); PyTuple_SET_ITEM(__pyx_k_tuple_103, 3, ((PyObject *)__pyx_n_s__Float)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_102)); PyTuple_SET_ITEM(__pyx_k_tuple_103, 4, ((PyObject *)__pyx_kp_s_102)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_102)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_103, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103)); /* "vcfutils.pyx":117 * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), * "NR":pyvcf.FORMAT('NR',1,'.','Integer','Number of reads covering variant location in this sample','.'), # <<<<<<<<<<<<<< * "NV":pyvcf.FORMAT('NV',1,'.','Integer','Number of reads containing variant in this sample','.'), * } */ __pyx_k_tuple_105 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_105); __Pyx_INCREF(((PyObject *)__pyx_n_s__NR)); PyTuple_SET_ITEM(__pyx_k_tuple_105, 0, ((PyObject *)__pyx_n_s__NR)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NR)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_105, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_105, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_105, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_104)); PyTuple_SET_ITEM(__pyx_k_tuple_105, 4, ((PyObject *)__pyx_kp_s_104)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_104)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_105, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105)); /* "vcfutils.pyx":118 * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), * "NR":pyvcf.FORMAT('NR',1,'.','Integer','Number of reads covering variant location in this sample','.'), * "NV":pyvcf.FORMAT('NV',1,'.','Integer','Number of reads containing variant in this sample','.'), # <<<<<<<<<<<<<< * } * */ __pyx_k_tuple_107 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_107); __Pyx_INCREF(((PyObject *)__pyx_n_s__NV)); PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_n_s__NV)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NV)); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_107, 1, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_107, 2, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer)); PyTuple_SET_ITEM(__pyx_k_tuple_107, 3, ((PyObject *)__pyx_n_s__Integer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_106)); PyTuple_SET_ITEM(__pyx_k_tuple_107, 4, ((PyObject *)__pyx_kp_s_106)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_106)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_107, 5, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107)); /* "vcfutils.pyx":123 * ################################################################################################### * * def outputSingleLineOfVCF(dict data, object outputFile, object vcfFile, options): # <<<<<<<<<<<<<< * """ * """ */ __pyx_k_tuple_108 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_108); __Pyx_INCREF(((PyObject *)__pyx_n_s__data)); PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outputFile)); PyTuple_SET_ITEM(__pyx_k_tuple_108, 1, ((PyObject *)__pyx_n_s__outputFile)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outputFile)); __Pyx_INCREF(((PyObject *)__pyx_n_s__vcfFile)); PyTuple_SET_ITEM(__pyx_k_tuple_108, 2, ((PyObject *)__pyx_n_s__vcfFile)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vcfFile)); __Pyx_INCREF(((PyObject *)__pyx_n_s__options)); PyTuple_SET_ITEM(__pyx_k_tuple_108, 3, ((PyObject *)__pyx_n_s__options)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__options)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108)); __pyx_k_codeobj_109 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_110, __pyx_n_s_16, 123, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "vcfutils.pyx":584 * ################################################################################################### * * def trimLeftPadding(vcfDataLine): # <<<<<<<<<<<<<< * """ * This is a small hack to make sure that no un-needed left padding is left */ __pyx_k_tuple_111 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_111); __Pyx_INCREF(((PyObject *)__pyx_n_s__vcfDataLine)); PyTuple_SET_ITEM(__pyx_k_tuple_111, 0, ((PyObject *)__pyx_n_s__vcfDataLine)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vcfDataLine)); __Pyx_INCREF(((PyObject *)__pyx_n_s__ref)); PyTuple_SET_ITEM(__pyx_k_tuple_111, 1, ((PyObject *)__pyx_n_s__ref)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ref)); __Pyx_INCREF(((PyObject *)__pyx_n_s__alt)); PyTuple_SET_ITEM(__pyx_k_tuple_111, 2, ((PyObject *)__pyx_n_s__alt)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alt)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_111, 3, ((PyObject *)__pyx_n_s__i)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr)); PyTuple_SET_ITEM(__pyx_k_tuple_111, 4, ((PyObject *)__pyx_n_s__genexpr)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr)); __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr)); PyTuple_SET_ITEM(__pyx_k_tuple_111, 5, ((PyObject *)__pyx_n_s__genexpr)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr)); __Pyx_INCREF(((PyObject *)__pyx_n_s__allele)); PyTuple_SET_ITEM(__pyx_k_tuple_111, 6, ((PyObject *)__pyx_n_s__allele)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allele)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111)); __pyx_k_codeobj_112 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_110, __pyx_n_s__trimLeftPadding, 584, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initvcfutils(void); /*proto*/ PyMODINIT_FUNC initvcfutils(void) #else PyMODINIT_FUNC PyInit_vcfutils(void); /*proto*/ PyMODINIT_FUNC PyInit_vcfutils(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_vcfutils(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("vcfutils"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_20), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "vcfutils")) { if (unlikely(PyDict_SetItemString(modules, "vcfutils", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_module_is_main_vcfutils) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ if (__Pyx_ExportFunction("outputCallToVCF", (void (*)(void))__pyx_f_8vcfutils_outputCallToVCF, "void (PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, double *, double **, double **, int **, PyObject *, int, PyObject *, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PyObject *, PyObject *, int, int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ExportFunction("refAndAlt", (void (*)(void))__pyx_f_8vcfutils_refAndAlt, "PyObject *(char *, int, PyObject *, struct __pyx_obj_9fastafile_FastaFile *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ExportFunction("vcfINFO", (void (*)(void))__pyx_f_8vcfutils_vcfINFO, "PyObject *(double *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *, struct __pyx_obj_9fastafile_FastaFile *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ExportFunction("vcfFILTER", (void (*)(void))__pyx_f_8vcfutils_vcfFILTER, "PyObject *(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_8vcfutils___pyx_scope_struct__trimLeftPadding) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8vcfutils___pyx_scope_struct__trimLeftPadding = &__pyx_type_8vcfutils___pyx_scope_struct__trimLeftPadding; if (PyType_Ready(&__pyx_type_8vcfutils___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8vcfutils___pyx_scope_struct_1_genexpr = &__pyx_type_8vcfutils___pyx_scope_struct_1_genexpr; /*--- Type import code ---*/ __pyx_ptype_9fastafile_FastaIndex = __Pyx_ImportType("fastafile", "FastaIndex", sizeof(struct __pyx_obj_9fastafile_FastaIndex), 1); if (unlikely(!__pyx_ptype_9fastafile_FastaIndex)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_9fastafile_FastaIndex = (struct __pyx_vtabstruct_9fastafile_FastaIndex*)__Pyx_GetVtable(__pyx_ptype_9fastafile_FastaIndex->tp_dict); if (unlikely(!__pyx_vtabptr_9fastafile_FastaIndex)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_9fastafile_FastaFile = __Pyx_ImportType("fastafile", "FastaFile", sizeof(struct __pyx_obj_9fastafile_FastaFile), 1); if (unlikely(!__pyx_ptype_9fastafile_FastaFile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_9fastafile_FastaFile = (struct __pyx_vtabstruct_9fastafile_FastaFile*)__Pyx_GetVtable(__pyx_ptype_9fastafile_FastaFile->tp_dict); if (unlikely(!__pyx_vtabptr_9fastafile_FastaFile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_15samtoolsWrapper_Samfile = __Pyx_ImportType("samtoolsWrapper", "Samfile", sizeof(struct __pyx_obj_15samtoolsWrapper_Samfile), 1); if (unlikely(!__pyx_ptype_15samtoolsWrapper_Samfile)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_15samtoolsWrapper_Samfile = (struct __pyx_vtabstruct_15samtoolsWrapper_Samfile*)__Pyx_GetVtable(__pyx_ptype_15samtoolsWrapper_Samfile->tp_dict); if (unlikely(!__pyx_vtabptr_15samtoolsWrapper_Samfile)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_15samtoolsWrapper_IteratorRow = __Pyx_ImportType("samtoolsWrapper", "IteratorRow", sizeof(struct __pyx_obj_15samtoolsWrapper_IteratorRow), 1); if (unlikely(!__pyx_ptype_15samtoolsWrapper_IteratorRow)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_15samtoolsWrapper_IteratorRow = (struct __pyx_vtabstruct_15samtoolsWrapper_IteratorRow*)__Pyx_GetVtable(__pyx_ptype_15samtoolsWrapper_IteratorRow->tp_dict); if (unlikely(!__pyx_vtabptr_15samtoolsWrapper_IteratorRow)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_15samtoolsWrapper_IteratorRowAll = __Pyx_ImportType("samtoolsWrapper", "IteratorRowAll", sizeof(struct __pyx_obj_15samtoolsWrapper_IteratorRowAll), 1); if (unlikely(!__pyx_ptype_15samtoolsWrapper_IteratorRowAll)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_15samtoolsWrapper_IteratorRowAll = (struct __pyx_vtabstruct_15samtoolsWrapper_IteratorRowAll*)__Pyx_GetVtable(__pyx_ptype_15samtoolsWrapper_IteratorRowAll->tp_dict); if (unlikely(!__pyx_vtabptr_15samtoolsWrapper_IteratorRowAll)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_15samtoolsWrapper_AlignedRead = __Pyx_ImportType("samtoolsWrapper", "AlignedRead", sizeof(struct __pyx_obj_15samtoolsWrapper_AlignedRead), 1); if (unlikely(!__pyx_ptype_15samtoolsWrapper_AlignedRead)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_15samtoolsWrapper_AlignedRead = (struct __pyx_vtabstruct_15samtoolsWrapper_AlignedRead*)__Pyx_GetVtable(__pyx_ptype_15samtoolsWrapper_AlignedRead->tp_dict); if (unlikely(!__pyx_vtabptr_15samtoolsWrapper_AlignedRead)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7variant_Variant = __Pyx_ImportType("variant", "Variant", sizeof(struct __pyx_obj_7variant_Variant), 1); if (unlikely(!__pyx_ptype_7variant_Variant)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_7variant_Variant = (struct __pyx_vtabstruct_7variant_Variant*)__Pyx_GetVtable(__pyx_ptype_7variant_Variant->tp_dict); if (unlikely(!__pyx_vtabptr_7variant_Variant)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7variant_VariantCandidateGenerator = __Pyx_ImportType("variant", "VariantCandidateGenerator", sizeof(struct __pyx_obj_7variant_VariantCandidateGenerator), 1); if (unlikely(!__pyx_ptype_7variant_VariantCandidateGenerator)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_7variant_VariantCandidateGenerator = (struct __pyx_vtabstruct_7variant_VariantCandidateGenerator*)__Pyx_GetVtable(__pyx_ptype_7variant_VariantCandidateGenerator->tp_dict); if (unlikely(!__pyx_vtabptr_7variant_VariantCandidateGenerator)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cwindow_ReadArray = __Pyx_ImportType("cwindow", "ReadArray", sizeof(struct __pyx_obj_7cwindow_ReadArray), 1); if (unlikely(!__pyx_ptype_7cwindow_ReadArray)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_7cwindow_ReadArray = (struct __pyx_vtabstruct_7cwindow_ReadArray*)__Pyx_GetVtable(__pyx_ptype_7cwindow_ReadArray->tp_dict); if (unlikely(!__pyx_vtabptr_7cwindow_ReadArray)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cwindow_bamReadBuffer = __Pyx_ImportType("cwindow", "bamReadBuffer", sizeof(struct __pyx_obj_7cwindow_bamReadBuffer), 1); if (unlikely(!__pyx_ptype_7cwindow_bamReadBuffer)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_7cwindow_bamReadBuffer = (struct __pyx_vtabstruct_7cwindow_bamReadBuffer*)__Pyx_GetVtable(__pyx_ptype_7cwindow_bamReadBuffer->tp_dict); if (unlikely(!__pyx_vtabptr_7cwindow_bamReadBuffer)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_11cpopulation_Population = __Pyx_ImportType("cpopulation", "Population", sizeof(struct __pyx_obj_11cpopulation_Population), 1); if (unlikely(!__pyx_ptype_11cpopulation_Population)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_11cpopulation_Population = (struct __pyx_vtabstruct_11cpopulation_Population*)__Pyx_GetVtable(__pyx_ptype_11cpopulation_Population->tp_dict); if (unlikely(!__pyx_vtabptr_11cpopulation_Population)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_12bamfileutils_BamFileIterator = __Pyx_ImportType("bamfileutils", "BamFileIterator", sizeof(struct __pyx_obj_12bamfileutils_BamFileIterator), 1); if (unlikely(!__pyx_ptype_12bamfileutils_BamFileIterator)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_12bamfileutils_BamFileIterator = (struct __pyx_vtabstruct_12bamfileutils_BamFileIterator*)__Pyx_GetVtable(__pyx_ptype_12bamfileutils_BamFileIterator->tp_dict); if (unlikely(!__pyx_vtabptr_12bamfileutils_BamFileIterator)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_12bamfileutils_MultiBamFileIterator = __Pyx_ImportType("bamfileutils", "MultiBamFileIterator", sizeof(struct __pyx_obj_12bamfileutils_MultiBamFileIterator), 1); if (unlikely(!__pyx_ptype_12bamfileutils_MultiBamFileIterator)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_12bamfileutils_MultiBamFileReader = __Pyx_ImportType("bamfileutils", "MultiBamFileReader", sizeof(struct __pyx_obj_12bamfileutils_MultiBamFileReader), 1); if (unlikely(!__pyx_ptype_12bamfileutils_MultiBamFileReader)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_12bamfileutils_MultiBamFileReader = (struct __pyx_vtabstruct_12bamfileutils_MultiBamFileReader*)__Pyx_GetVtable(__pyx_ptype_12bamfileutils_MultiBamFileReader->tp_dict); if (unlikely(!__pyx_vtabptr_12bamfileutils_MultiBamFileReader)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_10chaplotype_Haplotype = __Pyx_ImportType("chaplotype", "Haplotype", sizeof(struct __pyx_obj_10chaplotype_Haplotype), 1); if (unlikely(!__pyx_ptype_10chaplotype_Haplotype)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_10chaplotype_Haplotype = (struct __pyx_vtabstruct_10chaplotype_Haplotype*)__Pyx_GetVtable(__pyx_ptype_10chaplotype_Haplotype->tp_dict); if (unlikely(!__pyx_vtabptr_10chaplotype_Haplotype)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_9cgenotype_DiploidGenotype = __Pyx_ImportType("cgenotype", "DiploidGenotype", sizeof(struct __pyx_obj_9cgenotype_DiploidGenotype), 1); if (unlikely(!__pyx_ptype_9cgenotype_DiploidGenotype)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_9cgenotype_DiploidGenotype = (struct __pyx_vtabstruct_9cgenotype_DiploidGenotype*)__Pyx_GetVtable(__pyx_ptype_9cgenotype_DiploidGenotype->tp_dict); if (unlikely(!__pyx_vtabptr_9cgenotype_DiploidGenotype)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_9cgenotype_HaploidGenotype = __Pyx_ImportType("cgenotype", "HaploidGenotype", sizeof(struct __pyx_obj_9cgenotype_HaploidGenotype), 1); if (unlikely(!__pyx_ptype_9cgenotype_HaploidGenotype)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_9cgenotype_HaploidGenotype = (struct __pyx_vtabstruct_9cgenotype_HaploidGenotype*)__Pyx_GetVtable(__pyx_ptype_9cgenotype_HaploidGenotype->tp_dict); if (unlikely(!__pyx_vtabptr_9cgenotype_HaploidGenotype)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ __pyx_t_1 = __Pyx_ImportModule("variant"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportVoidPtr(__pyx_t_1, "PLATYPUS_VAR", (void **)&__pyx_vp_7variant_PLATYPUS_VAR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportVoidPtr(__pyx_t_1, "FILE_VAR", (void **)&__pyx_vp_7variant_FILE_VAR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportVoidPtr(__pyx_t_1, "ASSEMBLER_VAR", (void **)&__pyx_vp_7variant_ASSEMBLER_VAR, "int") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Function import code ---*/ __pyx_t_2 = __Pyx_ImportModule("platypusutils"); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_2, "binomial", (void (**)(void))&__pyx_f_13platypusutils_binomial, "double (int, int, double)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_2, "betaBinomialCDF", (void (**)(void))&__pyx_f_13platypusutils_betaBinomialCDF, "double (int, int, int, int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Execution code ---*/ /* "vcfutils.pyx":6 * """ * * import logging # <<<<<<<<<<<<<< * import pyvcf * */ __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__logging), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__logging, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":7 * * import logging * import pyvcf # <<<<<<<<<<<<<< * * cimport fastafile */ __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__pyvcf), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pyvcf, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":35 * from samtoolsWrapper cimport Read_SetQCFail * * logger = logging.getLogger("Log") # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logging); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__getLogger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s__logger, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":56 * * # Nasty global variables * cdef double LOG10_E = log10(exp(1.0)) # <<<<<<<<<<<<<< * cdef int CIGAR_M = 0 # Match * cdef int CIGAR_I = 1 # Insertion */ __pyx_v_8vcfutils_LOG10_E = log10(exp(1.0)); /* "vcfutils.pyx":57 * # Nasty global variables * cdef double LOG10_E = log10(exp(1.0)) * cdef int CIGAR_M = 0 # Match # <<<<<<<<<<<<<< * cdef int CIGAR_I = 1 # Insertion * cdef int CIGAR_D = 2 # Deletion */ __pyx_v_8vcfutils_CIGAR_M = 0; /* "vcfutils.pyx":58 * cdef double LOG10_E = log10(exp(1.0)) * cdef int CIGAR_M = 0 # Match * cdef int CIGAR_I = 1 # Insertion # <<<<<<<<<<<<<< * cdef int CIGAR_D = 2 # Deletion * cdef int CIGAR_N = 3 # Skipped region from reference */ __pyx_v_8vcfutils_CIGAR_I = 1; /* "vcfutils.pyx":59 * cdef int CIGAR_M = 0 # Match * cdef int CIGAR_I = 1 # Insertion * cdef int CIGAR_D = 2 # Deletion # <<<<<<<<<<<<<< * cdef int CIGAR_N = 3 # Skipped region from reference * cdef int CIGAR_S = 4 # Soft clipping. Sequence is present in read */ __pyx_v_8vcfutils_CIGAR_D = 2; /* "vcfutils.pyx":60 * cdef int CIGAR_I = 1 # Insertion * cdef int CIGAR_D = 2 # Deletion * cdef int CIGAR_N = 3 # Skipped region from reference # <<<<<<<<<<<<<< * cdef int CIGAR_S = 4 # Soft clipping. Sequence is present in read * cdef int CIGAR_H = 5 # Hard clipping. Sequence is not present in read */ __pyx_v_8vcfutils_CIGAR_N = 3; /* "vcfutils.pyx":61 * cdef int CIGAR_D = 2 # Deletion * cdef int CIGAR_N = 3 # Skipped region from reference * cdef int CIGAR_S = 4 # Soft clipping. Sequence is present in read # <<<<<<<<<<<<<< * cdef int CIGAR_H = 5 # Hard clipping. Sequence is not present in read * cdef int CIGAR_P = 6 # Padding. Used for padded alignment */ __pyx_v_8vcfutils_CIGAR_S = 4; /* "vcfutils.pyx":62 * cdef int CIGAR_N = 3 # Skipped region from reference * cdef int CIGAR_S = 4 # Soft clipping. Sequence is present in read * cdef int CIGAR_H = 5 # Hard clipping. Sequence is not present in read # <<<<<<<<<<<<<< * cdef int CIGAR_P = 6 # Padding. Used for padded alignment * */ __pyx_v_8vcfutils_CIGAR_H = 5; /* "vcfutils.pyx":63 * cdef int CIGAR_S = 4 # Soft clipping. Sequence is present in read * cdef int CIGAR_H = 5 # Hard clipping. Sequence is not present in read * cdef int CIGAR_P = 6 # Padding. Used for padded alignment # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_v_8vcfutils_CIGAR_P = 6; /* "vcfutils.pyx":68 * * # Definititons for the individual and filter fields included in the header * vcfInfoSignature = { # <<<<<<<<<<<<<< * "FR":pyvcf.FORMAT('FR',1,".",'Float','Estimated population frequency of variant',-1), * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); /* "vcfutils.pyx":69 * # Definititons for the individual and filter fields included in the header * vcfInfoSignature = { * "FR":pyvcf.FORMAT('FR',1,".",'Float','Estimated population frequency of variant',-1), # <<<<<<<<<<<<<< * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__FR), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":70 * vcfInfoSignature = { * "FR":pyvcf.FORMAT('FR',1,".",'Float','Estimated population frequency of variant',-1), * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), # <<<<<<<<<<<<<< * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PP), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":71 * "FR":pyvcf.FORMAT('FR',1,".",'Float','Estimated population frequency of variant',-1), * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), # <<<<<<<<<<<<<< * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__TC), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":72 * "PP":pyvcf.FORMAT('PP',1,".",'Float','Posterior probability (phred scaled) that this variant segregates',-1), * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), # <<<<<<<<<<<<<< * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__WS), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":73 * "TC":pyvcf.FORMAT('TC',1,1,'Integer','Total coverage at this locus',-1), * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), # <<<<<<<<<<<<<< * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__WE), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":74 * "WS":pyvcf.FORMAT('WS',1,1,'Integer','Starting position of calling window',-1), * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), # <<<<<<<<<<<<<< * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__TCR), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":75 * "WE":pyvcf.FORMAT('WE',1,1,'Integer','End position of calling window',-1), * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), # <<<<<<<<<<<<<< * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__TCF), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":76 * "TCR":pyvcf.FORMAT('TCR',1,1,'Integer','Total reverse strand coverage at this locus',-1), * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), # <<<<<<<<<<<<<< * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__TR), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":77 * "TCF":pyvcf.FORMAT('TCF',1,1,'Integer','Total forward strand coverage at this locus',-1), * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), # <<<<<<<<<<<<<< * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__NF), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":78 * "TR":pyvcf.FORMAT('TR',1,".",'Integer','Total number of reads containing this variant',-1), * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), # <<<<<<<<<<<<<< * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__NR), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":79 * "NF":pyvcf.FORMAT('NF',1,".",'Integer','Total number of forward reads containing this variant',-1), * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), # <<<<<<<<<<<<<< * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__MGOF), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":80 * "NR":pyvcf.FORMAT('NR',1,".",'Integer','Total number of reverse reads containing this variant',-1), * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), # <<<<<<<<<<<<<< * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SC), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":81 * "MGOF":pyvcf.FORMAT('MGOF',1,".",'Integer','Worst goodness-of-fit value reported across all samples',-1), * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), # <<<<<<<<<<<<<< * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__HP), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":82 * "SC":pyvcf.FORMAT('SC',1,1,'String','Genomic sequence 10 bases either side of variant position',-1), * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), # <<<<<<<<<<<<<< * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__BRF), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":83 * "HP":pyvcf.FORMAT('HP',1,1,'Integer','Homopolymer run length around variant locus',-1), * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), # <<<<<<<<<<<<<< * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__MMLQ), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":84 * "BRF":pyvcf.FORMAT('BRF',1,1,'Float','Fraction of reads around this variant that failed filters',-1), * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), # <<<<<<<<<<<<<< * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__QD), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":85 * "MMLQ":pyvcf.FORMAT('MMLQ',1,1,'Float','Median minimum base quality for bases around variant',-1), * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), # <<<<<<<<<<<<<< * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__Source), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":86 * "QD":pyvcf.FORMAT('QD',1,1,'Float','Variant-quality/read-depth for this variant',-1), * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), # <<<<<<<<<<<<<< * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__BS), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":87 * "Source":pyvcf.FORMAT('Source',1,".",'String','Was this variant suggested by Playtypus, Assembler, or from a VCF?',-1), * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), # <<<<<<<<<<<<<< * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__BE), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":88 * "BS":pyvcf.FORMAT('BS',1,".",'Integer','Start position of reference call block', -1), * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), # <<<<<<<<<<<<<< * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__Size), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":89 * "BE":pyvcf.FORMAT('BE',1,".",'Integer','End position of reference call block', -1), * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), # <<<<<<<<<<<<<< * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), * "FS":pyvcf.FORMAT('FS',1,".",'Float','Fisher\'s exact test for strand bias (Phred scale)',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__HapScore), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":90 * "Size":pyvcf.FORMAT('Size',1,".",'Integer','Size of reference call block', -1), * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), # <<<<<<<<<<<<<< * "FS":pyvcf.FORMAT('FS',1,".",'Float','Fisher\'s exact test for strand bias (Phred scale)',-1), * "SbPval":pyvcf.FORMAT('SbPval',1,".",'Float','Binomial P-value for strand bias test',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__MQ), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":91 * "HapScore":pyvcf.FORMAT('HapScore',1,".",'Integer','Haplotype score measuring the number of haplotypes the variant is segregating into in a window', -1), * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), * "FS":pyvcf.FORMAT('FS',1,".",'Float','Fisher\'s exact test for strand bias (Phred scale)',-1), # <<<<<<<<<<<<<< * "SbPval":pyvcf.FORMAT('SbPval',1,".",'Float','Binomial P-value for strand bias test',-1), * # "MQRankSum":pyvcf.FORMAT('MQRankSum',1,".",'Float','Mann-Whitney Rank sum test for mapping quality difference between ref and alt (Phred scale)',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__FS), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":92 * "MQ":pyvcf.FORMAT('MQ',1,".",'Float','Root mean square of mapping qualities of reads at the variant position',-1), * "FS":pyvcf.FORMAT('FS',1,".",'Float','Fisher\'s exact test for strand bias (Phred scale)',-1), * "SbPval":pyvcf.FORMAT('SbPval',1,".",'Float','Binomial P-value for strand bias test',-1), # <<<<<<<<<<<<<< * # "MQRankSum":pyvcf.FORMAT('MQRankSum',1,".",'Float','Mann-Whitney Rank sum test for mapping quality difference between ref and alt (Phred scale)',-1), * "ReadPosRankSum":pyvcf.FORMAT('ReadPosRankSum',1,".",'Float','Mann-Whitney Rank sum test for difference between in positions of variants in reads from ref and alt',-1), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SbPval), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":94 * "SbPval":pyvcf.FORMAT('SbPval',1,".",'Float','Binomial P-value for strand bias test',-1), * # "MQRankSum":pyvcf.FORMAT('MQRankSum',1,".",'Float','Mann-Whitney Rank sum test for mapping quality difference between ref and alt (Phred scale)',-1), * "ReadPosRankSum":pyvcf.FORMAT('ReadPosRankSum',1,".",'Float','Mann-Whitney Rank sum test for difference between in positions of variants in reads from ref and alt',-1), # <<<<<<<<<<<<<< * } * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__ReadPosRankSum), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s__vcfInfoSignature, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":97 * } * * vcfFilterSignature = { # <<<<<<<<<<<<<< * "alleleBias":pyvcf.FORMAT('alleleBias',1,0,'Flag','Variant frequency is lower than expected for het','.'), * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); /* "vcfutils.pyx":98 * * vcfFilterSignature = { * "alleleBias":pyvcf.FORMAT('alleleBias',1,0,'Flag','Variant frequency is lower than expected for het','.'), # <<<<<<<<<<<<<< * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__alleleBias), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":99 * vcfFilterSignature = { * "alleleBias":pyvcf.FORMAT('alleleBias',1,0,'Flag','Variant frequency is lower than expected for het','.'), * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), # <<<<<<<<<<<<<< * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__strandBias), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":100 * "alleleBias":pyvcf.FORMAT('alleleBias',1,0,'Flag','Variant frequency is lower than expected for het','.'), * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), # <<<<<<<<<<<<<< * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__badReads), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":101 * "strandBias":pyvcf.FORMAT('strandBias',1,0,'Flag','Variant fails strand-bias filter','.'), * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), # <<<<<<<<<<<<<< * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_79), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__MQ), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":102 * "badReads":pyvcf.FORMAT('badReads',1,0,'Flag','Variant supported only by reads with low quality bases close to variant position, and not present on both strands.','.'), * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), # <<<<<<<<<<<<<< * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_81), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__Q20), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":103 * "MQ":pyvcf.FORMAT('MQ',1,0,'Flag','Root-mean-square mapping quality across calling region is low.','.'), * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), # <<<<<<<<<<<<<< * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__QualDepth), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":104 * "Q20":pyvcf.FORMAT('Q20',1,0,'Flag','Variant quality is below 20.','.'), * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), # <<<<<<<<<<<<<< * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__HapScore), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":105 * "QualDepth":pyvcf.FORMAT('HapScore',1,0,'Flag','Too many haplotypes are supported by the data in this region.','.'), * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), # <<<<<<<<<<<<<< * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GOF), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":106 * "HapScore":pyvcf.FORMAT('QualDepth',1,0,'Flag','Variant quality/Read depth ratio is low.','.'), * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), # <<<<<<<<<<<<<< * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), * "QD":pyvcf.FORMAT('QD',1,0,'Flag','Variants fail quality/depth filter.','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__hp10), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":107 * "GOF":pyvcf.FORMAT('GOF',1,0,'Flag','Variant fails goodness-of-fit test.','.'), * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), # <<<<<<<<<<<<<< * "QD":pyvcf.FORMAT('QD',1,0,'Flag','Variants fail quality/depth filter.','.'), * "SC":pyvcf.FORMAT('SC',1,0,'Flag','Variants fail sequence-context filter. Surrounding sequence is low-complexity','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__REFCALL), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":108 * "hp10":pyvcf.FORMAT('hp10',1,0,'Flag','Flanking sequence contains homopolymer of length 10 or greater','.'), * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), * "QD":pyvcf.FORMAT('QD',1,0,'Flag','Variants fail quality/depth filter.','.'), # <<<<<<<<<<<<<< * "SC":pyvcf.FORMAT('SC',1,0,'Flag','Variants fail sequence-context filter. Surrounding sequence is low-complexity','.'), * } */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_93), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__QD), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":109 * "REFCALL":pyvcf.FORMAT('REFCALL',1,0,'Flag','This line represents a homozygous reference call','.'), * "QD":pyvcf.FORMAT('QD',1,0,'Flag','Variants fail quality/depth filter.','.'), * "SC":pyvcf.FORMAT('SC',1,0,'Flag','Variants fail sequence-context filter. Surrounding sequence is low-complexity','.'), # <<<<<<<<<<<<<< * } * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SC), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s__vcfFilterSignature, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":112 * } * * vcfFormatSignature = { # <<<<<<<<<<<<<< * "GT":pyvcf.FORMAT('GT',1,1,'String','Unphased genotypes','.'), * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); /* "vcfutils.pyx":113 * * vcfFormatSignature = { * "GT":pyvcf.FORMAT('GT',1,1,'String','Unphased genotypes','.'), # <<<<<<<<<<<<<< * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GT), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":114 * vcfFormatSignature = { * "GT":pyvcf.FORMAT('GT',1,1,'String','Unphased genotypes','.'), * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), # <<<<<<<<<<<<<< * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GL), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":115 * "GT":pyvcf.FORMAT('GT',1,1,'String','Unphased genotypes','.'), * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), # <<<<<<<<<<<<<< * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), * "NR":pyvcf.FORMAT('NR',1,'.','Integer','Number of reads covering variant location in this sample','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GQ), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":116 * "GL":pyvcf.FORMAT('GL',1,'.','Float','Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites','.'), * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), # <<<<<<<<<<<<<< * "NR":pyvcf.FORMAT('NR',1,'.','Integer','Number of reads covering variant location in this sample','.'), * "NV":pyvcf.FORMAT('NV',1,'.','Integer','Number of reads containing variant in this sample','.'), */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GOF), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":117 * "GQ":pyvcf.FORMAT('GQ',1,'.','Integer','Genotype quality as phred score','.'), * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), * "NR":pyvcf.FORMAT('NR',1,'.','Integer','Number of reads covering variant location in this sample','.'), # <<<<<<<<<<<<<< * "NV":pyvcf.FORMAT('NV',1,'.','Integer','Number of reads containing variant in this sample','.'), * } */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__NR), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "vcfutils.pyx":118 * "GOF":pyvcf.FORMAT('GOF',1,'.','Float','Goodness of fit value','.'), * "NR":pyvcf.FORMAT('NR',1,'.','Integer','Number of reads covering variant location in this sample','.'), * "NV":pyvcf.FORMAT('NV',1,'.','Integer','Number of reads containing variant in this sample','.'), # <<<<<<<<<<<<<< * } * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_107), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__NV), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s__vcfFormatSignature, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "vcfutils.pyx":123 * ################################################################################################### * * def outputSingleLineOfVCF(dict data, object outputFile, object vcfFile, options): # <<<<<<<<<<<<<< * """ * """ */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_8vcfutils_1outputSingleLineOfVCF, NULL, __pyx_n_s__vcfutils); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s_16, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":584 * ################################################################################################### * * def trimLeftPadding(vcfDataLine): # <<<<<<<<<<<<<< * """ * This is a small hack to make sure that no un-needed left padding is left */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_8vcfutils_3trimLeftPadding, NULL, __pyx_n_s__vcfutils); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__trimLeftPadding, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "vcfutils.pyx":1 * """ # <<<<<<<<<<<<<< * Utility code for Platypus. This is mostly concerned with processing needed to produce * VCF output from the various data structures used by Platypus. */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "samtoolsWrapper.pxd":385 * theRead.bitFlag |= BAM_FCOMPRESSED * * cdef inline void Read_SetUnCompressed(cAlignedRead* theRead): # <<<<<<<<<<<<<< * theRead.bitFlag &= (~BAM_FCOMPRESSED) * */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); if (__pyx_m) { __Pyx_AddTraceback("init vcfutils", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init vcfutils"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* CYTHON_REFNANNY */ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { PyObject *result; result = PyObject_GetAttr(dict, name); if (!result) { if (dict != __pyx_b) { PyErr_Clear(); result = PyObject_GetAttr(__pyx_b, name); } if (!result) { PyErr_SetObject(PyExc_NameError, name); } } return result; } static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int is_tuple, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); } else { if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { __Pyx_UnpackTupleError(tuple, 2); goto bad; } #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } } *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; #if !CYTHON_COMPILING_IN_PYPY if (is_dict) { *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; } #endif *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = PyObject_CallMethodObjArgs(iterable, method_name, NULL); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } static double __Pyx__PyObject_AsDouble(PyObject* obj) { PyObject* float_value; #if CYTHON_COMPILING_IN_PYPY float_value = PyNumber_Float(obj); #else if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) { return PyFloat_AsDouble(obj); } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { #if PY_MAJOR_VERSION >= 3 float_value = PyFloat_FromString(obj); #else float_value = PyFloat_FromString(obj, 0); #endif } else { PyObject* args = PyTuple_New(1); if (unlikely(!args)) goto bad; PyTuple_SET_ITEM(args, 0, obj); float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); PyTuple_SET_ITEM(args, 0, 0); Py_DECREF(args); } #endif if (likely(float_value)) { double value = PyFloat_AS_DOUBLE(float_value); Py_DECREF(float_value); return value; } bad: return (double)-1; } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) { PyObject *py_import = 0; PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); if (!py_import) goto bad; if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { /* try package relative import first */ PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: Py_XDECREF(empty_list); Py_XDECREF(py_import); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } #if PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause && cause != Py_None) { PyObject *fixed_cause; if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #else PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } static PyObject *__Pyx_Generator_Next(PyObject *self); static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Generator_Close(PyObject *self); static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args); static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (unlikely(et != PyExc_StopIteration) && unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } if (likely(et == PyExc_StopIteration)) { if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); ev = Py_None; } Py_XDECREF(tb); Py_DECREF(et); *pvalue = ev; return 0; } } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = PyObject_GetAttrString(ev, "args"); Py_DECREF(ev); if (likely(args)) { value = PyObject_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } #endif static CYTHON_INLINE void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) { PyObject *exc_type = self->exc_type; PyObject *exc_value = self->exc_value; PyObject *exc_traceback = self->exc_traceback; self->exc_type = NULL; self->exc_value = NULL; self->exc_traceback = NULL; Py_XDECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_traceback); } static CYTHON_INLINE int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) { if (unlikely(gen->is_running)) { PyErr_SetString(PyExc_ValueError, "generator already executing"); return 1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) { PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { PyErr_SetString(PyExc_TypeError, "can't send non-None value to a " "just-started generator"); return NULL; } } if (unlikely(self->resume_label == -1)) { PyErr_SetNone(PyExc_StopIteration); return NULL; } if (value) { #if CYTHON_COMPILING_IN_PYPY #else /* Generators always return to their most recent caller, not * necessarily their creator. */ if (self->exc_traceback) { PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } #endif __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); } else { __Pyx_Generator_ExceptionClear(self); } self->is_running = 1; retval = self->body((PyObject *) self, value); self->is_running = 0; if (retval) { __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); #if CYTHON_COMPILING_IN_PYPY #else /* Don't keep the reference to f_back any longer than necessary. It * may keep a chain of frames alive or it could create a reference * cycle. */ if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); } #endif } else { __Pyx_Generator_ExceptionClear(self); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Generator_Undelegate(gen); __Pyx_PyGen_FetchStopIterationValue(&val); ret = __Pyx_Generator_SendEx(gen, val); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Generator_FinishDelegation(gen); } return __Pyx_Generator_SendEx(gen, Py_None); } static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Send(yf, value); } else { if (value == Py_None) ret = PyIter_Next(yf); else ret = PyObject_CallMethod(yf, (char*)"send", (char*)"O", value); } gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Generator_FinishDelegation(gen); } return __Pyx_Generator_SendEx(gen, value); } static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Generator_Close(yf); if (!retval) return -1; } else { PyObject *meth; gen->is_running = 1; meth = PyObject_GetAttrString(yf, "close"); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Close(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { Py_INCREF(yf); err = __Pyx_Generator_CloseIter(gen, yf); __Pyx_Generator_Undelegate(gen); Py_DECREF(yf); } if (err == 0) #if PY_VERSION_HEX < 0x02050000 PyErr_SetNone(PyExc_StopIteration); #else PyErr_SetNone(PyExc_GeneratorExit); #endif retval = __Pyx_Generator_SendEx(gen, NULL); if (retval) { Py_DECREF(retval); PyErr_SetString(PyExc_RuntimeError, "generator ignored GeneratorExit"); return NULL; } raised_exception = PyErr_Occurred(); if (!raised_exception || raised_exception == PyExc_StopIteration #if PY_VERSION_HEX >= 0x02050000 || raised_exception == PyExc_GeneratorExit || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) #endif || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) { if (raised_exception) PyErr_Clear(); /* ignore these errors */ Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject *typ; PyObject *tb = NULL; PyObject *val = NULL; PyObject *yf = gen->yieldfrom; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; if (unlikely(__Pyx_Generator_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; Py_INCREF(yf); #if PY_VERSION_HEX >= 0x02050000 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { int err = __Pyx_Generator_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Generator_Undelegate(gen); if (err < 0) return __Pyx_Generator_SendEx(gen, NULL); goto throw_here; } #endif gen->is_running = 1; if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Throw(yf, args); } else { PyObject *meth = PyObject_GetAttrString(yf, "throw"); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Generator_Undelegate(gen); gen->is_running = 0; goto throw_here; } ret = PyObject_CallObject(meth, args); Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Generator_FinishDelegation(gen); } return ret; } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Generator_SendEx(gen, NULL); } static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); Py_VISIT(gen->exc_type); Py_VISIT(gen->exc_value); Py_VISIT(gen->exc_traceback); return 0; } static int __Pyx_Generator_clear(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); Py_CLEAR(gen->exc_type); Py_CLEAR(gen->exc_value); Py_CLEAR(gen->exc_traceback); return 0; } static void __Pyx_Generator_dealloc(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); PyObject_GC_Track(self); if (gen->resume_label > 0) { Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) return; /* resurrected. :( */ } PyObject_GC_UnTrack(self); __Pyx_Generator_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Generator_del(PyObject *self) { PyObject *res; PyObject *error_type, *error_value, *error_traceback; __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; if (gen->resume_label <= 0) return ; assert(self->ob_refcnt == 0); self->ob_refcnt = 1; __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); res = __Pyx_Generator_Close(self); if (res == NULL) PyErr_WriteUnraisable(self); else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); /* Undo the temporary resurrection; can't use DECREF here, it would * cause a recursive call. */ assert(self->ob_refcnt > 0); if (--self->ob_refcnt == 0) return; /* this is the normal path out */ /* close() resurrected it! Make it look like the original Py_DECREF * never happened. */ { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); self->ob_refcnt = refcnt; } #if CYTHON_COMPILING_FOR_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so * we need to undo that. */ _Py_DEC_REFTOTAL; #endif /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object * chain, so no more to do there. * If COUNT_ALLOCS, the original decref bumped tp_frees, and * _Py_NewReference bumped tp_allocs: both of those need to be * undone. */ #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif } static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", #if PY_VERSION_HEX >= 0x02060000 T_BOOL, #else T_BYTE, #endif offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL}, {0, 0, 0, 0, 0} }; static PyMethodDef __pyx_Generator_methods[] = { {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0}, {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0}, {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("generator"), /*tp_name*/ sizeof(__pyx_GeneratorObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ __pyx_Generator_methods, /*tp_methods*/ __pyx_Generator_memberlist, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ 0, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ __Pyx_Generator_del, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif }; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure) { __pyx_GeneratorObject *gen = PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type); if (gen == NULL) return NULL; gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->exc_type = NULL; gen->exc_value = NULL; gen->exc_traceback = NULL; gen->gi_weakreflist = NULL; PyObject_GC_Track(gen); return gen; } static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; if (PyType_Ready(&__pyx_GeneratorType_type)) { return -1; } __pyx_GeneratorType = &__pyx_GeneratorType_type; return 0; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__"); if (!d) { PyErr_Clear(); d = PyDict_New(); if (!d) goto bad; Py_INCREF(d); if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0) goto bad; } tmp.fp = f; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) cobj = PyCapsule_New(tmp.p, sig, 0); #else cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); #endif if (!cobj) goto bad; if (PyDict_SetItemString(d, name, cobj) < 0) goto bad; Py_DECREF(cobj); Py_DECREF(d); return 0; bad: Py_XDECREF(cobj); Py_XDECREF(d); return -1; } #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%s.%s is not a type object", module_name, class_name); goto bad; } if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif static void* __Pyx_GetVtable(PyObject *dict) { void* ptr; PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__"); if (!ob) goto bad; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) ptr = PyCapsule_GetPointer(ob, 0); #else ptr = PyCObject_AsVoidPtr(ob); #endif if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } #ifndef __PYX_HAVE_RT_ImportVoidPtr #define __PYX_HAVE_RT_ImportVoidPtr static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) { PyObject *d = 0; PyObject *cobj = 0; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, name); if (!cobj) { PyErr_Format(PyExc_ImportError, "%s does not export expected C variable %s", PyModule_GetName(module), name); goto bad; } #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C variable %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); goto bad; } *p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C variable %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), name, sig, desc); goto bad; } *p = PyCObject_AsVoidPtr(cobj);} #endif if (!(*p)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, "%s does not export expected C function %s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C function %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } tmp.p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C function %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } tmp.p = PyCObject_AsVoidPtr(cobj);} #endif *f = tmp.fp; if (!(*f)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = (start + end) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, /*int firstlineno,*/ __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } /* Type Conversion Functions */ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_VERSION_HEX < 0x03000000 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_VERSION_HEX < 0x03000000 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { return (size_t)-1; } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */