/* Generated by Cython 0.17.2 on Mon Sep 30 14:30:27 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_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(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__variantcaller #define __PYX_HAVE_API__variantcaller #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[] = { "variantcaller.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_12bamfileutils_MultiBamFileReader; struct __pyx_obj_12bamfileutils_MultiBamFileIterator; struct __pyx_obj_7cwindow_bamReadBuffer; struct __pyx_obj_7variant_Variant; struct __pyx_obj_12bamfileutils_BamFileIterator; 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_11cpopulation_10Population_calculatePosterior; /* "cpopulation.pxd":49 * # Class functions * cdef: * double calculatePosterior(self, Variant var, int flatPrior=*) # <<<<<<<<<<<<<< * void computeVariantPosteriors(self) * void computeVariantINFO(self) */ struct __pyx_opt_args_11cpopulation_10Population_calculatePosterior { int __pyx_n; int flatPrior; }; 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; }; struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; struct __pyx_defaults1; typedef struct __pyx_defaults1 __pyx_defaults1; struct __pyx_defaults { PyObject *__pyx_arg_continuing; }; struct __pyx_defaults1 { PyObject *__pyx_arg_continuing; }; /* "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; }; /* "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; }; /* "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 *, struct __pyx_opt_args_11cpopulation_10Population_calculatePosterior *__pyx_optional_args); 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*/ #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 int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ 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 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 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_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); 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 void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *modname); /*proto*/ #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f) \ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f) \ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f) \ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_doc; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *(*defaults_getter)(PyObject *); } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, self, module, code) \ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, self, module, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject *self, PyObject *module, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static int __Pyx_CyFunction_init(void); 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 void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static int __Pyx_check_binary_version(void); #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; /* 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 'platypusutils' */ static double (*__pyx_f_13platypusutils_betaBinomialCDF)(int, int, int, int); /*proto*/ static PyObject *(*__pyx_f_13platypusutils_loadBAMData)(PyObject *, PyObject *, int, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, char *); /*proto*/ static struct __pyx_obj_7variant_Variant *(*__pyx_f_13platypusutils_leftNormaliseIndel)(struct __pyx_obj_7variant_Variant *, struct __pyx_obj_9fastafile_FastaFile *, int); /*proto*/ /* 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 'vcfutils' */ static void (*__pyx_f_8vcfutils_outputCallToVCF)(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, double *, double **, double **, int **, PyObject *, int, PyObject *, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PyObject *, PyObject *, int, int); /*proto*/ static PyObject *(*__pyx_f_8vcfutils_refAndAlt)(char *, int, PyObject *, struct __pyx_obj_9fastafile_FastaFile *); /*proto*/ /* Module declarations from 'variantFilter' */ static PyObject *(*__pyx_f_13variantFilter_filterVariants)(PyObject *, struct __pyx_obj_9fastafile_FastaFile *, int, int, int, int, PyObject *); /*proto*/ static void (*__pyx_f_13variantFilter_filterVariantsInWindow)(PyObject *, PyObject *, int, int, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PyObject *, struct __pyx_obj_10chaplotype_Haplotype *, PyObject *); /*proto*/ static void (*__pyx_f_13variantFilter_filterVariantsByCoverage)(PyObject *, PyObject *, int, int, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PyObject *, struct __pyx_obj_10chaplotype_Haplotype *, PyObject *); /*proto*/ static PyObject *(*__pyx_f_13variantFilter_getHaplotypesInWindow)(PyObject *, int, struct __pyx_obj_9fastafile_FastaFile *, int, int, int, int, int, int, int, int, int, PyObject *, PyObject *); /*proto*/ static PyObject *(*__pyx_f_13variantFilter_padVariants)(PyObject *, struct __pyx_obj_9fastafile_FastaFile *, PyObject *); /*proto*/ /* Module declarations from 'cgenotype' */ static PyTypeObject *__pyx_ptype_9cgenotype_DiploidGenotype = 0; static PyTypeObject *__pyx_ptype_9cgenotype_HaploidGenotype = 0; static PyObject *(*__pyx_f_9cgenotype_generateAllGenotypesFromHaplotypeList)(int, PyObject *); /*proto*/ /* Module declarations from 'assembler' */ static PyObject *(*__pyx_f_9assembler_assembleReadsAndDetectVariants)(char *, int, int, int, int, PyObject *, char *, PyObject *); /*proto*/ /* Module declarations from 'variantcaller' */ static void __pyx_f_13variantcaller_callVariantsInWindow(PyObject *, PyObject *, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, struct __pyx_obj_11cpopulation_Population *, int, int, char *); /*proto*/ static int __pyx_f_13variantcaller_countTotalReadsInRegion(PyObject *, int *, int *); /*proto*/ static int __pyx_f_13variantcaller_doWeNeedToAssembleThisRegion(PyObject *, PyObject *, int, int, PyObject *, char *); /*proto*/ static PyObject *__pyx_f_13variantcaller_mergeHaplotypes(PyObject *, struct __pyx_obj_9fastafile_FastaFile *); /*proto*/ static PyObject *__pyx_f_13variantcaller_generateVariantsInRegion(PyObject *, int, int, PyObject *, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ static void __pyx_f_13variantcaller_callVariantsInRegion(PyObject *, int, int, PyObject *, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, struct __pyx_obj_11cpopulation_Population *); /*proto*/ static int __pyx_f_13variantcaller_sumMapQualsTimesReadLength(PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "variantcaller" int __pyx_module_is_main_variantcaller = 0; /* Implementation of 'variantcaller' */ static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_sorted; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_xrange; static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_StandardError; static PyObject *__pyx_builtin_max; static PyObject *__pyx_builtin_zip; static PyObject *__pyx_pf_13variantcaller_outputRefCall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chrom, struct __pyx_obj_11cpopulation_Population *__pyx_v_pop, PyObject *__pyx_v_vcfFile, CYTHON_UNUSED struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile, PyObject *__pyx_v_outputFile, CYTHON_UNUSED int __pyx_v_windowIndex, PyObject *__pyx_v_window, CYTHON_UNUSED PyObject *__pyx_v_options, PyObject *__pyx_v_readBuffers); /* proto */ static PyObject *__pyx_pf_13variantcaller_21PlatypusSingleProcess_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_13variantcaller_21PlatypusSingleProcess___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fileName, PyObject *__pyx_v_options, PyObject *__pyx_v_regions, PyObject *__pyx_v_continuing, PyObject *__pyx_v_samples, PyObject *__pyx_v_bamFileNames, PyObject *__pyx_v_samplesByID, PyObject *__pyx_v_samplesByBAM, PyObject *__pyx_v_bamFiles, PyObject *__pyx_v_theLocks); /* proto */ static PyObject *__pyx_pf_13variantcaller_21PlatypusSingleProcess_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_13variantcaller_20PlatypusMultiProcess_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_13variantcaller_20PlatypusMultiProcess___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fileName, PyObject *__pyx_v_options, PyObject *__pyx_v_regions, PyObject *__pyx_v_continuing, PyObject *__pyx_v_samples, PyObject *__pyx_v_bamFileNames, PyObject *__pyx_v_samplesByID, PyObject *__pyx_v_samplesByBAM, PyObject *__pyx_v_bamFiles, PyObject *__pyx_v_theLocks); /* proto */ static PyObject *__pyx_pf_13variantcaller_20PlatypusMultiProcess_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static char __pyx_k_1[] = "No coverage in window %s:%s-%s. Skipping"; static char __pyx_k_2[] = "Skipping pathalogical window %s:%s-%s with %s reads"; static char __pyx_k_3[] = "skipDifficultWindows"; static char __pyx_k_4[] = "Skipping window with %s variants"; static char __pyx_k_5[] = "filterVarsByCoverage"; static char __pyx_k_6[] = "Sizes: SeqQual = %s. cigar = %s. read = %s. pointers = %s. Total = %s"; static char __pyx_k_7[] = "Need to assemble %s:%s-%s. nReads = %s. nGaps = %s. n per read = %s"; static char __pyx_k_8[] = "Need to assemble %s:%s-%s. nReads = %s. nImproper = %s. fraction = %s"; static char __pyx_k_9[] = "There are %s reads (buffer size = %s. Total reads size = %s bytes) in the region %s:%s-%s"; static char __pyx_k_10[] = "Processed sample %s. Detected %s unfiltered variant candidates so far"; static char __pyx_k_11[] = "VariantCandidateReader"; static char __pyx_k_12[] = "Assembly region windows will be tiled. Each region will start %s bases after the last one"; static char __pyx_k_13[] = "There are %s filtered variant candidates which will be used for calling in region %s:%s-%s"; static char __pyx_k_14[] = "Exception in region %s:%s-%s. Error was %s"; static char __pyx_k_15[] = "Region %s:%s-%s will be skipped"; static char __pyx_k_16[] = "Skipping region %s:%s-%s as data could not be loaded"; static char __pyx_k_17[] = "Skipping very large window %s:%s-%s of size %s,"; static char __pyx_k_18[] = "Exception in window %d-%d. Error was %s"; static char __pyx_k_19[] = "Window %s:%s-%s will be skipped"; static char __pyx_k_20[] = "Making ref call in region %s:%s-%s"; static char __pyx_k_21[] = "Could not find ref in genotype list. There are %s genotypes. They are %s"; static char __pyx_k_22[] = "."; static char __pyx_k_23[] = "GT:GL:GOF:GQ:NR:NV"; static char __pyx_k_24[] = "/"; static char __pyx_k_25[] = "default_indel_error_model"; static char __pyx_k_26[] = "Searching for variants in the following regions: %s"; static char __pyx_k_27[] = ".bam"; static char __pyx_k_29[] = "Treating --bamFiles argument, %s as a text file containing a list of BAM file names"; static char __pyx_k_30[] = "getBAMFileNamesFromTextFile"; static char __pyx_k_31[] = "getSampleNamesAndLoadIterators"; static char __pyx_k_32[] = ".gz"; static char __pyx_k_34[] = ".bz2"; static char __pyx_k_36[] = ".bgz"; static char __pyx_k_38[] = "Reference file-name (%s) looks like a compressed file-name. Please un-compress the reference FASTA file before running Platypus"; static char __pyx_k_39[] = "Invalid reference FASTA file supplied"; static char __pyx_k_40[] = ".fai"; static char __pyx_k_41[] = "nCombinationsWithReplacement"; static char __pyx_k_42[] = "Max haplotypes = %s"; static char __pyx_k_43[] = "Max genotypes = %s"; static char __pyx_k_44[] = "Opening file %s for appending"; static char __pyx_k_45[] = "Processing region %s:%s-%s. (Only printing this message every %s regions of size %s)"; static char __pyx_k_46[] = "Processing region %s:%s-%s"; static char __pyx_k_47[] = "PlatypusSingleProcess"; static char __pyx_k_48[] = "\nThis module contains the top-level variant-calling\ncode, including a VariantCaller class.\n"; static char __pyx_k_50[] = "Platypus_Version_%s"; static char __pyx_k_53[] = "/home/rimmer/nethome/Code/Trunk/Platypus/src/cython/variantcaller.pyx"; static char __pyx_k_58[] = "\n Simple class to represent a single Platypus process.\n "; static char __pyx_k_63[] = "\n Simple class to represent a single Platypus process, which is run as part of a\n multi-process job.\n "; static char __pyx_k_64[] = "PlatypusMultiProcess"; static char __pyx_k__N[] = "N"; static char __pyx_k__a[] = "a"; static char __pyx_k__i[] = "i"; static char __pyx_k__v[] = "v"; static char __pyx_k__w[] = "w"; 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__TCF[] = "TCF"; static char __pyx_k__TCR[] = "TCR"; static char __pyx_k__VCF[] = "VCF"; static char __pyx_k__alt[] = "alt"; static char __pyx_k__end[] = "end"; static char __pyx_k__max[] = "max"; static char __pyx_k__pop[] = "pop"; static char __pyx_k__pos[] = "pos"; static char __pyx_k__ref[] = "ref"; static char __pyx_k__run[] = "run"; static char __pyx_k__vcf[] = "vcf"; static char __pyx_k__zip[] = "zip"; static char __pyx_k__MGOF[] = "MGOF"; static char __pyx_k__MMLQ[] = "MMLQ"; static char __pyx_k__Size[] = "Size"; static char __pyx_k__date[] = "date"; static char __pyx_k__hap1[] = "hap1"; static char __pyx_k__hap2[] = "hap2"; static char __pyx_k__info[] = "info"; static char __pyx_k__nCPU[] = "nCPU"; static char __pyx_k__nInd[] = "nInd"; static char __pyx_k__open[] = "open"; static char __pyx_k__qual[] = "qual"; static char __pyx_k__rlen[] = "rlen"; static char __pyx_k__self[] = "self"; static char __pyx_k__time[] = "time"; static char __pyx_k__chrom[] = "chrom"; static char __pyx_k__close[] = "close"; static char __pyx_k__debug[] = "debug"; static char __pyx_k__error[] = "error"; static char __pyx_k__index[] = "index"; static char __pyx_k__lower[] = "lower"; static char __pyx_k__pyvcf[] = "pyvcf"; static char __pyx_k__range[] = "range"; static char __pyx_k__start[] = "start"; static char __pyx_k__SbPval[] = "SbPval"; static char __pyx_k__Source[] = "Source"; static char __pyx_k__bisect[] = "bisect"; static char __pyx_k__endPos[] = "endPos"; 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__object[] = "object"; static char __pyx_k__ploidy[] = "ploidy"; static char __pyx_k__sorted[] = "sorted"; static char __pyx_k__source[] = "source"; static char __pyx_k__window[] = "window"; static char __pyx_k__xrange[] = "xrange"; static char __pyx_k__Process[] = "Process"; static char __pyx_k__REFCALL[] = "REFCALL"; static char __pyx_k__genSNPs[] = "genSNPs"; static char __pyx_k__logging[] = "logging"; static char __pyx_k__maxPost[] = "maxPost"; static char __pyx_k__maxSize[] = "maxSize"; static char __pyx_k__options[] = "options"; static char __pyx_k__probRef[] = "probRef"; static char __pyx_k__refFile[] = "refFile"; static char __pyx_k__regions[] = "regions"; static char __pyx_k__samples[] = "samples"; static char __pyx_k__setinfo[] = "setinfo"; static char __pyx_k__theLock[] = "theLock"; static char __pyx_k__vcfFile[] = "vcfFile"; static char __pyx_k__warning[] = "warning"; static char __pyx_k__HapScore[] = "HapScore"; static char __pyx_k__Variants[] = "Variants"; static char __pyx_k____init__[] = "__init__"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__assemble[] = "assemble"; static char __pyx_k__bamFiles[] = "bamFiles"; static char __pyx_k__datetime[] = "datetime"; static char __pyx_k__endswith[] = "endswith"; static char __pyx_k__fileDate[] = "fileDate"; static char __pyx_k__fileName[] = "fileName"; static char __pyx_k__genotype[] = "genotype"; static char __pyx_k__lineinfo[] = "lineinfo"; static char __pyx_k__maxReads[] = "maxReads"; static char __pyx_k__minFlank[] = "minFlank"; static char __pyx_k__minReads[] = "minReads"; static char __pyx_k__refIndex[] = "refIndex"; static char __pyx_k__startPos[] = "startPos"; static char __pyx_k__tempQual[] = "tempQual"; static char __pyx_k__theLocks[] = "theLocks"; static char __pyx_k__variants[] = "variants"; static char __pyx_k__vcfutils[] = "vcfutils"; static char __pyx_k__Exception[] = "Exception"; static char __pyx_k__SeqLength[] = "SeqLength"; static char __pyx_k__enumerate[] = "enumerate"; static char __pyx_k__exception[] = "exception"; static char __pyx_k__genIndels[] = "genIndels"; static char __pyx_k__genotypes[] = "genotypes"; static char __pyx_k__getLogger[] = "getLogger"; static char __pyx_k__setfilter[] = "setfilter"; static char __pyx_k__setformat[] = "setformat"; static char __pyx_k__setheader[] = "setheader"; static char __pyx_k__theBuffer[] = "theBuffer"; static char __pyx_k__theFormat[] = "theFormat"; static char __pyx_k__vcfHeader[] = "vcfHeader"; static char __pyx_k__verbosity[] = "verbosity"; static char __pyx_k__windowEnd[] = "windowEnd"; static char __pyx_k__bufferSize[] = "bufferSize"; static char __pyx_k__chaplotype[] = "chaplotype"; static char __pyx_k__chromosome[] = "chromosome"; static char __pyx_k__continuing[] = "continuing"; static char __pyx_k__linefilter[] = "linefilter"; static char __pyx_k__maxProbVar[] = "maxProbVar"; static char __pyx_k__minMapQual[] = "minMapQual"; static char __pyx_k__outputFile[] = "outputFile"; static char __pyx_k__printEvery[] = "printEvery"; static char __pyx_k__setsamples[] = "setsamples"; static char __pyx_k__sourceFile[] = "sourceFile"; static char __pyx_k__theBamFile[] = "theBamFile"; static char __pyx_k__thisSample[] = "thisSample"; static char __pyx_k__windowSize[] = "windowSize"; static char __pyx_k__write_data[] = "write_data"; static char __pyx_k__assembleAll[] = "assembleAll"; static char __pyx_k__maxVariants[] = "maxVariants"; static char __pyx_k__minBaseQual[] = "minBaseQual"; static char __pyx_k__phredPValue[] = "phredPValue"; static char __pyx_k__qualBinSize[] = "qualBinSize"; static char __pyx_k__readBuffers[] = "readBuffers"; static char __pyx_k__samplesByID[] = "samplesByID"; static char __pyx_k__vcfDataLine[] = "vcfDataLine"; static char __pyx_k__windowIndex[] = "windowIndex"; static char __pyx_k__windowStart[] = "windowStart"; static char __pyx_k__writeheader[] = "writeheader"; static char __pyx_k__bamFileNames[] = "bamFileNames"; static char __pyx_k__maxGenotypes[] = "maxGenotypes"; static char __pyx_k__nIndividuals[] = "nIndividuals"; static char __pyx_k__samplesByBAM[] = "samplesByBAM"; static char __pyx_k__variantutils[] = "variantutils"; static char __pyx_k__StandardError[] = "StandardError"; static char __pyx_k__compressReads[] = "compressReads"; static char __pyx_k__fromtimestamp[] = "fromtimestamp"; static char __pyx_k__maxHaplotypes[] = "maxHaplotypes"; static char __pyx_k__minLikelihood[] = "minLikelihood"; static char __pyx_k__outputRefCall[] = "outputRefCall"; static char __pyx_k__platypusutils[] = "platypusutils"; static char __pyx_k__shareBAMFiles[] = "shareBAMFiles"; static char __pyx_k__singleProcess[] = "singleProcess"; static char __pyx_k__sumOfMapQuals[] = "sumOfMapQuals"; static char __pyx_k__variantcaller[] = "variantcaller"; static char __pyx_k__ReadPosRankSum[] = "ReadPosRankSum"; static char __pyx_k__outputRefCalls[] = "outputRefCalls"; static char __pyx_k__thisLikelihood[] = "thisLikelihood"; static char __pyx_k__WindowGenerator[] = "WindowGenerator"; static char __pyx_k__indelErrorModel[] = "indelErrorModel"; static char __pyx_k__maxEMIterations[] = "maxEMIterations"; static char __pyx_k__multiprocessing[] = "multiprocessing"; static char __pyx_k__platypusOptions[] = "platypusOptions"; static char __pyx_k__readsThisSample[] = "readsThisSample"; static char __pyx_k__windowGenerator[] = "windowGenerator"; static char __pyx_k__PLATYPUS_VERSION[] = "PLATYPUS_VERSION"; static char __pyx_k__vcfInfoSignature[] = "vcfInfoSignature"; static char __pyx_k__isZeroCoverageBAM[] = "isZeroCoverageBAM"; static char __pyx_k__minReadsForSample[] = "minReadsForSample"; static char __pyx_k__WindowsAndVariants[] = "WindowsAndVariants"; static char __pyx_k__assemblyRegionSize[] = "assemblyRegionSize"; static char __pyx_k__useIndelErrorModel[] = "useIndelErrorModel"; static char __pyx_k__vcfFilterSignature[] = "vcfFilterSignature"; static char __pyx_k__vcfFormatSignature[] = "vcfFormatSignature"; static char __pyx_k__getVariantsFromBAMs[] = "getVariantsFromBAMs"; static PyObject *__pyx_kp_s_1; static PyObject *__pyx_kp_s_10; static PyObject *__pyx_n_s_11; static PyObject *__pyx_kp_s_12; static PyObject *__pyx_kp_s_13; static PyObject *__pyx_kp_s_14; static PyObject *__pyx_kp_s_15; static PyObject *__pyx_kp_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_20; static PyObject *__pyx_kp_s_21; static PyObject *__pyx_kp_s_22; static PyObject *__pyx_kp_s_23; static PyObject *__pyx_kp_s_24; static PyObject *__pyx_n_s_25; static PyObject *__pyx_kp_s_26; static PyObject *__pyx_kp_s_27; static PyObject *__pyx_kp_s_29; static PyObject *__pyx_n_s_3; static PyObject *__pyx_n_s_30; static PyObject *__pyx_n_s_31; 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_39; static PyObject *__pyx_kp_s_4; static PyObject *__pyx_kp_s_40; static PyObject *__pyx_n_s_41; static PyObject *__pyx_kp_s_42; static PyObject *__pyx_kp_s_43; static PyObject *__pyx_kp_s_44; static PyObject *__pyx_kp_s_45; static PyObject *__pyx_kp_s_46; static PyObject *__pyx_n_s_47; static PyObject *__pyx_n_s_5; static PyObject *__pyx_kp_s_50; static PyObject *__pyx_kp_s_53; static PyObject *__pyx_kp_s_58; static PyObject *__pyx_kp_s_6; static PyObject *__pyx_kp_s_63; static PyObject *__pyx_n_s_64; static PyObject *__pyx_kp_s_7; static PyObject *__pyx_kp_s_8; static PyObject *__pyx_kp_s_9; static PyObject *__pyx_n_s__BE; static PyObject *__pyx_n_s__BRF; static PyObject *__pyx_n_s__BS; static PyObject *__pyx_n_s__Exception; static PyObject *__pyx_n_s__FR; static PyObject *__pyx_n_s__FS; 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__Log; static PyObject *__pyx_n_s__MGOF; static PyObject *__pyx_n_s__MMLQ; static PyObject *__pyx_n_s__MQ; static PyObject *__pyx_n_s__N; static PyObject *__pyx_n_s__NF; static PyObject *__pyx_n_s__NR; static PyObject *__pyx_n_s__NV; static PyObject *__pyx_n_s__PLATYPUS_VERSION; static PyObject *__pyx_n_s__PP; static PyObject *__pyx_n_s__Process; static PyObject *__pyx_n_s__QD; 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__SeqLength; static PyObject *__pyx_n_s__Size; static PyObject *__pyx_n_s__Source; static PyObject *__pyx_n_s__StandardError; 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__VCF; static PyObject *__pyx_n_s__Variants; static PyObject *__pyx_n_s__WE; static PyObject *__pyx_n_s__WS; static PyObject *__pyx_n_s__WindowGenerator; static PyObject *__pyx_n_s__WindowsAndVariants; static PyObject *__pyx_n_s____init__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s__a; static PyObject *__pyx_n_s__alt; static PyObject *__pyx_n_s__assemble; static PyObject *__pyx_n_s__assembleAll; static PyObject *__pyx_n_s__assemblyRegionSize; static PyObject *__pyx_n_s__bamFileNames; static PyObject *__pyx_n_s__bamFiles; static PyObject *__pyx_n_s__bisect; static PyObject *__pyx_n_s__bufferSize; static PyObject *__pyx_n_s__chaplotype; static PyObject *__pyx_n_s__chrom; static PyObject *__pyx_n_s__chromosome; static PyObject *__pyx_n_s__close; static PyObject *__pyx_n_s__compressReads; static PyObject *__pyx_n_s__continuing; static PyObject *__pyx_n_s__date; static PyObject *__pyx_n_s__datetime; static PyObject *__pyx_n_s__debug; static PyObject *__pyx_n_s__end; static PyObject *__pyx_n_s__endPos; static PyObject *__pyx_n_s__endswith; static PyObject *__pyx_n_s__enumerate; static PyObject *__pyx_n_s__error; static PyObject *__pyx_n_s__exception; static PyObject *__pyx_n_s__extend; static PyObject *__pyx_n_s__fileDate; static PyObject *__pyx_n_s__fileName; static PyObject *__pyx_n_s__filter; static PyObject *__pyx_n_s__format; static PyObject *__pyx_n_s__fromtimestamp; static PyObject *__pyx_n_s__genIndels; static PyObject *__pyx_n_s__genSNPs; static PyObject *__pyx_n_s__genotype; static PyObject *__pyx_n_s__genotypes; static PyObject *__pyx_n_s__getLogger; static PyObject *__pyx_n_s__getVariantsFromBAMs; static PyObject *__pyx_n_s__hap1; static PyObject *__pyx_n_s__hap2; static PyObject *__pyx_n_s__i; static PyObject *__pyx_n_s__id; static PyObject *__pyx_n_s__indelErrorModel; static PyObject *__pyx_n_s__index; static PyObject *__pyx_n_s__info; static PyObject *__pyx_n_s__isZeroCoverageBAM; static PyObject *__pyx_n_s__linefilter; static PyObject *__pyx_n_s__lineinfo; static PyObject *__pyx_n_s__logger; static PyObject *__pyx_n_s__logging; static PyObject *__pyx_n_s__lower; static PyObject *__pyx_n_s__max; static PyObject *__pyx_n_s__maxEMIterations; static PyObject *__pyx_n_s__maxGenotypes; static PyObject *__pyx_n_s__maxHaplotypes; static PyObject *__pyx_n_s__maxPost; static PyObject *__pyx_n_s__maxProbVar; static PyObject *__pyx_n_s__maxReads; static PyObject *__pyx_n_s__maxSize; static PyObject *__pyx_n_s__maxVariants; static PyObject *__pyx_n_s__minBaseQual; static PyObject *__pyx_n_s__minFlank; static PyObject *__pyx_n_s__minLikelihood; static PyObject *__pyx_n_s__minMapQual; static PyObject *__pyx_n_s__minReads; static PyObject *__pyx_n_s__minReadsForSample; static PyObject *__pyx_n_s__multiprocessing; static PyObject *__pyx_n_s__nCPU; static PyObject *__pyx_n_s__nInd; static PyObject *__pyx_n_s__nIndividuals; static PyObject *__pyx_n_s__object; static PyObject *__pyx_n_s__open; static PyObject *__pyx_n_s__options; static PyObject *__pyx_n_s__outputFile; static PyObject *__pyx_n_s__outputRefCall; static PyObject *__pyx_n_s__outputRefCalls; static PyObject *__pyx_n_s__phredPValue; static PyObject *__pyx_n_s__platypusOptions; static PyObject *__pyx_n_s__platypusutils; static PyObject *__pyx_n_s__ploidy; static PyObject *__pyx_n_s__pop; static PyObject *__pyx_n_s__pos; static PyObject *__pyx_n_s__printEvery; static PyObject *__pyx_n_s__probRef; static PyObject *__pyx_n_s__pyvcf; static PyObject *__pyx_n_s__qual; static PyObject *__pyx_n_s__qualBinSize; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__readBuffers; static PyObject *__pyx_n_s__readsThisSample; static PyObject *__pyx_n_s__ref; static PyObject *__pyx_n_s__refFile; static PyObject *__pyx_n_s__refIndex; static PyObject *__pyx_n_s__regions; static PyObject *__pyx_n_s__rlen; static PyObject *__pyx_n_s__run; static PyObject *__pyx_n_s__samples; static PyObject *__pyx_n_s__samplesByBAM; static PyObject *__pyx_n_s__samplesByID; static PyObject *__pyx_n_s__self; static PyObject *__pyx_n_s__setfilter; static PyObject *__pyx_n_s__setformat; static PyObject *__pyx_n_s__setheader; static PyObject *__pyx_n_s__setinfo; static PyObject *__pyx_n_s__setsamples; static PyObject *__pyx_n_s__shareBAMFiles; static PyObject *__pyx_n_s__singleProcess; static PyObject *__pyx_n_s__sorted; static PyObject *__pyx_n_s__source; static PyObject *__pyx_n_s__sourceFile; static PyObject *__pyx_n_s__start; static PyObject *__pyx_n_s__startPos; static PyObject *__pyx_n_s__sumOfMapQuals; static PyObject *__pyx_n_s__tempQual; static PyObject *__pyx_n_s__theBamFile; static PyObject *__pyx_n_s__theBuffer; static PyObject *__pyx_n_s__theFormat; static PyObject *__pyx_n_s__theLock; static PyObject *__pyx_n_s__theLocks; static PyObject *__pyx_n_s__thisLikelihood; static PyObject *__pyx_n_s__thisSample; static PyObject *__pyx_n_s__time; static PyObject *__pyx_n_s__useIndelErrorModel; static PyObject *__pyx_n_s__v; static PyObject *__pyx_n_s__variantcaller; static PyObject *__pyx_n_s__variants; static PyObject *__pyx_n_s__variantutils; static PyObject *__pyx_n_s__vcf; 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__vcfHeader; static PyObject *__pyx_n_s__vcfInfoSignature; static PyObject *__pyx_n_s__vcfutils; static PyObject *__pyx_n_s__verbosity; static PyObject *__pyx_n_s__w; static PyObject *__pyx_n_s__warning; static PyObject *__pyx_n_s__window; static PyObject *__pyx_n_s__windowEnd; static PyObject *__pyx_n_s__windowGenerator; static PyObject *__pyx_n_s__windowIndex; static PyObject *__pyx_n_s__windowSize; static PyObject *__pyx_n_s__windowStart; static PyObject *__pyx_n_s__write_data; static PyObject *__pyx_n_s__writeheader; static PyObject *__pyx_n_s__xrange; static PyObject *__pyx_n_s__zip; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_5; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_10; static PyObject *__pyx_int_257; static PyObject *__pyx_int_2500; static PyObject *__pyx_k_tuple_28; static PyObject *__pyx_k_tuple_33; static PyObject *__pyx_k_tuple_35; static PyObject *__pyx_k_tuple_37; static PyObject *__pyx_k_tuple_49; static PyObject *__pyx_k_tuple_51; static PyObject *__pyx_k_tuple_54; static PyObject *__pyx_k_tuple_56; static PyObject *__pyx_k_tuple_59; static PyObject *__pyx_k_tuple_61; static PyObject *__pyx_k_codeobj_52; static PyObject *__pyx_k_codeobj_55; static PyObject *__pyx_k_codeobj_57; static PyObject *__pyx_k_codeobj_60; static PyObject *__pyx_k_codeobj_62; /* "variantcaller.pyx":74 * ################################################################################################### * * cdef void callVariantsInWindow(dict window, options, FastaFile refFile, list readBuffers, Population pop, int start, int end, char* refSeq): # <<<<<<<<<<<<<< * """ * """ */ static void __pyx_f_13variantcaller_callVariantsInWindow(PyObject *__pyx_v_window, PyObject *__pyx_v_options, struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile, PyObject *__pyx_v_readBuffers, struct __pyx_obj_11cpopulation_Population *__pyx_v_pop, int __pyx_v_start, int __pyx_v_end, char *__pyx_v_refSeq) { struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_theReadBuffer = 0; PyObject *__pyx_v_chrom = 0; PyObject *__pyx_v_variants = 0; int __pyx_v_windowStart; int __pyx_v_windowEnd; int __pyx_v_nReadsThisWindow; int __pyx_v_qualBinSize; struct __pyx_obj_10chaplotype_Haplotype *__pyx_v_refHaplotype = 0; PyObject *__pyx_v_allVarHaplotypes = 0; PyObject *__pyx_v_allUniqueHaplotypes = 0; PyObject *__pyx_v_allGenotypes = 0; int __pyx_v_nUniqueHaplotypes; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __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; int __pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_t_17; int __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("callVariantsInWindow", 0); /* "variantcaller.pyx":80 * cdef Variant v * cdef bamReadBuffer theReadBuffer * cdef bytes chrom = window['chromosome'] # <<<<<<<<<<<<<< * cdef list variants = window["variants"] * cdef int windowStart = window['startPos'] */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__chromosome)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_chrom = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":81 * cdef bamReadBuffer theReadBuffer * cdef bytes chrom = window['chromosome'] * cdef list variants = window["variants"] # <<<<<<<<<<<<<< * cdef int windowStart = window['startPos'] * cdef int windowEnd = window['endPos'] */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__variants)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); 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 = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_variants = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":82 * cdef bytes chrom = window['chromosome'] * cdef list variants = window["variants"] * cdef int windowStart = window['startPos'] # <<<<<<<<<<<<<< * cdef int windowEnd = window['endPos'] * cdef int nReadsThisWindow = 0 */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__startPos)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __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 = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_windowStart = __pyx_t_2; /* "variantcaller.pyx":83 * cdef list variants = window["variants"] * cdef int windowStart = window['startPos'] * cdef int windowEnd = window['endPos'] # <<<<<<<<<<<<<< * cdef int nReadsThisWindow = 0 * cdef int qualBinSize = options.qualBinSize */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__endPos)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __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 = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_windowEnd = __pyx_t_2; /* "variantcaller.pyx":84 * cdef int windowStart = window['startPos'] * cdef int windowEnd = window['endPos'] * cdef int nReadsThisWindow = 0 # <<<<<<<<<<<<<< * cdef int qualBinSize = options.qualBinSize * */ __pyx_v_nReadsThisWindow = 0; /* "variantcaller.pyx":85 * cdef int windowEnd = window['endPos'] * cdef int nReadsThisWindow = 0 * cdef int qualBinSize = options.qualBinSize # <<<<<<<<<<<<<< * * cdef Haplotype refHaplotype = Haplotype(chrom, windowStart, windowEnd, (), refFile, options.rlen, options.useIndelErrorModel, options) */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__qualBinSize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __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 = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_qualBinSize = __pyx_t_2; /* "variantcaller.pyx":87 * cdef int qualBinSize = options.qualBinSize * * cdef Haplotype refHaplotype = Haplotype(chrom, windowStart, windowEnd, (), refFile, options.rlen, options.useIndelErrorModel, options) # <<<<<<<<<<<<<< * * pop.reset() */ __pyx_t_1 = PyInt_FromLong(__pyx_v_windowStart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyInt_FromLong(__pyx_v_windowEnd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__rlen); 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_v_options, __pyx_n_s__useIndelErrorModel); 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_t_6 = PyTuple_New(8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_empty_tuple)); PyTuple_SET_ITEM(__pyx_t_6, 3, ((PyObject *)__pyx_empty_tuple)); __Pyx_GIVEREF(((PyObject *)__pyx_empty_tuple)); __Pyx_INCREF(((PyObject *)__pyx_v_refFile)); PyTuple_SET_ITEM(__pyx_t_6, 4, ((PyObject *)__pyx_v_refFile)); __Pyx_GIVEREF(((PyObject *)__pyx_v_refFile)); PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_10chaplotype_Haplotype)), ((PyObject *)__pyx_t_6), NULL); 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(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_refHaplotype = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_5); __pyx_t_5 = 0; /* "variantcaller.pyx":89 * cdef Haplotype refHaplotype = Haplotype(chrom, windowStart, windowEnd, (), refFile, options.rlen, options.useIndelErrorModel, options) * * pop.reset() # <<<<<<<<<<<<<< * * for theReadBuffer in readBuffers: */ ((struct __pyx_vtabstruct_11cpopulation_Population *)__pyx_v_pop->__pyx_vtab)->reset(__pyx_v_pop); /* "variantcaller.pyx":91 * pop.reset() * * for theReadBuffer in readBuffers: # <<<<<<<<<<<<<< * theReadBuffer.setWindowPointers(windowStart, windowEnd, start, end, refSeq, qualBinSize) * nReadsThisWindow += (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = ((PyObject *)__pyx_v_readBuffers); __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theReadBuffer)); __pyx_v_theReadBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":92 * * for theReadBuffer in readBuffers: * theReadBuffer.setWindowPointers(windowStart, windowEnd, start, end, refSeq, qualBinSize) # <<<<<<<<<<<<<< * nReadsThisWindow += (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) * */ ((struct __pyx_vtabstruct_7cwindow_bamReadBuffer *)__pyx_v_theReadBuffer->__pyx_vtab)->setWindowPointers(__pyx_v_theReadBuffer, __pyx_v_windowStart, __pyx_v_windowEnd, __pyx_v_start, __pyx_v_end, __pyx_v_refSeq, __pyx_v_qualBinSize); /* "variantcaller.pyx":93 * for theReadBuffer in readBuffers: * theReadBuffer.setWindowPointers(windowStart, windowEnd, start, end, refSeq, qualBinSize) * nReadsThisWindow += (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) # <<<<<<<<<<<<<< * * if nReadsThisWindow == 0 and not options.outputRefCalls: */ __pyx_v_nReadsThisWindow = (__pyx_v_nReadsThisWindow + (__pyx_v_theReadBuffer->reads->windowEnd - __pyx_v_theReadBuffer->reads->windowStart)); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "variantcaller.pyx":95 * nReadsThisWindow += (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) * * if nReadsThisWindow == 0 and not options.outputRefCalls: # <<<<<<<<<<<<<< * if options.verbosity >= 3: * logger.debug("No coverage in window %s:%s-%s. Skipping" %(chrom, windowStart, windowEnd)) */ __pyx_t_8 = (__pyx_v_nReadsThisWindow == 0); if (__pyx_t_8) { __pyx_t_5 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__outputRefCalls); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = (!__pyx_t_9); __pyx_t_9 = __pyx_t_10; } else { __pyx_t_9 = __pyx_t_8; } if (__pyx_t_9) { /* "variantcaller.pyx":96 * * if nReadsThisWindow == 0 and not options.outputRefCalls: * if options.verbosity >= 3: # <<<<<<<<<<<<<< * logger.debug("No coverage in window %s:%s-%s. Skipping" %(chrom, windowStart, windowEnd)) * return */ __pyx_t_5 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __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 = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_9) { /* "variantcaller.pyx":97 * if nReadsThisWindow == 0 and not options.outputRefCalls: * if options.verbosity >= 3: * logger.debug("No coverage in window %s:%s-%s. Skipping" %(chrom, windowStart, windowEnd)) # <<<<<<<<<<<<<< * return * */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__debug); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyInt_FromLong(__pyx_v_windowStart); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyInt_FromLong(__pyx_v_windowEnd); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __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 = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; /* "variantcaller.pyx":98 * if options.verbosity >= 3: * logger.debug("No coverage in window %s:%s-%s. Skipping" %(chrom, windowStart, windowEnd)) * return # <<<<<<<<<<<<<< * * if nReadsThisWindow > 1e6: */ goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "variantcaller.pyx":100 * return * * if nReadsThisWindow > 1e6: # <<<<<<<<<<<<<< * logger.debug("Skipping pathalogical window %s:%s-%s with %s reads" %(chrom, windowStart, windowEnd, nReadsThisWindow)) * return */ __pyx_t_9 = (__pyx_v_nReadsThisWindow > 1e6); if (__pyx_t_9) { /* "variantcaller.pyx":101 * * if nReadsThisWindow > 1e6: * logger.debug("Skipping pathalogical window %s:%s-%s with %s reads" %(chrom, windowStart, windowEnd, nReadsThisWindow)) # <<<<<<<<<<<<<< * return * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); 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_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__debug); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromLong(__pyx_v_windowStart); 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 = PyInt_FromLong(__pyx_v_windowEnd); 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_t_6 = PyInt_FromLong(__pyx_v_nReadsThisWindow); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __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 = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 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_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __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_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":102 * if nReadsThisWindow > 1e6: * logger.debug("Skipping pathalogical window %s:%s-%s with %s reads" %(chrom, windowStart, windowEnd, nReadsThisWindow)) * return # <<<<<<<<<<<<<< * * if len(variants) > options.maxVariants: */ goto __pyx_L0; goto __pyx_L7; } __pyx_L7:; /* "variantcaller.pyx":104 * return * * if len(variants) > options.maxVariants: # <<<<<<<<<<<<<< * * if options.skipDifficultWindows: */ 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 = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_variants)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__maxVariants); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { /* "variantcaller.pyx":106 * if len(variants) > options.maxVariants: * * if options.skipDifficultWindows: # <<<<<<<<<<<<<< * logger.debug("Skipping window with %s variants" %(len(variants))) * return */ __pyx_t_3 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { /* "variantcaller.pyx":107 * * if options.skipDifficultWindows: * logger.debug("Skipping window with %s variants" %(len(variants))) # <<<<<<<<<<<<<< * return * */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__debug); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 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 = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_variants)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __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 = 107; __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_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":108 * if options.skipDifficultWindows: * logger.debug("Skipping window with %s variants" %(len(variants))) * return # <<<<<<<<<<<<<< * * elif options.filterVarsByCoverage: */ goto __pyx_L0; goto __pyx_L9; } /* "variantcaller.pyx":110 * return * * elif options.filterVarsByCoverage: # <<<<<<<<<<<<<< * #logger.debug("There are %s variants before filtering" %(len(window['variants']))) * filterVariantsByCoverage(window, chrom, windowStart, windowEnd, refFile, options, variants, refHaplotype, readBuffers) */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_9) { /* "variantcaller.pyx":112 * elif options.filterVarsByCoverage: * #logger.debug("There are %s variants before filtering" %(len(window['variants']))) * filterVariantsByCoverage(window, chrom, windowStart, windowEnd, refFile, options, variants, refHaplotype, readBuffers) # <<<<<<<<<<<<<< * #logger.debug("There are %s variants after filtering" %(len(window['variants']))) * */ __pyx_f_13variantFilter_filterVariantsByCoverage(__pyx_v_window, __pyx_v_chrom, __pyx_v_windowStart, __pyx_v_windowEnd, __pyx_v_refFile, __pyx_v_options, __pyx_v_variants, __pyx_v_refHaplotype, __pyx_v_readBuffers); goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "variantcaller.pyx":116 * * # Create haplotype list using all data from all samples. Always consider the reference haplotype. * cdef list allVarHaplotypes = variantFilter.getHaplotypesInWindow(window, nReadsThisWindow, refFile, options.ploidy, options.maxReads, options.minMapQual, options.minBaseQual, options.maxHaplotypes, options.maxVariants, options.rlen, options.useIndelErrorModel, options.verbosity, readBuffers, options) # <<<<<<<<<<<<<< * #cdef list allUniqueHaplotypes = list(set([refHaplotype] + allVarHaplotypes)) * cdef list allUniqueHaplotypes = mergeHaplotypes([refHaplotype] + allVarHaplotypes, refFile) */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__ploidy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__maxReads); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minMapQual); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minBaseQual); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__maxHaplotypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__maxVariants); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_15 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__rlen); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__useIndelErrorModel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_17 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = ((PyObject *)__pyx_f_13variantFilter_getHaplotypesInWindow(__pyx_v_window, __pyx_v_nReadsThisWindow, __pyx_v_refFile, __pyx_t_2, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_v_readBuffers, __pyx_v_options)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_allVarHaplotypes = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":118 * cdef list allVarHaplotypes = variantFilter.getHaplotypesInWindow(window, nReadsThisWindow, refFile, options.ploidy, options.maxReads, options.minMapQual, options.minBaseQual, options.maxHaplotypes, options.maxVariants, options.rlen, options.useIndelErrorModel, options.verbosity, readBuffers, options) * #cdef list allUniqueHaplotypes = list(set([refHaplotype] + allVarHaplotypes)) * cdef list allUniqueHaplotypes = mergeHaplotypes([refHaplotype] + allVarHaplotypes, refFile) # <<<<<<<<<<<<<< * cdef list allGenotypes = generateAllGenotypesFromHaplotypeList(options.ploidy, allUniqueHaplotypes) * */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_refHaplotype)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_refHaplotype)); __Pyx_GIVEREF(((PyObject *)__pyx_v_refHaplotype)); __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_6), ((PyObject *)__pyx_v_allVarHaplotypes)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __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 = ((PyObject *)__pyx_f_13variantcaller_mergeHaplotypes(__pyx_t_3, __pyx_v_refFile)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_allUniqueHaplotypes = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":119 * #cdef list allUniqueHaplotypes = list(set([refHaplotype] + allVarHaplotypes)) * cdef list allUniqueHaplotypes = mergeHaplotypes([refHaplotype] + allVarHaplotypes, refFile) * cdef list allGenotypes = generateAllGenotypesFromHaplotypeList(options.ploidy, allUniqueHaplotypes) # <<<<<<<<<<<<<< * * cdef int nUniqueHaplotypes = len(allUniqueHaplotypes) */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__ploidy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = ((PyObject *)__pyx_f_9cgenotype_generateAllGenotypesFromHaplotypeList(__pyx_t_18, __pyx_v_allUniqueHaplotypes)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_allGenotypes = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":121 * cdef list allGenotypes = generateAllGenotypesFromHaplotypeList(options.ploidy, allUniqueHaplotypes) * * cdef int nUniqueHaplotypes = len(allUniqueHaplotypes) # <<<<<<<<<<<<<< * * if nUniqueHaplotypes <= 1: */ if (unlikely(((PyObject *)__pyx_v_allUniqueHaplotypes) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_allUniqueHaplotypes)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nUniqueHaplotypes = __pyx_t_7; /* "variantcaller.pyx":123 * cdef int nUniqueHaplotypes = len(allUniqueHaplotypes) * * if nUniqueHaplotypes <= 1: # <<<<<<<<<<<<<< * * # This occurs if we found mutation candidates, but the sequences of the mutated haplotypes are all the same as the */ __pyx_t_9 = (__pyx_v_nUniqueHaplotypes <= 1); if (__pyx_t_9) { /* "variantcaller.pyx":127 * # This occurs if we found mutation candidates, but the sequences of the mutated haplotypes are all the same as the * # reference. * if not options.outputRefCalls: # <<<<<<<<<<<<<< * * #logger.debug("No non-ref haplotypes to check in window %s. All var haps = %s. all Unique haps = %s" %(window, allVarHaplotypes, allUniqueHaplotypes)) */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__outputRefCalls); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (!__pyx_t_9); if (__pyx_t_8) { /* "variantcaller.pyx":136 * # logger.debug(hap.haplotypeSequence) * * return # <<<<<<<<<<<<<< * * pop.setup(variants, allUniqueHaplotypes, allGenotypes, options.nInd, options.ploidy, options.verbosity, readBuffers) */ goto __pyx_L0; goto __pyx_L11; } __pyx_L11:; goto __pyx_L10; } __pyx_L10:; /* "variantcaller.pyx":138 * return * * pop.setup(variants, allUniqueHaplotypes, allGenotypes, options.nInd, options.ploidy, options.verbosity, readBuffers) # <<<<<<<<<<<<<< * pop.call(options.maxEMIterations, 1) * */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__nInd); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__ploidy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_17 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; ((struct __pyx_vtabstruct_11cpopulation_Population *)__pyx_v_pop->__pyx_vtab)->setup(__pyx_v_pop, __pyx_v_variants, __pyx_v_allUniqueHaplotypes, __pyx_v_allGenotypes, __pyx_t_18, __pyx_t_17, __pyx_t_16, __pyx_v_readBuffers); /* "variantcaller.pyx":139 * * pop.setup(variants, allUniqueHaplotypes, allGenotypes, options.nInd, options.ploidy, options.verbosity, readBuffers) * pop.call(options.maxEMIterations, 1) # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__maxEMIterations); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; ((struct __pyx_vtabstruct_11cpopulation_Population *)__pyx_v_pop->__pyx_vtab)->call(__pyx_v_pop, __pyx_t_16, 1); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("variantcaller.callVariantsInWindow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_theReadBuffer); __Pyx_XDECREF(__pyx_v_chrom); __Pyx_XDECREF(__pyx_v_variants); __Pyx_XDECREF((PyObject *)__pyx_v_refHaplotype); __Pyx_XDECREF(__pyx_v_allVarHaplotypes); __Pyx_XDECREF(__pyx_v_allUniqueHaplotypes); __Pyx_XDECREF(__pyx_v_allGenotypes); __Pyx_RefNannyFinishContext(); } /* "variantcaller.pyx":143 * ################################################################################################### * * cdef int countTotalReadsInRegion(list readBuffers, int* totalBufferSize, int* totalSeqQualSize): # <<<<<<<<<<<<<< * """ * Count and return the total number of reads (good, bad, broken) */ static int __pyx_f_13variantcaller_countTotalReadsInRegion(PyObject *__pyx_v_readBuffers, int *__pyx_v_totalBufferSize, int *__pyx_v_totalSeqQualSize) { int __pyx_v_totalReads; struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_theReadBuffer = 0; int __pyx_v_thisBufferSize; int __pyx_v_i; int __pyx_v_cigarSize; int __pyx_v_seqQualSize; int __pyx_v_readSize; int __pyx_v_pointerSize; PyObject *__pyx_v_thisBadBufferSize = NULL; int __pyx_v_totalSize; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; long __pyx_t_4; int __pyx_t_5; int __pyx_t_6; long __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("countTotalReadsInRegion", 0); /* "variantcaller.pyx":148 * loaded into the read buffers. * """ * cdef int totalReads = 0 # <<<<<<<<<<<<<< * cdef bamReadBuffer theReadBuffer * cdef int thisBufferSize = 0 */ __pyx_v_totalReads = 0; /* "variantcaller.pyx":150 * cdef int totalReads = 0 * cdef bamReadBuffer theReadBuffer * cdef int thisBufferSize = 0 # <<<<<<<<<<<<<< * cdef int i = 0 * cdef int cigarSize = 0 */ __pyx_v_thisBufferSize = 0; /* "variantcaller.pyx":151 * cdef bamReadBuffer theReadBuffer * cdef int thisBufferSize = 0 * cdef int i = 0 # <<<<<<<<<<<<<< * cdef int cigarSize = 0 * cdef int seqQualSize = 0 */ __pyx_v_i = 0; /* "variantcaller.pyx":152 * cdef int thisBufferSize = 0 * cdef int i = 0 * cdef int cigarSize = 0 # <<<<<<<<<<<<<< * cdef int seqQualSize = 0 * cdef int readSize = 0 */ __pyx_v_cigarSize = 0; /* "variantcaller.pyx":153 * cdef int i = 0 * cdef int cigarSize = 0 * cdef int seqQualSize = 0 # <<<<<<<<<<<<<< * cdef int readSize = 0 * cdef int pointerSize = 0 */ __pyx_v_seqQualSize = 0; /* "variantcaller.pyx":154 * cdef int cigarSize = 0 * cdef int seqQualSize = 0 * cdef int readSize = 0 # <<<<<<<<<<<<<< * cdef int pointerSize = 0 * */ __pyx_v_readSize = 0; /* "variantcaller.pyx":155 * cdef int seqQualSize = 0 * cdef int readSize = 0 * cdef int pointerSize = 0 # <<<<<<<<<<<<<< * * for theReadBuffer in readBuffers: */ __pyx_v_pointerSize = 0; /* "variantcaller.pyx":157 * cdef int pointerSize = 0 * * for theReadBuffer in readBuffers: # <<<<<<<<<<<<<< * thisBufferSize = theReadBuffer.reads.getSize() * thisBadBufferSize = theReadBuffer.badReads.getSize() */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_readBuffers); __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 = 157; __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 = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theReadBuffer)); __pyx_v_theReadBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_3); __pyx_t_3 = 0; /* "variantcaller.pyx":158 * * for theReadBuffer in readBuffers: * thisBufferSize = theReadBuffer.reads.getSize() # <<<<<<<<<<<<<< * thisBadBufferSize = theReadBuffer.badReads.getSize() * totalReads += (theReadBuffer.reads.getSize()) */ __pyx_v_thisBufferSize = ((struct __pyx_vtabstruct_7cwindow_ReadArray *)__pyx_v_theReadBuffer->reads->__pyx_vtab)->getSize(__pyx_v_theReadBuffer->reads); /* "variantcaller.pyx":159 * for theReadBuffer in readBuffers: * thisBufferSize = theReadBuffer.reads.getSize() * thisBadBufferSize = theReadBuffer.badReads.getSize() # <<<<<<<<<<<<<< * totalReads += (theReadBuffer.reads.getSize()) * totalReads += (theReadBuffer.badReads.getSize()) */ __pyx_t_3 = PyInt_FromLong(((struct __pyx_vtabstruct_7cwindow_ReadArray *)__pyx_v_theReadBuffer->badReads->__pyx_vtab)->getSize(__pyx_v_theReadBuffer->badReads)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_v_thisBadBufferSize); __pyx_v_thisBadBufferSize = __pyx_t_3; __pyx_t_3 = 0; /* "variantcaller.pyx":160 * thisBufferSize = theReadBuffer.reads.getSize() * thisBadBufferSize = theReadBuffer.badReads.getSize() * totalReads += (theReadBuffer.reads.getSize()) # <<<<<<<<<<<<<< * totalReads += (theReadBuffer.badReads.getSize()) * totalReads += (theReadBuffer.brokenMates.getSize()) */ __pyx_v_totalReads = (__pyx_v_totalReads + ((struct __pyx_vtabstruct_7cwindow_ReadArray *)__pyx_v_theReadBuffer->reads->__pyx_vtab)->getSize(__pyx_v_theReadBuffer->reads)); /* "variantcaller.pyx":161 * thisBadBufferSize = theReadBuffer.badReads.getSize() * totalReads += (theReadBuffer.reads.getSize()) * totalReads += (theReadBuffer.badReads.getSize()) # <<<<<<<<<<<<<< * totalReads += (theReadBuffer.brokenMates.getSize()) * totalBufferSize[0] += (theReadBuffer.reads.__capacity) */ __pyx_v_totalReads = (__pyx_v_totalReads + ((struct __pyx_vtabstruct_7cwindow_ReadArray *)__pyx_v_theReadBuffer->badReads->__pyx_vtab)->getSize(__pyx_v_theReadBuffer->badReads)); /* "variantcaller.pyx":162 * totalReads += (theReadBuffer.reads.getSize()) * totalReads += (theReadBuffer.badReads.getSize()) * totalReads += (theReadBuffer.brokenMates.getSize()) # <<<<<<<<<<<<<< * totalBufferSize[0] += (theReadBuffer.reads.__capacity) * totalBufferSize[0] += (theReadBuffer.badReads.__capacity) */ __pyx_v_totalReads = (__pyx_v_totalReads + ((struct __pyx_vtabstruct_7cwindow_ReadArray *)__pyx_v_theReadBuffer->brokenMates->__pyx_vtab)->getSize(__pyx_v_theReadBuffer->brokenMates)); /* "variantcaller.pyx":163 * totalReads += (theReadBuffer.badReads.getSize()) * totalReads += (theReadBuffer.brokenMates.getSize()) * totalBufferSize[0] += (theReadBuffer.reads.__capacity) # <<<<<<<<<<<<<< * totalBufferSize[0] += (theReadBuffer.badReads.__capacity) * totalBufferSize[0] += (theReadBuffer.brokenMates.__capacity) */ __pyx_t_4 = 0; (__pyx_v_totalBufferSize[__pyx_t_4]) = ((__pyx_v_totalBufferSize[__pyx_t_4]) + __pyx_v_theReadBuffer->reads->__pyx___capacity); /* "variantcaller.pyx":164 * totalReads += (theReadBuffer.brokenMates.getSize()) * totalBufferSize[0] += (theReadBuffer.reads.__capacity) * totalBufferSize[0] += (theReadBuffer.badReads.__capacity) # <<<<<<<<<<<<<< * totalBufferSize[0] += (theReadBuffer.brokenMates.__capacity) * */ __pyx_t_4 = 0; (__pyx_v_totalBufferSize[__pyx_t_4]) = ((__pyx_v_totalBufferSize[__pyx_t_4]) + __pyx_v_theReadBuffer->badReads->__pyx___capacity); /* "variantcaller.pyx":165 * totalBufferSize[0] += (theReadBuffer.reads.__capacity) * totalBufferSize[0] += (theReadBuffer.badReads.__capacity) * totalBufferSize[0] += (theReadBuffer.brokenMates.__capacity) # <<<<<<<<<<<<<< * * for i in range(thisBufferSize): */ __pyx_t_4 = 0; (__pyx_v_totalBufferSize[__pyx_t_4]) = ((__pyx_v_totalBufferSize[__pyx_t_4]) + __pyx_v_theReadBuffer->brokenMates->__pyx___capacity); /* "variantcaller.pyx":167 * totalBufferSize[0] += (theReadBuffer.brokenMates.__capacity) * * for i in range(thisBufferSize): # <<<<<<<<<<<<<< * totalSeqQualSize[0] += (strlen(theReadBuffer.reads.array[i].seq) + 1) * totalSeqQualSize[0] += (strlen(theReadBuffer.reads.array[i].qual) + 1) */ __pyx_t_5 = __pyx_v_thisBufferSize; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "variantcaller.pyx":168 * * for i in range(thisBufferSize): * totalSeqQualSize[0] += (strlen(theReadBuffer.reads.array[i].seq) + 1) # <<<<<<<<<<<<<< * totalSeqQualSize[0] += (strlen(theReadBuffer.reads.array[i].qual) + 1) * */ __pyx_t_4 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_4]) = ((__pyx_v_totalSeqQualSize[__pyx_t_4]) + (strlen((__pyx_v_theReadBuffer->reads->array[__pyx_v_i])->seq) + 1)); /* "variantcaller.pyx":169 * for i in range(thisBufferSize): * totalSeqQualSize[0] += (strlen(theReadBuffer.reads.array[i].seq) + 1) * totalSeqQualSize[0] += (strlen(theReadBuffer.reads.array[i].qual) + 1) # <<<<<<<<<<<<<< * * totalSeqQualSize[0] += 2*theReadBuffer.reads.array[i].cigarLen */ __pyx_t_4 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_4]) = ((__pyx_v_totalSeqQualSize[__pyx_t_4]) + (strlen((__pyx_v_theReadBuffer->reads->array[__pyx_v_i])->qual) + 1)); /* "variantcaller.pyx":171 * totalSeqQualSize[0] += (strlen(theReadBuffer.reads.array[i].qual) + 1) * * totalSeqQualSize[0] += 2*theReadBuffer.reads.array[i].cigarLen # <<<<<<<<<<<<<< * * seqQualSize += (strlen(theReadBuffer.reads.array[i].seq) + 1) */ __pyx_t_4 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_4]) = ((__pyx_v_totalSeqQualSize[__pyx_t_4]) + (2 * (__pyx_v_theReadBuffer->reads->array[__pyx_v_i])->cigarLen)); /* "variantcaller.pyx":173 * totalSeqQualSize[0] += 2*theReadBuffer.reads.array[i].cigarLen * * seqQualSize += (strlen(theReadBuffer.reads.array[i].seq) + 1) # <<<<<<<<<<<<<< * seqQualSize += (strlen(theReadBuffer.reads.array[i].qual) + 1) * */ __pyx_v_seqQualSize = (__pyx_v_seqQualSize + (strlen((__pyx_v_theReadBuffer->reads->array[__pyx_v_i])->seq) + 1)); /* "variantcaller.pyx":174 * * seqQualSize += (strlen(theReadBuffer.reads.array[i].seq) + 1) * seqQualSize += (strlen(theReadBuffer.reads.array[i].qual) + 1) # <<<<<<<<<<<<<< * * cigarSize += 2*theReadBuffer.reads.array[i].cigarLen*sizeof(theReadBuffer.reads.array[0].cigarOps[0]) */ __pyx_v_seqQualSize = (__pyx_v_seqQualSize + (strlen((__pyx_v_theReadBuffer->reads->array[__pyx_v_i])->qual) + 1)); /* "variantcaller.pyx":176 * seqQualSize += (strlen(theReadBuffer.reads.array[i].qual) + 1) * * cigarSize += 2*theReadBuffer.reads.array[i].cigarLen*sizeof(theReadBuffer.reads.array[0].cigarOps[0]) # <<<<<<<<<<<<<< * * for i in range(thisBadBufferSize): */ __pyx_v_cigarSize = (__pyx_v_cigarSize + ((2 * (__pyx_v_theReadBuffer->reads->array[__pyx_v_i])->cigarLen) * (sizeof(((__pyx_v_theReadBuffer->reads->array[0])->cigarOps[0]))))); } /* "variantcaller.pyx":178 * cigarSize += 2*theReadBuffer.reads.array[i].cigarLen*sizeof(theReadBuffer.reads.array[0].cigarOps[0]) * * for i in range(thisBadBufferSize): # <<<<<<<<<<<<<< * totalSeqQualSize[0] += (strlen(theReadBuffer.badReads.array[i].seq) + 1) * totalSeqQualSize[0] += (strlen(theReadBuffer.badReads.array[i].qual) + 1) */ __pyx_t_4 = __Pyx_PyInt_AsLong(__pyx_v_thisBadBufferSize); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "variantcaller.pyx":179 * * for i in range(thisBadBufferSize): * totalSeqQualSize[0] += (strlen(theReadBuffer.badReads.array[i].seq) + 1) # <<<<<<<<<<<<<< * totalSeqQualSize[0] += (strlen(theReadBuffer.badReads.array[i].qual) + 1) * */ __pyx_t_7 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_7]) = ((__pyx_v_totalSeqQualSize[__pyx_t_7]) + (strlen((__pyx_v_theReadBuffer->badReads->array[__pyx_v_i])->seq) + 1)); /* "variantcaller.pyx":180 * for i in range(thisBadBufferSize): * totalSeqQualSize[0] += (strlen(theReadBuffer.badReads.array[i].seq) + 1) * totalSeqQualSize[0] += (strlen(theReadBuffer.badReads.array[i].qual) + 1) # <<<<<<<<<<<<<< * * totalSeqQualSize[0] += 2*theReadBuffer.badReads.array[i].cigarLen */ __pyx_t_7 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_7]) = ((__pyx_v_totalSeqQualSize[__pyx_t_7]) + (strlen((__pyx_v_theReadBuffer->badReads->array[__pyx_v_i])->qual) + 1)); /* "variantcaller.pyx":182 * totalSeqQualSize[0] += (strlen(theReadBuffer.badReads.array[i].qual) + 1) * * totalSeqQualSize[0] += 2*theReadBuffer.badReads.array[i].cigarLen # <<<<<<<<<<<<<< * * seqQualSize += (strlen(theReadBuffer.badReads.array[i].seq) + 1) */ __pyx_t_7 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_7]) = ((__pyx_v_totalSeqQualSize[__pyx_t_7]) + (2 * (__pyx_v_theReadBuffer->badReads->array[__pyx_v_i])->cigarLen)); /* "variantcaller.pyx":184 * totalSeqQualSize[0] += 2*theReadBuffer.badReads.array[i].cigarLen * * seqQualSize += (strlen(theReadBuffer.badReads.array[i].seq) + 1) # <<<<<<<<<<<<<< * seqQualSize += (strlen(theReadBuffer.badReads.array[i].qual) + 1) * */ __pyx_v_seqQualSize = (__pyx_v_seqQualSize + (strlen((__pyx_v_theReadBuffer->badReads->array[__pyx_v_i])->seq) + 1)); /* "variantcaller.pyx":185 * * seqQualSize += (strlen(theReadBuffer.badReads.array[i].seq) + 1) * seqQualSize += (strlen(theReadBuffer.badReads.array[i].qual) + 1) # <<<<<<<<<<<<<< * * cigarSize += 2*theReadBuffer.badReads.array[i].cigarLen*sizeof(theReadBuffer.reads.array[0].cigarOps[0]) */ __pyx_v_seqQualSize = (__pyx_v_seqQualSize + (strlen((__pyx_v_theReadBuffer->badReads->array[__pyx_v_i])->qual) + 1)); /* "variantcaller.pyx":187 * seqQualSize += (strlen(theReadBuffer.badReads.array[i].qual) + 1) * * cigarSize += 2*theReadBuffer.badReads.array[i].cigarLen*sizeof(theReadBuffer.reads.array[0].cigarOps[0]) # <<<<<<<<<<<<<< * * # Size of reads */ __pyx_v_cigarSize = (__pyx_v_cigarSize + ((2 * (__pyx_v_theReadBuffer->badReads->array[__pyx_v_i])->cigarLen) * (sizeof(((__pyx_v_theReadBuffer->reads->array[0])->cigarOps[0]))))); } /* "variantcaller.pyx":190 * * # Size of reads * totalSeqQualSize[0] += sizeof(theReadBuffer.reads.array[0][0])*thisBufferSize # <<<<<<<<<<<<<< * totalSeqQualSize[0] += sizeof(theReadBuffer.badReads.array[0][0])*thisBadBufferSize * */ __pyx_t_4 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_4]) = ((__pyx_v_totalSeqQualSize[__pyx_t_4]) + ((sizeof(((__pyx_v_theReadBuffer->reads->array[0])[0]))) * __pyx_v_thisBufferSize)); /* "variantcaller.pyx":191 * # Size of reads * totalSeqQualSize[0] += sizeof(theReadBuffer.reads.array[0][0])*thisBufferSize * totalSeqQualSize[0] += sizeof(theReadBuffer.badReads.array[0][0])*thisBadBufferSize # <<<<<<<<<<<<<< * * readSize += sizeof(theReadBuffer.reads.array[0][0])*thisBufferSize */ __pyx_t_4 = 0; __pyx_t_3 = PyInt_FromLong((__pyx_v_totalSeqQualSize[__pyx_t_4])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_FromSize_t((sizeof(((__pyx_v_theReadBuffer->badReads->array[0])[0])))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyNumber_Multiply(__pyx_t_8, __pyx_v_thisBadBufferSize); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_4]) = __pyx_t_5; /* "variantcaller.pyx":193 * totalSeqQualSize[0] += sizeof(theReadBuffer.badReads.array[0][0])*thisBadBufferSize * * readSize += sizeof(theReadBuffer.reads.array[0][0])*thisBufferSize # <<<<<<<<<<<<<< * readSize += sizeof(theReadBuffer.badReads.array[0][0])*thisBadBufferSize * */ __pyx_v_readSize = (__pyx_v_readSize + ((sizeof(((__pyx_v_theReadBuffer->reads->array[0])[0]))) * __pyx_v_thisBufferSize)); /* "variantcaller.pyx":194 * * readSize += sizeof(theReadBuffer.reads.array[0][0])*thisBufferSize * readSize += sizeof(theReadBuffer.badReads.array[0][0])*thisBadBufferSize # <<<<<<<<<<<<<< * * # Size of pointers to reads */ __pyx_t_8 = PyInt_FromLong(__pyx_v_readSize); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyInt_FromSize_t((sizeof(((__pyx_v_theReadBuffer->badReads->array[0])[0])))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyNumber_Multiply(__pyx_t_9, __pyx_v_thisBadBufferSize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_readSize = __pyx_t_5; /* "variantcaller.pyx":197 * * # Size of pointers to reads * totalSeqQualSize[0] += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.reads.__capacity # <<<<<<<<<<<<<< * totalSeqQualSize[0] += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.badReads.__capacity * */ __pyx_t_4 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_4]) = ((__pyx_v_totalSeqQualSize[__pyx_t_4]) + ((sizeof((__pyx_v_theReadBuffer->reads->array[0]))) * __pyx_v_theReadBuffer->reads->__pyx___capacity)); /* "variantcaller.pyx":198 * # Size of pointers to reads * totalSeqQualSize[0] += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.reads.__capacity * totalSeqQualSize[0] += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.badReads.__capacity # <<<<<<<<<<<<<< * * pointerSize += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.reads.__capacity */ __pyx_t_4 = 0; (__pyx_v_totalSeqQualSize[__pyx_t_4]) = ((__pyx_v_totalSeqQualSize[__pyx_t_4]) + ((sizeof((__pyx_v_theReadBuffer->reads->array[0]))) * __pyx_v_theReadBuffer->badReads->__pyx___capacity)); /* "variantcaller.pyx":200 * totalSeqQualSize[0] += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.badReads.__capacity * * pointerSize += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.reads.__capacity # <<<<<<<<<<<<<< * pointerSize += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.badReads.__capacity * */ __pyx_v_pointerSize = (__pyx_v_pointerSize + ((sizeof((__pyx_v_theReadBuffer->reads->array[0]))) * __pyx_v_theReadBuffer->reads->__pyx___capacity)); /* "variantcaller.pyx":201 * * pointerSize += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.reads.__capacity * pointerSize += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.badReads.__capacity # <<<<<<<<<<<<<< * * cdef int totalSize = seqQualSize + cigarSize + readSize + pointerSize */ __pyx_v_pointerSize = (__pyx_v_pointerSize + ((sizeof((__pyx_v_theReadBuffer->reads->array[0]))) * __pyx_v_theReadBuffer->badReads->__pyx___capacity)); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":203 * pointerSize += sizeof(theReadBuffer.reads.array[0])*theReadBuffer.badReads.__capacity * * cdef int totalSize = seqQualSize + cigarSize + readSize + pointerSize # <<<<<<<<<<<<<< * logger.debug("Sizes: SeqQual = %s. cigar = %s. read = %s. pointers = %s. Total = %s" %(seqQualSize, cigarSize, readSize, pointerSize, totalSize)) * */ __pyx_v_totalSize = (((__pyx_v_seqQualSize + __pyx_v_cigarSize) + __pyx_v_readSize) + __pyx_v_pointerSize); /* "variantcaller.pyx":204 * * cdef int totalSize = seqQualSize + cigarSize + readSize + pointerSize * logger.debug("Sizes: SeqQual = %s. cigar = %s. read = %s. pointers = %s. Total = %s" %(seqQualSize, cigarSize, readSize, pointerSize, totalSize)) # <<<<<<<<<<<<<< * * return totalReads */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__debug); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong(__pyx_v_seqQualSize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyInt_FromLong(__pyx_v_cigarSize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyInt_FromLong(__pyx_v_readSize); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyInt_FromLong(__pyx_v_pointerSize); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyInt_FromLong(__pyx_v_totalSize); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_8 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); __Pyx_DECREF(((PyObject *)__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 = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_t_11)); __Pyx_GIVEREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "variantcaller.pyx":206 * logger.debug("Sizes: SeqQual = %s. cigar = %s. read = %s. pointers = %s. Total = %s" %(seqQualSize, cigarSize, readSize, pointerSize, totalSize)) * * return totalReads # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = __pyx_v_totalReads; 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_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_WriteUnraisable("variantcaller.countTotalReadsInRegion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_theReadBuffer); __Pyx_XDECREF(__pyx_v_thisBadBufferSize); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":210 * ################################################################################################### * * cdef int doWeNeedToAssembleThisRegion(list readBuffers, bytes chrom, int start, int end, options, char* refSeq): # <<<<<<<<<<<<<< * """ * Scan through the specified region, and report whether or not we need to run the assember to */ static int __pyx_f_13variantcaller_doWeNeedToAssembleThisRegion(PyObject *__pyx_v_readBuffers, PyObject *__pyx_v_chrom, int __pyx_v_start, int __pyx_v_end, PyObject *__pyx_v_options, char *__pyx_v_refSeq) { double __pyx_v_totalReads; double __pyx_v_readsThisSample; double __pyx_v_badReadsThisSample; CYTHON_UNUSED double __pyx_v_totalMismatches; double __pyx_v_totalAlignmentGaps; double __pyx_v_nImproperReads; int __pyx_v_qualBinSize; struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_theReadBuffer = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; 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("doWeNeedToAssembleThisRegion", 0); /* "variantcaller.pyx":216 * mapping qualities, numbers of mis-alignments/mismatches etc. * """ * cdef double totalReads = 0.0 # <<<<<<<<<<<<<< * cdef double readsThisSample = 0.0 * cdef double badReadsThisSample = 0.0 */ __pyx_v_totalReads = 0.0; /* "variantcaller.pyx":217 * """ * cdef double totalReads = 0.0 * cdef double readsThisSample = 0.0 # <<<<<<<<<<<<<< * cdef double badReadsThisSample = 0.0 * cdef double totalMismatches = 0.0 */ __pyx_v_readsThisSample = 0.0; /* "variantcaller.pyx":218 * cdef double totalReads = 0.0 * cdef double readsThisSample = 0.0 * cdef double badReadsThisSample = 0.0 # <<<<<<<<<<<<<< * cdef double totalMismatches = 0.0 * cdef double totalAlignmentGaps = 0.0 */ __pyx_v_badReadsThisSample = 0.0; /* "variantcaller.pyx":219 * cdef double readsThisSample = 0.0 * cdef double badReadsThisSample = 0.0 * cdef double totalMismatches = 0.0 # <<<<<<<<<<<<<< * cdef double totalAlignmentGaps = 0.0 * cdef double nImproperReads = 0.0 */ __pyx_v_totalMismatches = 0.0; /* "variantcaller.pyx":220 * cdef double badReadsThisSample = 0.0 * cdef double totalMismatches = 0.0 * cdef double totalAlignmentGaps = 0.0 # <<<<<<<<<<<<<< * cdef double nImproperReads = 0.0 * cdef int qualBinSize = options.qualBinSize */ __pyx_v_totalAlignmentGaps = 0.0; /* "variantcaller.pyx":221 * cdef double totalMismatches = 0.0 * cdef double totalAlignmentGaps = 0.0 * cdef double nImproperReads = 0.0 # <<<<<<<<<<<<<< * cdef int qualBinSize = options.qualBinSize * */ __pyx_v_nImproperReads = 0.0; /* "variantcaller.pyx":222 * cdef double totalAlignmentGaps = 0.0 * cdef double nImproperReads = 0.0 * cdef int qualBinSize = options.qualBinSize # <<<<<<<<<<<<<< * * cdef bamReadBuffer theReadBuffer */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__qualBinSize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __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 = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_qualBinSize = __pyx_t_2; /* "variantcaller.pyx":226 * cdef bamReadBuffer theReadBuffer * * for theReadBuffer in readBuffers: # <<<<<<<<<<<<<< * theReadBuffer.setWindowPointers(start, end, start, end, refSeq, qualBinSize) * */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_readBuffers); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theReadBuffer)); __pyx_v_theReadBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":227 * * for theReadBuffer in readBuffers: * theReadBuffer.setWindowPointers(start, end, start, end, refSeq, qualBinSize) # <<<<<<<<<<<<<< * * if options.assembleAll: */ ((struct __pyx_vtabstruct_7cwindow_bamReadBuffer *)__pyx_v_theReadBuffer->__pyx_vtab)->setWindowPointers(__pyx_v_theReadBuffer, __pyx_v_start, __pyx_v_end, __pyx_v_start, __pyx_v_end, __pyx_v_refSeq, __pyx_v_qualBinSize); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":229 * theReadBuffer.setWindowPointers(start, end, start, end, refSeq, qualBinSize) * * if options.assembleAll: # <<<<<<<<<<<<<< * return True * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__assembleAll); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":230 * * if options.assembleAll: * return True # <<<<<<<<<<<<<< * * # Check all samples, but as soon as we see one which triggers the assembly we */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L5; } __pyx_L5:; /* "variantcaller.pyx":234 * # Check all samples, but as soon as we see one which triggers the assembly we * # return, so we assemble everything is even one of the samples triggers. * for theReadBuffer in readBuffers: # <<<<<<<<<<<<<< * * totalReads += (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_readBuffers); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theReadBuffer)); __pyx_v_theReadBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":236 * for theReadBuffer in readBuffers: * * totalReads += (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) # <<<<<<<<<<<<<< * readsThisSample = (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) * badReadsThisSample = (theReadBuffer.badReads.windowEnd - theReadBuffer.badReads.windowStart) */ __pyx_v_totalReads = (__pyx_v_totalReads + (__pyx_v_theReadBuffer->reads->windowEnd - __pyx_v_theReadBuffer->reads->windowStart)); /* "variantcaller.pyx":237 * * totalReads += (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) * readsThisSample = (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) # <<<<<<<<<<<<<< * badReadsThisSample = (theReadBuffer.badReads.windowEnd - theReadBuffer.badReads.windowStart) * */ __pyx_v_readsThisSample = (__pyx_v_theReadBuffer->reads->windowEnd - __pyx_v_theReadBuffer->reads->windowStart); /* "variantcaller.pyx":238 * totalReads += (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) * readsThisSample = (theReadBuffer.reads.windowEnd - theReadBuffer.reads.windowStart) * badReadsThisSample = (theReadBuffer.badReads.windowEnd - theReadBuffer.badReads.windowStart) # <<<<<<<<<<<<<< * * if readsThisSample == 0: */ __pyx_v_badReadsThisSample = (__pyx_v_theReadBuffer->badReads->windowEnd - __pyx_v_theReadBuffer->badReads->windowStart); /* "variantcaller.pyx":240 * badReadsThisSample = (theReadBuffer.badReads.windowEnd - theReadBuffer.badReads.windowStart) * * if readsThisSample == 0: # <<<<<<<<<<<<<< * continue * */ __pyx_t_5 = (__pyx_v_readsThisSample == 0.0); if (__pyx_t_5) { /* "variantcaller.pyx":241 * * if readsThisSample == 0: * continue # <<<<<<<<<<<<<< * * totalAlignmentGaps = theReadBuffer.countAlignmentGaps() */ goto __pyx_L6_continue; goto __pyx_L8; } __pyx_L8:; /* "variantcaller.pyx":243 * continue * * totalAlignmentGaps = theReadBuffer.countAlignmentGaps() # <<<<<<<<<<<<<< * nImproperReads = theReadBuffer.countImproperPairs() * */ __pyx_v_totalAlignmentGaps = ((struct __pyx_vtabstruct_7cwindow_bamReadBuffer *)__pyx_v_theReadBuffer->__pyx_vtab)->countAlignmentGaps(__pyx_v_theReadBuffer); /* "variantcaller.pyx":244 * * totalAlignmentGaps = theReadBuffer.countAlignmentGaps() * nImproperReads = theReadBuffer.countImproperPairs() # <<<<<<<<<<<<<< * * if totalAlignmentGaps / readsThisSample > 2: */ __pyx_v_nImproperReads = ((struct __pyx_vtabstruct_7cwindow_bamReadBuffer *)__pyx_v_theReadBuffer->__pyx_vtab)->countImproperPairs(__pyx_v_theReadBuffer); /* "variantcaller.pyx":246 * nImproperReads = theReadBuffer.countImproperPairs() * * if totalAlignmentGaps / readsThisSample > 2: # <<<<<<<<<<<<<< * logger.info("Need to assemble %s:%s-%s. nReads = %s. nGaps = %s. n per read = %s" %(chrom, start, end, readsThisSample, totalAlignmentGaps, totalAlignmentGaps/readsThisSample)) * return 1 */ __pyx_t_5 = ((__pyx_v_totalAlignmentGaps / __pyx_v_readsThisSample) > 2.0); if (__pyx_t_5) { /* "variantcaller.pyx":247 * * if totalAlignmentGaps / readsThisSample > 2: * logger.info("Need to assemble %s:%s-%s. nReads = %s. nGaps = %s. n per read = %s" %(chrom, start, end, readsThisSample, totalAlignmentGaps, totalAlignmentGaps/readsThisSample)) # <<<<<<<<<<<<<< * return 1 * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_readsThisSample); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_totalAlignmentGaps); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyFloat_FromDouble((__pyx_v_totalAlignmentGaps / __pyx_v_readsThisSample)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __Pyx_DECREF(((PyObject *)__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 = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_10)); __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "variantcaller.pyx":248 * if totalAlignmentGaps / readsThisSample > 2: * logger.info("Need to assemble %s:%s-%s. nReads = %s. nGaps = %s. n per read = %s" %(chrom, start, end, readsThisSample, totalAlignmentGaps, totalAlignmentGaps/readsThisSample)) * return 1 # <<<<<<<<<<<<<< * * if nImproperReads / (readsThisSample + badReadsThisSample) > 0.1: */ __pyx_r = 1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L9; } __pyx_L9:; /* "variantcaller.pyx":250 * return 1 * * if nImproperReads / (readsThisSample + badReadsThisSample) > 0.1: # <<<<<<<<<<<<<< * logger.info("Need to assemble %s:%s-%s. nReads = %s. nImproper = %s. fraction = %s" %(chrom, start, end, readsThisSample, nImproperReads, nImproperReads/(readsThisSample+badReadsThisSample))) * return 1 */ __pyx_t_5 = ((__pyx_v_nImproperReads / (__pyx_v_readsThisSample + __pyx_v_badReadsThisSample)) > 0.1); if (__pyx_t_5) { /* "variantcaller.pyx":251 * * if nImproperReads / (readsThisSample + badReadsThisSample) > 0.1: * logger.info("Need to assemble %s:%s-%s. nReads = %s. nImproper = %s. fraction = %s" %(chrom, start, end, readsThisSample, nImproperReads, nImproperReads/(readsThisSample+badReadsThisSample))) # <<<<<<<<<<<<<< * return 1 * */ __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__info); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_readsThisSample); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_nImproperReads); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyFloat_FromDouble((__pyx_v_nImproperReads / (__pyx_v_readsThisSample + __pyx_v_badReadsThisSample))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_10 = 0; __pyx_t_6 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":252 * if nImproperReads / (readsThisSample + badReadsThisSample) > 0.1: * logger.info("Need to assemble %s:%s-%s. nReads = %s. nImproper = %s. fraction = %s" %(chrom, start, end, readsThisSample, nImproperReads, nImproperReads/(readsThisSample+badReadsThisSample))) * return 1 # <<<<<<<<<<<<<< * * # No signal for assembly */ __pyx_r = 1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L10; } __pyx_L10:; __pyx_L6_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":255 * * # No signal for assembly * return 0 # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = 0; 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_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_WriteUnraisable("variantcaller.doWeNeedToAssembleThisRegion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_theReadBuffer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":259 * ################################################################################################### * * cdef list mergeHaplotypes(list haplotypes, FastaFile refFile): # <<<<<<<<<<<<<< * """ * Merge haplotypes by sequence. If we see 2 identical haplotypes, then take the one with */ static PyObject *__pyx_f_13variantcaller_mergeHaplotypes(PyObject *__pyx_v_haplotypes, struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile) { PyObject *__pyx_v_sortedHaps = 0; PyObject *__pyx_v_mergedHaplotypes = 0; struct __pyx_obj_10chaplotype_Haplotype *__pyx_v_hap = 0; struct __pyx_obj_10chaplotype_Haplotype *__pyx_v_lastHap = 0; double __pyx_v_priorOne; double __pyx_v_priorTwo; struct __pyx_obj_7variant_Variant *__pyx_v_theVar = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mergeHaplotypes", 0); /* "variantcaller.pyx":265 * possible. * """ * cdef list sortedHaps = sorted(haplotypes) # <<<<<<<<<<<<<< * cdef list mergedHaplotypes = [] * */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_haplotypes)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_haplotypes)); __Pyx_GIVEREF(((PyObject *)__pyx_v_haplotypes)); __pyx_t_2 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sortedHaps = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "variantcaller.pyx":266 * """ * cdef list sortedHaps = sorted(haplotypes) * cdef list mergedHaplotypes = [] # <<<<<<<<<<<<<< * * cdef Haplotype hap = None */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_mergedHaplotypes = __pyx_t_2; __pyx_t_2 = 0; /* "variantcaller.pyx":268 * cdef list mergedHaplotypes = [] * * cdef Haplotype hap = None # <<<<<<<<<<<<<< * cdef Haplotype lastHap = None * */ __Pyx_INCREF(Py_None); __pyx_v_hap = ((struct __pyx_obj_10chaplotype_Haplotype *)Py_None); /* "variantcaller.pyx":269 * * cdef Haplotype hap = None * cdef Haplotype lastHap = None # <<<<<<<<<<<<<< * * cdef double priorOne = 1.0 */ __Pyx_INCREF(Py_None); __pyx_v_lastHap = ((struct __pyx_obj_10chaplotype_Haplotype *)Py_None); /* "variantcaller.pyx":271 * cdef Haplotype lastHap = None * * cdef double priorOne = 1.0 # <<<<<<<<<<<<<< * cdef double priorTwo = 1.0 * cdef Variant theVar */ __pyx_v_priorOne = 1.0; /* "variantcaller.pyx":272 * * cdef double priorOne = 1.0 * cdef double priorTwo = 1.0 # <<<<<<<<<<<<<< * cdef Variant theVar * */ __pyx_v_priorTwo = 1.0; /* "variantcaller.pyx":277 * #logger.debug("Printing un-merged haplotypes") * * for hap in sortedHaps: # <<<<<<<<<<<<<< * #logger.debug(hap) * */ if (unlikely(((PyObject *)__pyx_v_sortedHaps) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = ((PyObject *)__pyx_v_sortedHaps); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10chaplotype_Haplotype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_v_hap)); __pyx_v_hap = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":281 * * # Start. * if lastHap is None: # <<<<<<<<<<<<<< * lastHap = hap * */ __pyx_t_4 = (((PyObject *)__pyx_v_lastHap) == Py_None); if (__pyx_t_4) { /* "variantcaller.pyx":282 * # Start. * if lastHap is None: * lastHap = hap # <<<<<<<<<<<<<< * * # Same as last hap: take hap with least variants */ __Pyx_INCREF(((PyObject *)__pyx_v_hap)); __Pyx_DECREF(((PyObject *)__pyx_v_lastHap)); __pyx_v_lastHap = __pyx_v_hap; goto __pyx_L5; } /* "variantcaller.pyx":285 * * # Same as last hap: take hap with least variants * elif hap == lastHap: # <<<<<<<<<<<<<< * * # Take the haplotype with the set of variants */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_hap), ((PyObject *)__pyx_v_lastHap), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "variantcaller.pyx":289 * # Take the haplotype with the set of variants * # which have the lowest combined prior. * priorOne = 1.0 # <<<<<<<<<<<<<< * priorTwo = 1.0 * */ __pyx_v_priorOne = 1.0; /* "variantcaller.pyx":290 * # which have the lowest combined prior. * priorOne = 1.0 * priorTwo = 1.0 # <<<<<<<<<<<<<< * * for theVar in lastHap.variants: */ __pyx_v_priorTwo = 1.0; /* "variantcaller.pyx":292 * priorTwo = 1.0 * * for theVar in lastHap.variants: # <<<<<<<<<<<<<< * priorOne *= theVar.calculatePrior(refFile) * */ if (unlikely(((PyObject *)__pyx_v_lastHap->variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_lastHap->variants); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theVar)); __pyx_v_theVar = ((struct __pyx_obj_7variant_Variant *)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":293 * * for theVar in lastHap.variants: * priorOne *= theVar.calculatePrior(refFile) # <<<<<<<<<<<<<< * * for theVar in hap.variants: */ __pyx_v_priorOne = (__pyx_v_priorOne * ((struct __pyx_vtabstruct_7variant_Variant *)__pyx_v_theVar->__pyx_vtab)->calculatePrior(__pyx_v_theVar, __pyx_v_refFile)); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":295 * priorOne *= theVar.calculatePrior(refFile) * * for theVar in hap.variants: # <<<<<<<<<<<<<< * priorTwo *= theVar.calculatePrior(refFile) * */ if (unlikely(((PyObject *)__pyx_v_hap->variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_hap->variants); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theVar)); __pyx_v_theVar = ((struct __pyx_obj_7variant_Variant *)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":296 * * for theVar in hap.variants: * priorTwo *= theVar.calculatePrior(refFile) # <<<<<<<<<<<<<< * * # lastHap has better prior. Keep that one */ __pyx_v_priorTwo = (__pyx_v_priorTwo * ((struct __pyx_vtabstruct_7variant_Variant *)__pyx_v_theVar->__pyx_vtab)->calculatePrior(__pyx_v_theVar, __pyx_v_refFile)); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":299 * * # lastHap has better prior. Keep that one * if priorOne > priorTwo: # <<<<<<<<<<<<<< * pass * */ __pyx_t_4 = (__pyx_v_priorOne > __pyx_v_priorTwo); if (__pyx_t_4) { goto __pyx_L10; } /* "variantcaller.pyx":303 * * # hap has better prior. Keep that one * elif priorTwo > priorOne: # <<<<<<<<<<<<<< * lastHap = hap * */ __pyx_t_4 = (__pyx_v_priorTwo > __pyx_v_priorOne); if (__pyx_t_4) { /* "variantcaller.pyx":304 * # hap has better prior. Keep that one * elif priorTwo > priorOne: * lastHap = hap # <<<<<<<<<<<<<< * * # Priors are close or the same. Doesn't really matter */ __Pyx_INCREF(((PyObject *)__pyx_v_hap)); __Pyx_DECREF(((PyObject *)__pyx_v_lastHap)); __pyx_v_lastHap = __pyx_v_hap; goto __pyx_L10; } /*else*/ { } __pyx_L10:; goto __pyx_L5; } /*else*/ { /* "variantcaller.pyx":312 * # Add whichever hap we kept to merged list * else: * mergedHaplotypes.append(lastHap) # <<<<<<<<<<<<<< * lastHap = hap * */ __pyx_t_7 = PyList_Append(__pyx_v_mergedHaplotypes, ((PyObject *)__pyx_v_lastHap)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":313 * else: * mergedHaplotypes.append(lastHap) * lastHap = hap # <<<<<<<<<<<<<< * * if lastHap is not None: */ __Pyx_INCREF(((PyObject *)__pyx_v_hap)); __Pyx_DECREF(((PyObject *)__pyx_v_lastHap)); __pyx_v_lastHap = __pyx_v_hap; } __pyx_L5:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "variantcaller.pyx":315 * lastHap = hap * * if lastHap is not None: # <<<<<<<<<<<<<< * mergedHaplotypes.append(lastHap) * */ __pyx_t_4 = (((PyObject *)__pyx_v_lastHap) != Py_None); if (__pyx_t_4) { /* "variantcaller.pyx":316 * * if lastHap is not None: * mergedHaplotypes.append(lastHap) # <<<<<<<<<<<<<< * * #logger.debug("") */ __pyx_t_7 = PyList_Append(__pyx_v_mergedHaplotypes, ((PyObject *)__pyx_v_lastHap)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L11; } __pyx_L11:; /* "variantcaller.pyx":324 * #logger.debug("") * * return mergedHaplotypes # <<<<<<<<<<<<<< * * ################################################################################################### */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_mergedHaplotypes)); __pyx_r = __pyx_v_mergedHaplotypes; 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_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("variantcaller.mergeHaplotypes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sortedHaps); __Pyx_XDECREF(__pyx_v_mergedHaplotypes); __Pyx_XDECREF((PyObject *)__pyx_v_hap); __Pyx_XDECREF((PyObject *)__pyx_v_lastHap); __Pyx_XDECREF((PyObject *)__pyx_v_theVar); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":346 * ################################################################################################### * * cdef list generateVariantsInRegion(bytes chrom, int start, int end, bamFiles, FastaFile refFile, options, windowGenerator, outputFile, vcf, list readBuffers): # <<<<<<<<<<<<<< * """ * Generate a list of variants, based on BAM file data and any input VCFs, in the specified region, */ static PyObject *__pyx_f_13variantcaller_generateVariantsInRegion(PyObject *__pyx_v_chrom, int __pyx_v_start, int __pyx_v_end, CYTHON_UNUSED PyObject *__pyx_v_bamFiles, struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile, PyObject *__pyx_v_options, CYTHON_UNUSED PyObject *__pyx_v_windowGenerator, CYTHON_UNUSED PyObject *__pyx_v_outputFile, CYTHON_UNUSED PyObject *__pyx_v_vcf, PyObject *__pyx_v_readBuffers) { struct __pyx_obj_7variant_VariantCandidateGenerator *__pyx_v_varCandGen = 0; struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_theReadBuffer = 0; PyObject *__pyx_v_rawBamVariants = 0; PyObject *__pyx_v_vcfFileVariants = 0; PyObject *__pyx_v_assemblerVariants = 0; PyObject *__pyx_v_refSequenceBytes = 0; char *__pyx_v_refSequence; struct __pyx_obj_7variant_Variant *__pyx_v_v = 0; int __pyx_v_maxReadLength; int __pyx_v_longestRead; CYTHON_UNUSED int __pyx_v_minSampleCoverage; int __pyx_v_totalBufferSizeInRegion; int __pyx_v_totalSeqQualSize; int __pyx_v_totalReadsInRegion; PyObject *__pyx_v_variantSource = NULL; PyObject *__pyx_v_assemRegionShift = NULL; CYTHON_UNUSED PyObject *__pyx_v_assemIndex = NULL; PyObject *__pyx_v_assemStart = NULL; PyObject *__pyx_v_assemEnd = NULL; PyObject *__pyx_v_refStart = NULL; PyObject *__pyx_v_refEnd = NULL; int __pyx_v_needToAssemble; PyObject *__pyx_v_allVarCands = 0; PyObject *__pyx_v_leftNormVars = 0; PyObject *__pyx_v_filteredVariants = 0; PyObject *__pyx_v_paddedVariants = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char *__pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; long __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); PY_LONG_LONG __pyx_t_18; PY_LONG_LONG __pyx_t_19; int __pyx_t_20; int __pyx_t_21; int __pyx_t_22; int __pyx_t_23; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("generateVariantsInRegion", 0); /* "variantcaller.pyx":353 * cdef VariantCandidateGenerator varCandGen * cdef bamReadBuffer theReadBuffer * cdef list rawBamVariants = [] # <<<<<<<<<<<<<< * cdef list vcfFileVariants = [] * cdef list assemblerVariants = [] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_rawBamVariants = __pyx_t_1; __pyx_t_1 = 0; /* "variantcaller.pyx":354 * cdef bamReadBuffer theReadBuffer * cdef list rawBamVariants = [] * cdef list vcfFileVariants = [] # <<<<<<<<<<<<<< * cdef list assemblerVariants = [] * cdef bytes refSequenceBytes = refFile.getSequence(chrom,start,end) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_vcfFileVariants = __pyx_t_1; __pyx_t_1 = 0; /* "variantcaller.pyx":355 * cdef list rawBamVariants = [] * cdef list vcfFileVariants = [] * cdef list assemblerVariants = [] # <<<<<<<<<<<<<< * cdef bytes refSequenceBytes = refFile.getSequence(chrom,start,end) * cdef char* refSequence = refSequenceBytes */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_assemblerVariants = __pyx_t_1; __pyx_t_1 = 0; /* "variantcaller.pyx":356 * cdef list vcfFileVariants = [] * cdef list assemblerVariants = [] * cdef bytes refSequenceBytes = refFile.getSequence(chrom,start,end) # <<<<<<<<<<<<<< * cdef char* refSequence = refSequenceBytes * cdef Variant v */ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_9fastafile_FastaFile *)__pyx_v_refFile->__pyx_vtab)->getSequence(__pyx_v_refFile, __pyx_v_chrom, __pyx_v_start, __pyx_v_end)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_refSequenceBytes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":357 * cdef list assemblerVariants = [] * cdef bytes refSequenceBytes = refFile.getSequence(chrom,start,end) * cdef char* refSequence = refSequenceBytes # <<<<<<<<<<<<<< * cdef Variant v * cdef int maxReadLength = options.rlen */ __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_refSequenceBytes)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_refSequence = __pyx_t_2; /* "variantcaller.pyx":359 * cdef char* refSequence = refSequenceBytes * cdef Variant v * cdef int maxReadLength = options.rlen # <<<<<<<<<<<<<< * cdef int longestRead = 0 * cdef int minSampleCoverage = -1 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__rlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_maxReadLength = __pyx_t_3; /* "variantcaller.pyx":360 * cdef Variant v * cdef int maxReadLength = options.rlen * cdef int longestRead = 0 # <<<<<<<<<<<<<< * cdef int minSampleCoverage = -1 * cdef int totalBufferSizeInRegion = 0 */ __pyx_v_longestRead = 0; /* "variantcaller.pyx":361 * cdef int maxReadLength = options.rlen * cdef int longestRead = 0 * cdef int minSampleCoverage = -1 # <<<<<<<<<<<<<< * cdef int totalBufferSizeInRegion = 0 * cdef int totalSeqQualSize = 0 */ __pyx_v_minSampleCoverage = -1; /* "variantcaller.pyx":362 * cdef int longestRead = 0 * cdef int minSampleCoverage = -1 * cdef int totalBufferSizeInRegion = 0 # <<<<<<<<<<<<<< * cdef int totalSeqQualSize = 0 * cdef int totalReadsInRegion = 0 */ __pyx_v_totalBufferSizeInRegion = 0; /* "variantcaller.pyx":363 * cdef int minSampleCoverage = -1 * cdef int totalBufferSizeInRegion = 0 * cdef int totalSeqQualSize = 0 # <<<<<<<<<<<<<< * cdef int totalReadsInRegion = 0 * */ __pyx_v_totalSeqQualSize = 0; /* "variantcaller.pyx":364 * cdef int totalBufferSizeInRegion = 0 * cdef int totalSeqQualSize = 0 * cdef int totalReadsInRegion = 0 # <<<<<<<<<<<<<< * * if options.verbosity >= 3: */ __pyx_v_totalReadsInRegion = 0; /* "variantcaller.pyx":366 * cdef int totalReadsInRegion = 0 * * if options.verbosity >= 3: # <<<<<<<<<<<<<< * totalReadsInRegion = countTotalReadsInRegion(readBuffers, &totalBufferSizeInRegion, &totalSeqQualSize) * logger.debug("There are %s reads (buffer size = %s. Total reads size = %s bytes) in the region %s:%s-%s" %(totalReadsInRegion, totalBufferSizeInRegion, totalSeqQualSize, chrom, start, end)) */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":367 * * if options.verbosity >= 3: * totalReadsInRegion = countTotalReadsInRegion(readBuffers, &totalBufferSizeInRegion, &totalSeqQualSize) # <<<<<<<<<<<<<< * logger.debug("There are %s reads (buffer size = %s. Total reads size = %s bytes) in the region %s:%s-%s" %(totalReadsInRegion, totalBufferSizeInRegion, totalSeqQualSize, chrom, start, end)) * */ __pyx_v_totalReadsInRegion = __pyx_f_13variantcaller_countTotalReadsInRegion(__pyx_v_readBuffers, (&__pyx_v_totalBufferSizeInRegion), (&__pyx_v_totalSeqQualSize)); /* "variantcaller.pyx":368 * if options.verbosity >= 3: * totalReadsInRegion = countTotalReadsInRegion(readBuffers, &totalBufferSizeInRegion, &totalSeqQualSize) * logger.debug("There are %s reads (buffer size = %s. Total reads size = %s bytes) in the region %s:%s-%s" %(totalReadsInRegion, totalBufferSizeInRegion, totalSeqQualSize, chrom, start, end)) # <<<<<<<<<<<<<< * * #cdef int coverageThreshold = computeCoverageThreshold(readBuffers, options) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__debug); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromLong(__pyx_v_totalReadsInRegion); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyInt_FromLong(__pyx_v_totalBufferSizeInRegion); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyInt_FromLong(__pyx_v_totalSeqQualSize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_10, 3, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __Pyx_DECREF(((PyObject *)__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 = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L3; } __pyx_L3:; /* "variantcaller.pyx":375 * # Generate initial variant candidate list from BAM files. Do this always, so we * # get read-counts for variants in the BAMs * if options.getVariantsFromBAMs: # <<<<<<<<<<<<<< * * varCandGen = VariantCandidateGenerator((chrom,start,end), refFile, options.minMapQual, options.minFlank, options.minBaseQual, options.maxReads, maxReadLength, options, options.verbosity, options.genSNPs, options.genIndels) */ __pyx_t_9 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__getVariantsFromBAMs); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":377 * if options.getVariantsFromBAMs: * * varCandGen = VariantCandidateGenerator((chrom,start,end), refFile, options.minMapQual, options.minFlank, options.minBaseQual, options.maxReads, maxReadLength, options, options.verbosity, options.genSNPs, options.genIndels) # <<<<<<<<<<<<<< * * # We want to check all BAMs and accumulate data before filtering */ __pyx_t_9 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minMapQual); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minFlank); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minBaseQual); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__maxReads); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyInt_FromLong(__pyx_v_maxReadLength); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__genSNPs); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__genIndels); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyTuple_New(11); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(((PyObject *)__pyx_v_refFile)); PyTuple_SET_ITEM(__pyx_t_13, 1, ((PyObject *)__pyx_v_refFile)); __Pyx_GIVEREF(((PyObject *)__pyx_v_refFile)); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 6, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_13, 7, __pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_13, 8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 9, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 10, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_1 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7variant_VariantCandidateGenerator)), ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_v_varCandGen = ((struct __pyx_obj_7variant_VariantCandidateGenerator *)__pyx_t_12); __pyx_t_12 = 0; /* "variantcaller.pyx":380 * * # We want to check all BAMs and accumulate data before filtering * for theReadBuffer in readBuffers: # <<<<<<<<<<<<<< * * if theReadBuffer.reads.getLengthOfLongestRead() > longestRead: */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_12 = ((PyObject *)__pyx_v_readBuffers); __Pyx_INCREF(__pyx_t_12); __pyx_t_14 = 0; for (;;) { if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_12)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_14); __Pyx_INCREF(__pyx_t_13); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_12, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theReadBuffer)); __pyx_v_theReadBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_13); __pyx_t_13 = 0; /* "variantcaller.pyx":382 * for theReadBuffer in readBuffers: * * if theReadBuffer.reads.getLengthOfLongestRead() > longestRead: # <<<<<<<<<<<<<< * longestRead = theReadBuffer.reads.getLengthOfLongestRead() * */ __pyx_t_5 = (((struct __pyx_vtabstruct_7cwindow_ReadArray *)__pyx_v_theReadBuffer->reads->__pyx_vtab)->getLengthOfLongestRead(__pyx_v_theReadBuffer->reads) > __pyx_v_longestRead); if (__pyx_t_5) { /* "variantcaller.pyx":383 * * if theReadBuffer.reads.getLengthOfLongestRead() > longestRead: * longestRead = theReadBuffer.reads.getLengthOfLongestRead() # <<<<<<<<<<<<<< * * varCandGen.addCandidatesFromReads(theReadBuffer.reads.array, theReadBuffer.reads.array + theReadBuffer.reads.getSize()) */ __pyx_v_longestRead = ((struct __pyx_vtabstruct_7cwindow_ReadArray *)__pyx_v_theReadBuffer->reads->__pyx_vtab)->getLengthOfLongestRead(__pyx_v_theReadBuffer->reads); goto __pyx_L7; } __pyx_L7:; /* "variantcaller.pyx":385 * longestRead = theReadBuffer.reads.getLengthOfLongestRead() * * varCandGen.addCandidatesFromReads(theReadBuffer.reads.array, theReadBuffer.reads.array + theReadBuffer.reads.getSize()) # <<<<<<<<<<<<<< * #varCandGen.addCandidatesFromReads(theReadBuffer.badReads.array, theReadBuffer.badReads.array + theReadBuffer.badReads.getSize()) * */ ((struct __pyx_vtabstruct_7variant_VariantCandidateGenerator *)__pyx_v_varCandGen->__pyx_vtab)->addCandidatesFromReads(__pyx_v_varCandGen, __pyx_v_theReadBuffer->reads->array, (__pyx_v_theReadBuffer->reads->array + ((struct __pyx_vtabstruct_7cwindow_ReadArray *)__pyx_v_theReadBuffer->reads->__pyx_vtab)->getSize(__pyx_v_theReadBuffer->reads))); /* "variantcaller.pyx":388 * #varCandGen.addCandidatesFromReads(theReadBuffer.badReads.array, theReadBuffer.badReads.array + theReadBuffer.badReads.getSize()) * * if options.verbosity >= 3: # <<<<<<<<<<<<<< * logger.debug("Processed sample %s. Detected %s unfiltered variant candidates so far" %(theReadBuffer.sample, len(varCandGen.variantHeap))) * */ __pyx_t_13 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyObject_RichCompare(__pyx_t_13, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":389 * * if options.verbosity >= 3: * logger.debug("Processed sample %s. Detected %s unfiltered variant candidates so far" %(theReadBuffer.sample, len(varCandGen.variantHeap))) # <<<<<<<<<<<<<< * * ## Filter by per-sample coverage on each file. No variant should be kept unless it has >= coverageThreshold supporting reads */ __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__debug); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = ((PyObject *)__pyx_v_varCandGen->variantHeap); __Pyx_INCREF(__pyx_t_11); if (unlikely(__pyx_t_11 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = PyDict_Size(__pyx_t_11); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_theReadBuffer->sample)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_theReadBuffer->sample)); __Pyx_GIVEREF(((PyObject *)__pyx_v_theReadBuffer->sample)); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_11)); __Pyx_GIVEREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L8; } __pyx_L8:; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "variantcaller.pyx":404 * * # Add candidates to list * rawBamVariants.extend(varCandGen.getCandidates(0)) # <<<<<<<<<<<<<< * * if longestRead > 0: */ __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_rawBamVariants), __pyx_n_s__extend); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_7variant_VariantCandidateGenerator *)__pyx_v_varCandGen->__pyx_vtab)->getCandidates(__pyx_v_varCandGen, 0)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "variantcaller.pyx":406 * rawBamVariants.extend(varCandGen.getCandidates(0)) * * if longestRead > 0: # <<<<<<<<<<<<<< * options.rlen = longestRead * */ __pyx_t_5 = (__pyx_v_longestRead > 0); if (__pyx_t_5) { /* "variantcaller.pyx":407 * * if longestRead > 0: * options.rlen = longestRead # <<<<<<<<<<<<<< * * # Get variants from external VCF source file */ __pyx_t_11 = PyInt_FromLong(__pyx_v_longestRead); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyObject_SetAttr(__pyx_v_options, __pyx_n_s__rlen, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9; } __pyx_L9:; goto __pyx_L4; } __pyx_L4:; /* "variantcaller.pyx":410 * * # Get variants from external VCF source file * if options.sourceFile: # <<<<<<<<<<<<<< * variantSource = variantutils.VariantCandidateReader(options.sourceFile, options) * vcfFileVariants.extend(variantSource.Variants(chrom,start,end)) */ __pyx_t_11 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__sourceFile); 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_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":411 * # Get variants from external VCF source file * if options.sourceFile: * variantSource = variantutils.VariantCandidateReader(options.sourceFile, options) # <<<<<<<<<<<<<< * vcfFileVariants.extend(variantSource.Variants(chrom,start,end)) * */ __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__variantutils); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__sourceFile); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); __pyx_t_11 = 0; __pyx_t_11 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_v_variantSource = __pyx_t_11; __pyx_t_11 = 0; /* "variantcaller.pyx":412 * if options.sourceFile: * variantSource = variantutils.VariantCandidateReader(options.sourceFile, options) * vcfFileVariants.extend(variantSource.Variants(chrom,start,end)) # <<<<<<<<<<<<<< * * # Get variants from assembler */ __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_vcfFileVariants), __pyx_n_s__extend); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyObject_GetAttr(__pyx_v_variantSource, __pyx_n_s__Variants); 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_4 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_4 = 0; __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __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 = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L10; } __pyx_L10:; /* "variantcaller.pyx":415 * * # Get variants from assembler * if options.assemble: # <<<<<<<<<<<<<< * * assemRegionShift = max(100, min(1000, options.assemblyRegionSize//2)) */ __pyx_t_13 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__assemble); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":417 * if options.assemble: * * assemRegionShift = max(100, min(1000, options.assemblyRegionSize//2)) # <<<<<<<<<<<<<< * #assemRegionShift = max(100, min(1000, options.assemblyRegionSize//4)) * logger.debug("Assembly region windows will be tiled. Each region will start %s bases after the last one" %(assemRegionShift)) */ __pyx_t_13 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__assemblyRegionSize); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = PyNumber_FloorDivide(__pyx_t_13, __pyx_int_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_16 = 1000; __pyx_t_11 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_t_11, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_5) { __Pyx_INCREF(__pyx_t_6); __pyx_t_13 = __pyx_t_6; } else { __pyx_t_12 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __pyx_t_12; __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_t_13); __pyx_t_6 = __pyx_t_13; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_16 = 100; __pyx_t_12 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_t_12, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_5) { __Pyx_INCREF(__pyx_t_6); __pyx_t_13 = __pyx_t_6; } else { __pyx_t_11 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __pyx_t_11; __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_t_13; __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_assemRegionShift = __pyx_t_6; __pyx_t_6 = 0; /* "variantcaller.pyx":419 * assemRegionShift = max(100, min(1000, options.assemblyRegionSize//2)) * #assemRegionShift = max(100, min(1000, options.assemblyRegionSize//4)) * logger.debug("Assembly region windows will be tiled. Each region will start %s bases after the last one" %(assemRegionShift)) # <<<<<<<<<<<<<< * * for assemIndex,assemStart in enumerate(xrange(start, end, assemRegionShift)): */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__debug); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), __pyx_v_assemRegionShift); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":421 * logger.debug("Assembly region windows will be tiled. Each region will start %s bases after the last one" %(assemRegionShift)) * * for assemIndex,assemStart in enumerate(xrange(start, end, assemRegionShift)): # <<<<<<<<<<<<<< * #for assemIndex,assemStart in enumerate(xrange(start, end, options.assemblyRegionSize//2)): * #for assemIndex,assemStart in enumerate(xrange(start, end, options.assemblyRegionSize)): */ __Pyx_INCREF(__pyx_int_0); __pyx_t_6 = __pyx_int_0; __pyx_t_11 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_assemRegionShift); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_assemRegionShift); __Pyx_GIVEREF(__pyx_v_assemRegionShift); __pyx_t_11 = 0; __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_builtin_xrange, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; if (PyList_CheckExact(__pyx_t_13) || PyTuple_CheckExact(__pyx_t_13)) { __pyx_t_12 = __pyx_t_13; __Pyx_INCREF(__pyx_t_12); __pyx_t_14 = 0; __pyx_t_17 = NULL; } else { __pyx_t_14 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = Py_TYPE(__pyx_t_12)->tp_iternext; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_12)) { if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_12)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_14); __Pyx_INCREF(__pyx_t_13); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_12, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_12)) { if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_12)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_14); __Pyx_INCREF(__pyx_t_13); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_12, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_13 = __pyx_t_17(__pyx_t_12); if (unlikely(!__pyx_t_13)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_13); } __Pyx_XDECREF(__pyx_v_assemStart); __pyx_v_assemStart = __pyx_t_13; __pyx_t_13 = 0; __Pyx_INCREF(__pyx_t_6); __Pyx_XDECREF(__pyx_v_assemIndex); __pyx_v_assemIndex = __pyx_t_6; __pyx_t_13 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_13; __pyx_t_13 = 0; /* "variantcaller.pyx":425 * #for assemIndex,assemStart in enumerate(xrange(start, end, options.assemblyRegionSize)): * * assemEnd = min(assemStart + options.assemblyRegionSize, end) # <<<<<<<<<<<<<< * refStart = max(0, assemStart-options.assemblyRegionSize) * refEnd = assemEnd+options.assemblyRegionSize */ __pyx_t_3 = __pyx_v_end; __pyx_t_13 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__assemblyRegionSize); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyNumber_Add(__pyx_v_assemStart, __pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_4 = PyInt_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_11, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { __pyx_t_7 = PyInt_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = __pyx_t_7; __pyx_t_7 = 0; } else { __Pyx_INCREF(__pyx_t_11); __pyx_t_13 = __pyx_t_11; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __pyx_t_13; __Pyx_INCREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_v_assemEnd); __pyx_v_assemEnd = __pyx_t_11; __pyx_t_11 = 0; /* "variantcaller.pyx":426 * * assemEnd = min(assemStart + options.assemblyRegionSize, end) * refStart = max(0, assemStart-options.assemblyRegionSize) # <<<<<<<<<<<<<< * refEnd = assemEnd+options.assemblyRegionSize * refSequenceBytes = refFile.getSequence(chrom, refStart, refEnd) */ __pyx_t_11 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__assemblyRegionSize); 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); __pyx_t_13 = PyNumber_Subtract(__pyx_v_assemStart, __pyx_t_11); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_16 = 0; __pyx_t_7 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_RichCompare(__pyx_t_13, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __Pyx_INCREF(__pyx_t_13); __pyx_t_11 = __pyx_t_13; } else { __pyx_t_4 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_t_11; __Pyx_INCREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_v_refStart); __pyx_v_refStart = __pyx_t_13; __pyx_t_13 = 0; /* "variantcaller.pyx":427 * assemEnd = min(assemStart + options.assemblyRegionSize, end) * refStart = max(0, assemStart-options.assemblyRegionSize) * refEnd = assemEnd+options.assemblyRegionSize # <<<<<<<<<<<<<< * refSequenceBytes = refFile.getSequence(chrom, refStart, refEnd) * refSequence = refSequenceBytes */ __pyx_t_13 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__assemblyRegionSize); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyNumber_Add(__pyx_v_assemEnd, __pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_v_refEnd); __pyx_v_refEnd = __pyx_t_11; __pyx_t_11 = 0; /* "variantcaller.pyx":428 * refStart = max(0, assemStart-options.assemblyRegionSize) * refEnd = assemEnd+options.assemblyRegionSize * refSequenceBytes = refFile.getSequence(chrom, refStart, refEnd) # <<<<<<<<<<<<<< * refSequence = refSequenceBytes * */ __pyx_t_18 = __Pyx_PyInt_AsLongLong(__pyx_v_refStart); if (unlikely((__pyx_t_18 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __Pyx_PyInt_AsLongLong(__pyx_v_refEnd); if (unlikely((__pyx_t_19 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_9fastafile_FastaFile *)__pyx_v_refFile->__pyx_vtab)->getSequence(__pyx_v_refFile, __pyx_v_chrom, __pyx_t_18, __pyx_t_19)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(((PyObject *)__pyx_v_refSequenceBytes)); __pyx_v_refSequenceBytes = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; /* "variantcaller.pyx":429 * refEnd = assemEnd+options.assemblyRegionSize * refSequenceBytes = refFile.getSequence(chrom, refStart, refEnd) * refSequence = refSequenceBytes # <<<<<<<<<<<<<< * * needToAssemble = doWeNeedToAssembleThisRegion(readBuffers, chrom, assemStart, assemEnd, options, refSequence) */ __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_refSequenceBytes)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_refSequence = __pyx_t_2; /* "variantcaller.pyx":431 * refSequence = refSequenceBytes * * needToAssemble = doWeNeedToAssembleThisRegion(readBuffers, chrom, assemStart, assemEnd, options, refSequence) # <<<<<<<<<<<<<< * * if not needToAssemble: */ __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_v_assemStart); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = __Pyx_PyInt_AsInt(__pyx_v_assemEnd); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_needToAssemble = __pyx_f_13variantcaller_doWeNeedToAssembleThisRegion(__pyx_v_readBuffers, __pyx_v_chrom, __pyx_t_3, __pyx_t_20, __pyx_v_options, __pyx_v_refSequence); /* "variantcaller.pyx":433 * needToAssemble = doWeNeedToAssembleThisRegion(readBuffers, chrom, assemStart, assemEnd, options, refSequence) * * if not needToAssemble: # <<<<<<<<<<<<<< * continue * */ __pyx_t_5 = (!__pyx_v_needToAssemble); if (__pyx_t_5) { /* "variantcaller.pyx":434 * * if not needToAssemble: * continue # <<<<<<<<<<<<<< * * #logger.debug("Assembling region %s:%s-%s (ref seq %s:%s-%s)" %(chrom, assemStart, assemEnd, chrom, refStart, refEnd)) */ goto __pyx_L12_continue; goto __pyx_L14; } __pyx_L14:; /* "variantcaller.pyx":437 * * #logger.debug("Assembling region %s:%s-%s (ref seq %s:%s-%s)" %(chrom, assemStart, assemEnd, chrom, refStart, refEnd)) * assemblerVariants.extend(assembleReadsAndDetectVariants(chrom, assemStart, assemEnd, refStart, refEnd, readBuffers, refSequence, options)) # <<<<<<<<<<<<<< * #logger.debug("Variants Found by assembler in region are %s" %(assemblerVariants)) * */ __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_assemblerVariants), __pyx_n_s__extend); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_chrom)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = __Pyx_PyInt_AsInt(__pyx_v_assemStart); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_v_assemEnd); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_v_refStart); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __Pyx_PyInt_AsInt(__pyx_v_refEnd); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((PyObject *)__pyx_f_9assembler_assembleReadsAndDetectVariants(__pyx_t_2, __pyx_t_20, __pyx_t_3, __pyx_t_21, __pyx_t_22, __pyx_v_readBuffers, __pyx_v_refSequence, __pyx_v_options)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_L12_continue:; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11; } __pyx_L11:; /* "variantcaller.pyx":440 * #logger.debug("Variants Found by assembler in region are %s" %(assemblerVariants)) * * cdef list allVarCands = rawBamVariants + vcfFileVariants + assemblerVariants # <<<<<<<<<<<<<< * cdef list leftNormVars = sorted( [leftNormaliseIndel(v, refFile, maxReadLength) for v in allVarCands] ) * cdef list filteredVariants = filterVariants(leftNormVars, refFile, maxReadLength, options.minReads, options.maxSize, options.verbosity, options) */ __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_v_rawBamVariants), ((PyObject *)__pyx_v_vcfFileVariants)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_12 = PyNumber_Add(((PyObject *)__pyx_t_6), ((PyObject *)__pyx_v_assemblerVariants)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_allVarCands = __pyx_t_12; __pyx_t_12 = 0; /* "variantcaller.pyx":441 * * cdef list allVarCands = rawBamVariants + vcfFileVariants + assemblerVariants * cdef list leftNormVars = sorted( [leftNormaliseIndel(v, refFile, maxReadLength) for v in allVarCands] ) # <<<<<<<<<<<<<< * cdef list filteredVariants = filterVariants(leftNormVars, refFile, maxReadLength, options.minReads, options.maxSize, options.verbosity, options) * */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = ((PyObject *)__pyx_v_allVarCands); __Pyx_INCREF(__pyx_t_13); __pyx_t_14 = 0; for (;;) { if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_v)); __pyx_v_v = ((struct __pyx_obj_7variant_Variant *)__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = ((PyObject *)__pyx_f_13platypusutils_leftNormaliseIndel(__pyx_v_v, __pyx_v_refFile, __pyx_v_maxReadLength)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_PyList_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = ((PyObject *)__pyx_t_6); __Pyx_INCREF(__pyx_t_13); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_12 = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_23 = PyList_Sort(((PyObject *)__pyx_t_12)); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_leftNormVars = __pyx_t_12; __pyx_t_12 = 0; /* "variantcaller.pyx":442 * cdef list allVarCands = rawBamVariants + vcfFileVariants + assemblerVariants * cdef list leftNormVars = sorted( [leftNormaliseIndel(v, refFile, maxReadLength) for v in allVarCands] ) * cdef list filteredVariants = filterVariants(leftNormVars, refFile, maxReadLength, options.minReads, options.maxSize, options.verbosity, options) # <<<<<<<<<<<<<< * * # Need to work out how to consistently report these. */ __pyx_t_12 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__minReads); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_22 = __Pyx_PyInt_AsInt(__pyx_t_12); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__maxSize); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_12); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_12); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = ((PyObject *)__pyx_f_13variantFilter_filterVariants(__pyx_v_leftNormVars, __pyx_v_refFile, __pyx_v_maxReadLength, __pyx_t_22, __pyx_t_21, __pyx_t_3, __pyx_v_options)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_v_filteredVariants = ((PyObject*)__pyx_t_12); __pyx_t_12 = 0; /* "variantcaller.pyx":445 * * # Need to work out how to consistently report these. * logger.debug("There are %s filtered variant candidates which will be used for calling in region %s:%s-%s" %(len(filteredVariants), chrom, start, end)) # <<<<<<<<<<<<<< * * cdef list paddedVariants = padVariants(filteredVariants, refFile, chrom) */ __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__debug); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(((PyObject *)__pyx_v_filteredVariants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_14 = PyList_GET_SIZE(((PyObject *)__pyx_v_filteredVariants)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_12 = 0; __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__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 = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":447 * logger.debug("There are %s filtered variant candidates which will be used for calling in region %s:%s-%s" %(len(filteredVariants), chrom, start, end)) * * cdef list paddedVariants = padVariants(filteredVariants, refFile, chrom) # <<<<<<<<<<<<<< * return paddedVariants * */ __pyx_t_4 = ((PyObject *)__pyx_f_13variantFilter_padVariants(__pyx_v_filteredVariants, __pyx_v_refFile, __pyx_v_chrom)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_paddedVariants = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":448 * * cdef list paddedVariants = padVariants(filteredVariants, refFile, chrom) * return paddedVariants # <<<<<<<<<<<<<< * * ################################################################################################### */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_paddedVariants)); __pyx_r = __pyx_v_paddedVariants; 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_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("variantcaller.generateVariantsInRegion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_varCandGen); __Pyx_XDECREF((PyObject *)__pyx_v_theReadBuffer); __Pyx_XDECREF(__pyx_v_rawBamVariants); __Pyx_XDECREF(__pyx_v_vcfFileVariants); __Pyx_XDECREF(__pyx_v_assemblerVariants); __Pyx_XDECREF(__pyx_v_refSequenceBytes); __Pyx_XDECREF((PyObject *)__pyx_v_v); __Pyx_XDECREF(__pyx_v_variantSource); __Pyx_XDECREF(__pyx_v_assemRegionShift); __Pyx_XDECREF(__pyx_v_assemIndex); __Pyx_XDECREF(__pyx_v_assemStart); __Pyx_XDECREF(__pyx_v_assemEnd); __Pyx_XDECREF(__pyx_v_refStart); __Pyx_XDECREF(__pyx_v_refEnd); __Pyx_XDECREF(__pyx_v_allVarCands); __Pyx_XDECREF(__pyx_v_leftNormVars); __Pyx_XDECREF(__pyx_v_filteredVariants); __Pyx_XDECREF(__pyx_v_paddedVariants); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":452 * ################################################################################################### * * cdef void callVariantsInRegion(bytes chrom, int start, int end, bamFiles, FastaFile refFile, dict indelErrorModel, options, windowGenerator, outputFile, vcf, list samples, dict samplesByID, dict samplesByBAM, Population pop): # <<<<<<<<<<<<<< * """ * Given a set of BAM files, and a sensibly-sized genomic region (typically ~1MB), call variants in the specified region. */ static void __pyx_f_13variantcaller_callVariantsInRegion(PyObject *__pyx_v_chrom, int __pyx_v_start, int __pyx_v_end, PyObject *__pyx_v_bamFiles, struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile, PyObject *__pyx_v_indelErrorModel, PyObject *__pyx_v_options, PyObject *__pyx_v_windowGenerator, PyObject *__pyx_v_outputFile, PyObject *__pyx_v_vcf, PyObject *__pyx_v_samples, PyObject *__pyx_v_samplesByID, PyObject *__pyx_v_samplesByBAM, struct __pyx_obj_11cpopulation_Population *__pyx_v_pop) { PyObject *__pyx_v_refSequenceBytes = 0; char *__pyx_v_refSequence; PyObject *__pyx_v_window = 0; PyObject *__pyx_v_readBuffers = 0; struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_readBuffer = 0; PyObject *__pyx_v_e = NULL; PyObject *__pyx_v_allSortedVariants = 0; PyObject *__pyx_v_windowIndex = NULL; PyObject *__pyx_v_windowStart = NULL; PyObject *__pyx_v_windowEnd = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PY_LONG_LONG __pyx_t_4; PY_LONG_LONG __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; char *__pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; Py_ssize_t __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); Py_ssize_t __pyx_t_18; int __pyx_t_19; int __pyx_t_20; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; int __pyx_t_24; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("callVariantsInRegion", 0); __Pyx_INCREF(__pyx_v_chrom); /* "variantcaller.pyx":456 * Given a set of BAM files, and a sensibly-sized genomic region (typically ~1MB), call variants in the specified region. * """ * refFile.setCacheSequence(chrom, start-(10*options.rlen), end+(10*options.rlen)) # <<<<<<<<<<<<<< * * cdef bytes refSequenceBytes = refFile.getSequence(chrom,start, min(end+5*options.rlen, refFile.refs[chrom].SeqLength-1)) */ __pyx_t_1 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__rlen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_int_10, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyInt_AsLongLong(__pyx_t_2); if (unlikely((__pyx_t_4 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__rlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Multiply(__pyx_int_10, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyInt_AsLongLong(__pyx_t_3); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; ((struct __pyx_vtabstruct_9fastafile_FastaFile *)__pyx_v_refFile->__pyx_vtab)->setCacheSequence(__pyx_v_refFile, __pyx_v_chrom, __pyx_t_4, __pyx_t_5); /* "variantcaller.pyx":458 * refFile.setCacheSequence(chrom, start-(10*options.rlen), end+(10*options.rlen)) * * cdef bytes refSequenceBytes = refFile.getSequence(chrom,start, min(end+5*options.rlen, refFile.refs[chrom].SeqLength-1)) # <<<<<<<<<<<<<< * cdef char* refSequence = refSequenceBytes * cdef dict window */ if (unlikely(((PyObject *)__pyx_v_refFile->refs) == 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_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_refFile->refs), ((PyObject *)__pyx_v_chrom)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__SeqLength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__rlen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyNumber_Multiply(__pyx_int_5, __pyx_t_2); if (unlikely(!__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_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyInt_AsLongLong(__pyx_t_6); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_9fastafile_FastaFile *)__pyx_v_refFile->__pyx_vtab)->getSequence(__pyx_v_refFile, __pyx_v_chrom, __pyx_v_start, __pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_refSequenceBytes = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":459 * * cdef bytes refSequenceBytes = refFile.getSequence(chrom,start, min(end+5*options.rlen, refFile.refs[chrom].SeqLength-1)) * cdef char* refSequence = refSequenceBytes # <<<<<<<<<<<<<< * cdef dict window * cdef list readBuffers */ __pyx_t_8 = PyBytes_AsString(((PyObject *)__pyx_v_refSequenceBytes)); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_refSequence = __pyx_t_8; /* "variantcaller.pyx":464 * cdef bamReadBuffer readBuffer * * try: # <<<<<<<<<<<<<< * readBuffers = loadBAMData(bamFiles, chrom, start, end, indelErrorModel, options, samples, samplesByID, samplesByBAM, refSequence) * */ { __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "variantcaller.pyx":465 * * try: * readBuffers = loadBAMData(bamFiles, chrom, start, end, indelErrorModel, options, samples, samplesByID, samplesByBAM, refSequence) # <<<<<<<<<<<<<< * * except Exception, e: */ if (!(likely(PyList_CheckExact(__pyx_v_bamFiles))||((__pyx_v_bamFiles) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_bamFiles)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_6 = __pyx_v_bamFiles; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = ((PyObject *)__pyx_f_13platypusutils_loadBAMData(((PyObject*)__pyx_t_6), __pyx_v_chrom, __pyx_v_start, __pyx_v_end, __pyx_v_indelErrorModel, __pyx_v_options, __pyx_v_samples, __pyx_v_samplesByID, __pyx_v_samplesByBAM, __pyx_v_refSequence)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_readBuffers = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "variantcaller.pyx":467 * readBuffers = loadBAMData(bamFiles, chrom, start, end, indelErrorModel, options, samples, samplesByID, samplesByBAM, refSequence) * * except Exception, e: # <<<<<<<<<<<<<< * logger.error('Exception in region %s:%s-%s. Error was %s' %(chrom, start, end, e)) * logger.warning("Region %s:%s-%s will be skipped" %(chrom, start, end)) */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { __Pyx_AddTraceback("variantcaller.callVariantsInRegion", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_v_e = __pyx_t_6; /* "variantcaller.pyx":468 * * except Exception, e: * logger.error('Exception in region %s:%s-%s. Error was %s' %(chrom, start, end, e)) # <<<<<<<<<<<<<< * logger.warning("Region %s:%s-%s will be skipped" %(chrom, start, end)) * return */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__error); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __Pyx_INCREF(__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); __pyx_t_1 = 0; __pyx_t_14 = 0; __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_14)); __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_t_14)); __Pyx_GIVEREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "variantcaller.pyx":469 * except Exception, e: * logger.error('Exception in region %s:%s-%s. Error was %s' %(chrom, start, end, e)) * logger.warning("Region %s:%s-%s will be skipped" %(chrom, start, end)) # <<<<<<<<<<<<<< * return * */ __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__warning); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_13 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_13 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __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 = 469; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_13)); __Pyx_GIVEREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "variantcaller.pyx":470 * logger.error('Exception in region %s:%s-%s. Error was %s' %(chrom, start, end, e)) * logger.warning("Region %s:%s-%s will be skipped" %(chrom, start, end)) * return # <<<<<<<<<<<<<< * * if readBuffers is None: */ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L10_try_end:; } /* "variantcaller.pyx":472 * return * * if readBuffers is None: # <<<<<<<<<<<<<< * logger.info("Skipping region %s:%s-%s as data could not be loaded" %(chrom, start, end)) * return */ __pyx_t_7 = (__pyx_v_readBuffers == ((PyObject*)Py_None)); if (__pyx_t_7) { /* "variantcaller.pyx":473 * * if readBuffers is None: * logger.info("Skipping region %s:%s-%s as data could not be loaded" %(chrom, start, end)) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 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_13), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __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_13)); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "variantcaller.pyx":474 * if readBuffers is None: * logger.info("Skipping region %s:%s-%s as data could not be loaded" %(chrom, start, end)) * return # <<<<<<<<<<<<<< * * cdef list allSortedVariants = generateVariantsInRegion(chrom, start, end, bamFiles, refFile, options, windowGenerator, outputFile, vcf, readBuffers) */ goto __pyx_L0; goto __pyx_L13; } __pyx_L13:; /* "variantcaller.pyx":476 * return * * cdef list allSortedVariants = generateVariantsInRegion(chrom, start, end, bamFiles, refFile, options, windowGenerator, outputFile, vcf, readBuffers) # <<<<<<<<<<<<<< * cdef Variant var,nextVar * cdef list sortedVarList */ __pyx_t_3 = ((PyObject *)__pyx_f_13variantcaller_generateVariantsInRegion(__pyx_v_chrom, __pyx_v_start, __pyx_v_end, __pyx_v_bamFiles, __pyx_v_refFile, __pyx_v_options, __pyx_v_windowGenerator, __pyx_v_outputFile, __pyx_v_vcf, __pyx_v_readBuffers)); 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_v_allSortedVariants = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "variantcaller.pyx":480 * cdef list sortedVarList * * for windowIndex,window in enumerate(windowGenerator.WindowsAndVariants(chrom, start, end, allSortedVariants, options)): # <<<<<<<<<<<<<< * * try: */ __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; __pyx_t_13 = PyObject_GetAttr(__pyx_v_windowGenerator, __pyx_n_s__WindowsAndVariants); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_allSortedVariants)); PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_allSortedVariants)); __Pyx_GIVEREF(((PyObject *)__pyx_v_allSortedVariants)); __Pyx_INCREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); __pyx_t_6 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_16 = 0; __pyx_t_17 = NULL; } else { __pyx_t_16 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_2)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_window)); __pyx_v_window = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF(__pyx_v_windowIndex); __pyx_v_windowIndex = __pyx_t_3; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; /* "variantcaller.pyx":482 * for windowIndex,window in enumerate(windowGenerator.WindowsAndVariants(chrom, start, end, allSortedVariants, options)): * * try: # <<<<<<<<<<<<<< * * chrom = window['chromosome'] */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "variantcaller.pyx":484 * try: * * chrom = window['chromosome'] # <<<<<<<<<<<<<< * windowStart = window['startPos'] * windowEnd = window['endPos'] */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L16_error;} } __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__chromosome)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(((PyObject *)__pyx_v_chrom)); __pyx_v_chrom = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "variantcaller.pyx":485 * * chrom = window['chromosome'] * windowStart = window['startPos'] # <<<<<<<<<<<<<< * windowEnd = window['endPos'] * */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L16_error;} } __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__startPos)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_v_windowStart); __pyx_v_windowStart = __pyx_t_2; __pyx_t_2 = 0; /* "variantcaller.pyx":486 * chrom = window['chromosome'] * windowStart = window['startPos'] * windowEnd = window['endPos'] # <<<<<<<<<<<<<< * * if windowEnd - windowStart > 2500: */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L16_error;} } __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__endPos)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_v_windowEnd); __pyx_v_windowEnd = __pyx_t_2; __pyx_t_2 = 0; /* "variantcaller.pyx":488 * windowEnd = window['endPos'] * * if windowEnd - windowStart > 2500: # <<<<<<<<<<<<<< * logger.info("Skipping very large window %s:%s-%s of size %s," %(chrom, windowStart, windowEnd, windowEnd - windowStart)) * continue */ __pyx_t_2 = PyNumber_Subtract(__pyx_v_windowEnd, __pyx_v_windowStart); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2500, Py_GT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_7) { /* "variantcaller.pyx":489 * * if windowEnd - windowStart > 2500: * logger.info("Skipping very large window %s:%s-%s of size %s," %(chrom, windowStart, windowEnd, windowEnd - windowStart)) # <<<<<<<<<<<<<< * continue * */ __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyNumber_Subtract(__pyx_v_windowEnd, __pyx_v_windowStart); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); __Pyx_INCREF(__pyx_v_windowStart); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_windowStart); __Pyx_GIVEREF(__pyx_v_windowStart); __Pyx_INCREF(__pyx_v_windowEnd); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_windowEnd); __Pyx_GIVEREF(__pyx_v_windowEnd); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_13)); __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 = 489; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_13)); __Pyx_GIVEREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "variantcaller.pyx":490 * if windowEnd - windowStart > 2500: * logger.info("Skipping very large window %s:%s-%s of size %s," %(chrom, windowStart, windowEnd, windowEnd - windowStart)) * continue # <<<<<<<<<<<<<< * * callVariantsInWindow(window, options, refFile, readBuffers, pop, start, end, refSequence) */ goto __pyx_L22_try_continue; goto __pyx_L24; } __pyx_L24:; /* "variantcaller.pyx":492 * continue * * callVariantsInWindow(window, options, refFile, readBuffers, pop, start, end, refSequence) # <<<<<<<<<<<<<< * * if len(window['variants']) > 0 and len(pop.variantPosteriors.keys()) > 0: */ __pyx_f_13variantcaller_callVariantsInWindow(__pyx_v_window, __pyx_v_options, __pyx_v_refFile, __pyx_v_readBuffers, __pyx_v_pop, __pyx_v_start, __pyx_v_end, __pyx_v_refSequence); /* "variantcaller.pyx":494 * callVariantsInWindow(window, options, refFile, readBuffers, pop, start, end, refSequence) * * if len(window['variants']) > 0 and len(pop.variantPosteriors.keys()) > 0: # <<<<<<<<<<<<<< * outputCallToVCF(pop.varsByPos, pop.vcfInfo, pop.vcfFilter, pop.haplotypes, pop.genotypes, pop.frequencies, pop.genotypeLikelihoods, pop.goodnessOfFitValues, pop.haplotypeIndexes, pop.readBuffers, pop.nIndividuals, vcf, refFile, outputFile, options, pop.variants, window['startPos'], window['endPos']) * */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L16_error;} } __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__variants)); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_18 = PyObject_Length(__pyx_t_13); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_7 = (__pyx_t_18 > 0); if (__pyx_t_7) { if (unlikely(((PyObject *)__pyx_v_pop->variantPosteriors) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "keys"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L16_error;} } __pyx_t_13 = PyDict_Keys(__pyx_v_pop->variantPosteriors); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_18 = PyObject_Length(__pyx_t_13); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_19 = (__pyx_t_18 > 0); __pyx_t_20 = __pyx_t_19; } else { __pyx_t_20 = __pyx_t_7; } if (__pyx_t_20) { /* "variantcaller.pyx":495 * * if len(window['variants']) > 0 and len(pop.variantPosteriors.keys()) > 0: * outputCallToVCF(pop.varsByPos, pop.vcfInfo, pop.vcfFilter, pop.haplotypes, pop.genotypes, pop.frequencies, pop.genotypeLikelihoods, pop.goodnessOfFitValues, pop.haplotypeIndexes, pop.readBuffers, pop.nIndividuals, vcf, refFile, outputFile, options, pop.variants, window['startPos'], window['endPos']) # <<<<<<<<<<<<<< * * # Need to make ref calls between variants and at start and end of windows */ __pyx_t_13 = ((PyObject *)__pyx_v_pop->varsByPos); __Pyx_INCREF(__pyx_t_13); __pyx_t_6 = ((PyObject *)__pyx_v_pop->vcfInfo); __Pyx_INCREF(__pyx_t_6); __pyx_t_2 = ((PyObject *)__pyx_v_pop->vcfFilter); __Pyx_INCREF(__pyx_t_2); __pyx_t_15 = ((PyObject *)__pyx_v_pop->haplotypes); __Pyx_INCREF(__pyx_t_15); __pyx_t_14 = ((PyObject *)__pyx_v_pop->genotypes); __Pyx_INCREF(__pyx_t_14); __pyx_t_21 = ((PyObject *)__pyx_v_pop->readBuffers); __Pyx_INCREF(__pyx_t_21); __pyx_t_22 = ((PyObject *)__pyx_v_pop->variants); __Pyx_INCREF(__pyx_t_22); if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L16_error;} } __pyx_t_23 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__startPos)); if (!__pyx_t_23) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_23); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L16_error;} } __pyx_t_23 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__endPos)); if (!__pyx_t_23) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_24 = __Pyx_PyInt_AsInt(__pyx_t_23); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __pyx_f_8vcfutils_outputCallToVCF(((PyObject*)__pyx_t_13), ((PyObject*)__pyx_t_6), ((PyObject*)__pyx_t_2), ((PyObject*)__pyx_t_15), ((PyObject*)__pyx_t_14), __pyx_v_pop->frequencies, __pyx_v_pop->genotypeLikelihoods, __pyx_v_pop->goodnessOfFitValues, __pyx_v_pop->haplotypeIndexes, ((PyObject*)__pyx_t_21), __pyx_v_pop->nIndividuals, __pyx_v_vcf, __pyx_v_refFile, __pyx_v_outputFile, __pyx_v_options, ((PyObject*)__pyx_t_22), __pyx_t_12, __pyx_t_24); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; goto __pyx_L25; } /*else*/ { /* "variantcaller.pyx":509 * * else: * if options.outputRefCalls: # <<<<<<<<<<<<<< * outputRefCall(chrom, pop, vcf, refFile, outputFile, windowIndex, window, options, readBuffers) * */ __pyx_t_22 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__outputRefCalls); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; if (__pyx_t_20) { /* "variantcaller.pyx":510 * else: * if options.outputRefCalls: * outputRefCall(chrom, pop, vcf, refFile, outputFile, windowIndex, window, options, readBuffers) # <<<<<<<<<<<<<< * * if options.compressReads: */ __pyx_t_22 = __Pyx_GetName(__pyx_m, __pyx_n_s__outputRefCall); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_21 = PyTuple_New(9); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_21, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); __Pyx_INCREF(((PyObject *)__pyx_v_pop)); PyTuple_SET_ITEM(__pyx_t_21, 1, ((PyObject *)__pyx_v_pop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_pop)); __Pyx_INCREF(__pyx_v_vcf); PyTuple_SET_ITEM(__pyx_t_21, 2, __pyx_v_vcf); __Pyx_GIVEREF(__pyx_v_vcf); __Pyx_INCREF(((PyObject *)__pyx_v_refFile)); PyTuple_SET_ITEM(__pyx_t_21, 3, ((PyObject *)__pyx_v_refFile)); __Pyx_GIVEREF(((PyObject *)__pyx_v_refFile)); __Pyx_INCREF(__pyx_v_outputFile); PyTuple_SET_ITEM(__pyx_t_21, 4, __pyx_v_outputFile); __Pyx_GIVEREF(__pyx_v_outputFile); __Pyx_INCREF(__pyx_v_windowIndex); PyTuple_SET_ITEM(__pyx_t_21, 5, __pyx_v_windowIndex); __Pyx_GIVEREF(__pyx_v_windowIndex); __Pyx_INCREF(((PyObject *)__pyx_v_window)); PyTuple_SET_ITEM(__pyx_t_21, 6, ((PyObject *)__pyx_v_window)); __Pyx_GIVEREF(((PyObject *)__pyx_v_window)); __Pyx_INCREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_21, 7, __pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); __Pyx_INCREF(((PyObject *)__pyx_v_readBuffers)); PyTuple_SET_ITEM(__pyx_t_21, 8, ((PyObject *)__pyx_v_readBuffers)); __Pyx_GIVEREF(((PyObject *)__pyx_v_readBuffers)); __pyx_t_14 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L26; } __pyx_L26:; } __pyx_L25:; /* "variantcaller.pyx":512 * outputRefCall(chrom, pop, vcf, refFile, outputFile, windowIndex, window, options, readBuffers) * * if options.compressReads: # <<<<<<<<<<<<<< * for readBuffer in readBuffers: * readBuffer.recompressReadsInCurrentWindow(start, end, refSequence, options.qualBinSize, options.compressReads) */ __pyx_t_14 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__compressReads); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_20) { /* "variantcaller.pyx":513 * * if options.compressReads: * for readBuffer in readBuffers: # <<<<<<<<<<<<<< * readBuffer.recompressReadsInCurrentWindow(start, end, refSequence, options.qualBinSize, options.compressReads) * */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L16_error;} } __pyx_t_14 = ((PyObject *)__pyx_v_readBuffers); __Pyx_INCREF(__pyx_t_14); __pyx_t_18 = 0; for (;;) { if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_21 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_18); __Pyx_INCREF(__pyx_t_21); __pyx_t_18++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L16_error;} #else __pyx_t_21 = PySequence_ITEM(__pyx_t_14, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L16_error;} #endif if (!(likely(((__pyx_t_21) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_21, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_readBuffer)); __pyx_v_readBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_21); __pyx_t_21 = 0; /* "variantcaller.pyx":514 * if options.compressReads: * for readBuffer in readBuffers: * readBuffer.recompressReadsInCurrentWindow(start, end, refSequence, options.qualBinSize, options.compressReads) # <<<<<<<<<<<<<< * * except Exception, e: */ __pyx_t_21 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__qualBinSize); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_24 = __Pyx_PyInt_AsInt(__pyx_t_21); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__compressReads); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_21); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L16_error;} __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; ((struct __pyx_vtabstruct_7cwindow_bamReadBuffer *)__pyx_v_readBuffer->__pyx_vtab)->recompressReadsInCurrentWindow(__pyx_v_readBuffer, __pyx_v_start, __pyx_v_end, __pyx_v_refSequence, __pyx_t_24, __pyx_t_12); } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L27; } __pyx_L27:; } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L23_try_end; __pyx_L16_error:; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; /* "variantcaller.pyx":516 * readBuffer.recompressReadsInCurrentWindow(start, end, refSequence, options.qualBinSize, options.compressReads) * * except Exception, e: # <<<<<<<<<<<<<< * logger.exception('Exception in window %d-%d. Error was %s' %(window['startPos'],window['endPos'], e)) * logger.warning("Window %s:%s-%s will be skipped" %(chrom, window['startPos'],window['endPos'])) */ __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_12) { __Pyx_AddTraceback("variantcaller.callVariantsInRegion", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_21, &__pyx_t_22) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_21); __Pyx_GOTREF(__pyx_t_22); __Pyx_INCREF(__pyx_t_21); __Pyx_XDECREF(__pyx_v_e); __pyx_v_e = __pyx_t_21; /* "variantcaller.pyx":517 * * except Exception, e: * logger.exception('Exception in window %d-%d. Error was %s' %(window['startPos'],window['endPos'], e)) # <<<<<<<<<<<<<< * logger.warning("Window %s:%s-%s will be skipped" %(chrom, window['startPos'],window['endPos'])) * */ __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_2 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__exception); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} } __pyx_t_15 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__startPos)); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_15); if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} } __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__endPos)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); __pyx_t_15 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":518 * except Exception, e: * logger.exception('Exception in window %d-%d. Error was %s' %(window['startPos'],window['endPos'], e)) * logger.warning("Window %s:%s-%s will be skipped" %(chrom, window['startPos'],window['endPos'])) # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__warning); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} } __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__startPos)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_6); if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} } __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__endPos)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; goto __pyx_L17_exception_handled; } __pyx_L18_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L22_try_continue:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L14_continue; __pyx_L17_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L23_try_end:; } __pyx_L14_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 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_6); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); __Pyx_XDECREF(__pyx_t_23); __Pyx_WriteUnraisable("variantcaller.callVariantsInRegion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_v_refSequenceBytes); __Pyx_XDECREF(__pyx_v_window); __Pyx_XDECREF(__pyx_v_readBuffers); __Pyx_XDECREF((PyObject *)__pyx_v_readBuffer); __Pyx_XDECREF(__pyx_v_e); __Pyx_XDECREF(__pyx_v_allSortedVariants); __Pyx_XDECREF(__pyx_v_windowIndex); __Pyx_XDECREF(__pyx_v_windowStart); __Pyx_XDECREF(__pyx_v_windowEnd); __Pyx_XDECREF(__pyx_v_chrom); __Pyx_RefNannyFinishContext(); } /* "variantcaller.pyx":522 * ################################################################################################### * * cdef int sumMapQualsTimesReadLength(list readBuffers): # <<<<<<<<<<<<<< * """ * Compute and return the sum of mapping quality phred scores of all good-quality reads */ static int __pyx_f_13variantcaller_sumMapQualsTimesReadLength(PyObject *__pyx_v_readBuffers) { int __pyx_v_result; struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_theBuffer = 0; __pyx_t_15samtoolsWrapper_cAlignedRead **__pyx_v_rStart; __pyx_t_15samtoolsWrapper_cAlignedRead **__pyx_v_rEnd; long __pyx_v_i; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; __pyx_t_15samtoolsWrapper_cAlignedRead **__pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sumMapQualsTimesReadLength", 0); /* "variantcaller.pyx":527 * mapping to this region multuplied by the read lengths. * """ * cdef int result = 0 # <<<<<<<<<<<<<< * cdef bamReadBuffer theBuffer * cdef cAlignedRead** rStart = NULL */ __pyx_v_result = 0; /* "variantcaller.pyx":529 * cdef int result = 0 * cdef bamReadBuffer theBuffer * cdef cAlignedRead** rStart = NULL # <<<<<<<<<<<<<< * cdef cAlignedRead** rEnd = NULL * */ __pyx_v_rStart = NULL; /* "variantcaller.pyx":530 * cdef bamReadBuffer theBuffer * cdef cAlignedRead** rStart = NULL * cdef cAlignedRead** rEnd = NULL # <<<<<<<<<<<<<< * * for i from 0 <= i < len(readBuffers): */ __pyx_v_rEnd = NULL; /* "variantcaller.pyx":532 * cdef cAlignedRead** rEnd = NULL * * for i from 0 <= i < len(readBuffers): # <<<<<<<<<<<<<< * theBuffer = readBuffers[i] * rStart = theBuffer.reads.windowStart */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_readBuffers)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "variantcaller.pyx":533 * * for i from 0 <= i < len(readBuffers): * theBuffer = readBuffers[i] # <<<<<<<<<<<<<< * rStart = theBuffer.reads.windowStart * rEnd = theBuffer.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 = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_readBuffers), __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theBuffer)); __pyx_v_theBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_2); __pyx_t_2 = 0; /* "variantcaller.pyx":534 * for i from 0 <= i < len(readBuffers): * theBuffer = readBuffers[i] * rStart = theBuffer.reads.windowStart # <<<<<<<<<<<<<< * rEnd = theBuffer.reads.windowEnd * */ __pyx_t_3 = __pyx_v_theBuffer->reads->windowStart; __pyx_v_rStart = __pyx_t_3; /* "variantcaller.pyx":535 * theBuffer = readBuffers[i] * rStart = theBuffer.reads.windowStart * rEnd = theBuffer.reads.windowEnd # <<<<<<<<<<<<<< * * while rStart != rEnd: */ __pyx_t_3 = __pyx_v_theBuffer->reads->windowEnd; __pyx_v_rEnd = __pyx_t_3; /* "variantcaller.pyx":537 * rEnd = theBuffer.reads.windowEnd * * while rStart != rEnd: # <<<<<<<<<<<<<< * result += (rStart[0].mapq*rStart[0].rlen) * rStart += 1 */ while (1) { __pyx_t_4 = (__pyx_v_rStart != __pyx_v_rEnd); if (!__pyx_t_4) break; /* "variantcaller.pyx":538 * * while rStart != rEnd: * result += (rStart[0].mapq*rStart[0].rlen) # <<<<<<<<<<<<<< * rStart += 1 * */ __pyx_v_result = (__pyx_v_result + ((__pyx_v_rStart[0])->mapq * (__pyx_v_rStart[0])->rlen)); /* "variantcaller.pyx":539 * while rStart != rEnd: * result += (rStart[0].mapq*rStart[0].rlen) * rStart += 1 # <<<<<<<<<<<<<< * * return result */ __pyx_v_rStart = (__pyx_v_rStart + 1); } } /* "variantcaller.pyx":541 * rStart += 1 * * return result # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_r = __pyx_v_result; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("variantcaller.sumMapQualsTimesReadLength", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_theBuffer); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_13variantcaller_1outputRefCall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_13variantcaller_outputRefCall[] = "\n "; static PyMethodDef __pyx_mdef_13variantcaller_1outputRefCall = {__Pyx_NAMESTR("outputRefCall"), (PyCFunction)__pyx_pw_13variantcaller_1outputRefCall, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_13variantcaller_outputRefCall)}; static PyObject *__pyx_pw_13variantcaller_1outputRefCall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_chrom = 0; struct __pyx_obj_11cpopulation_Population *__pyx_v_pop = 0; PyObject *__pyx_v_vcfFile = 0; CYTHON_UNUSED struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile = 0; PyObject *__pyx_v_outputFile = 0; CYTHON_UNUSED int __pyx_v_windowIndex; PyObject *__pyx_v_window = 0; CYTHON_UNUSED PyObject *__pyx_v_options = 0; PyObject *__pyx_v_readBuffers = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("outputRefCall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__chrom,&__pyx_n_s__pop,&__pyx_n_s__vcfFile,&__pyx_n_s__refFile,&__pyx_n_s__outputFile,&__pyx_n_s__windowIndex,&__pyx_n_s__window,&__pyx_n_s__options,&__pyx_n_s__readBuffers,0}; PyObject* values[9] = {0,0,0,0,0,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 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); 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__chrom)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pop)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputRefCall", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __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("outputRefCall", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__refFile)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputRefCall", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__outputFile)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputRefCall", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__windowIndex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputRefCall", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__window)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputRefCall", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__options)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputRefCall", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__readBuffers)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("outputRefCall", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outputRefCall") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 9) { 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); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); values[8] = PyTuple_GET_ITEM(__pyx_args, 8); } __pyx_v_chrom = ((PyObject*)values[0]); __pyx_v_pop = ((struct __pyx_obj_11cpopulation_Population *)values[1]); __pyx_v_vcfFile = values[2]; __pyx_v_refFile = ((struct __pyx_obj_9fastafile_FastaFile *)values[3]); __pyx_v_outputFile = values[4]; __pyx_v_windowIndex = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_windowIndex == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_window = ((PyObject*)values[6]); __pyx_v_options = values[7]; __pyx_v_readBuffers = ((PyObject*)values[8]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("outputRefCall", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("variantcaller.outputRefCall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyBytes_Type), 1, "chrom", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pop), __pyx_ptype_11cpopulation_Population, 1, "pop", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_refFile), __pyx_ptype_9fastafile_FastaFile, 1, "refFile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), (&PyDict_Type), 1, "window", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_readBuffers), (&PyList_Type), 1, "readBuffers", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_13variantcaller_outputRefCall(__pyx_self, __pyx_v_chrom, __pyx_v_pop, __pyx_v_vcfFile, __pyx_v_refFile, __pyx_v_outputFile, __pyx_v_windowIndex, __pyx_v_window, __pyx_v_options, __pyx_v_readBuffers); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":545 * ################################################################################################### * * def outputRefCall(bytes chrom, Population pop, vcfFile, FastaFile refFile, outputFile, int windowIndex, dict window, options, list readBuffers): # <<<<<<<<<<<<<< * """ * """ */ static PyObject *__pyx_pf_13variantcaller_outputRefCall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chrom, struct __pyx_obj_11cpopulation_Population *__pyx_v_pop, PyObject *__pyx_v_vcfFile, CYTHON_UNUSED struct __pyx_obj_9fastafile_FastaFile *__pyx_v_refFile, PyObject *__pyx_v_outputFile, CYTHON_UNUSED int __pyx_v_windowIndex, PyObject *__pyx_v_window, CYTHON_UNUSED PyObject *__pyx_v_options, PyObject *__pyx_v_readBuffers) { int __pyx_v_windowStart; int __pyx_v_windowEnd; PyObject *__pyx_v_variants = 0; int __pyx_v_nIndividuals; struct __pyx_obj_7cwindow_bamReadBuffer *__pyx_v_theBuffer = 0; PyObject *__pyx_v_genotypes = 0; int __pyx_v_refIndex; 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; Py_ssize_t __pyx_v_index; double __pyx_v_minLikelihood; int __pyx_v_isZeroCoverageBAM; int __pyx_v_minReadsForSample; int __pyx_v_readsThisSample; double __pyx_v_thisLikelihood; int __pyx_v_phredPValue; PyObject *__pyx_v_qual = NULL; PyObject *__pyx_v_windowSize = NULL; PyObject *__pyx_v_sumOfMapQuals = NULL; PyObject *__pyx_v_tempQual = NULL; PyObject *__pyx_v_maxPost = NULL; PyObject *__pyx_v_maxProbVar = NULL; PyObject *__pyx_v_probRef = NULL; PyObject *__pyx_v_ref = NULL; PyObject *__pyx_v_alt = NULL; PyObject *__pyx_v_id = NULL; PyObject *__pyx_v_linefilter = NULL; PyObject *__pyx_v_lineinfo = NULL; PyObject *__pyx_v_theFormat = NULL; PyObject *__pyx_v_vcfDataLine = NULL; long __pyx_v_i; PyObject *__pyx_v_thisSample = NULL; PyObject *__pyx_v_v = 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; Py_ssize_t __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_t_13; double __pyx_t_14; double __pyx_t_15; double __pyx_t_16; struct __pyx_opt_args_11cpopulation_10Population_calculatePosterior __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("outputRefCall", 0); /* "variantcaller.pyx":548 * """ * """ * cdef int windowStart = window['startPos'] + 1 # 1-indexed # <<<<<<<<<<<<<< * cdef int windowEnd = window['endPos'] + 1 # 1-indexed * cdef list variants = window['variants'] */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__startPos)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_windowStart = __pyx_t_3; /* "variantcaller.pyx":549 * """ * cdef int windowStart = window['startPos'] + 1 # 1-indexed * cdef int windowEnd = window['endPos'] + 1 # 1-indexed # <<<<<<<<<<<<<< * cdef list variants = window['variants'] * cdef int nIndividuals = len(readBuffers) */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__endPos)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_windowEnd = __pyx_t_3; /* "variantcaller.pyx":550 * cdef int windowStart = window['startPos'] + 1 # 1-indexed * cdef int windowEnd = window['endPos'] + 1 # 1-indexed * cdef list variants = window['variants'] # <<<<<<<<<<<<<< * cdef int nIndividuals = len(readBuffers) * cdef bamReadBuffer theBuffer */ if (unlikely(((PyObject *)__pyx_v_window) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_window), ((PyObject *)__pyx_n_s__variants)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); 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 = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_variants = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":551 * cdef int windowEnd = window['endPos'] + 1 # 1-indexed * cdef list variants = window['variants'] * cdef int nIndividuals = len(readBuffers) # <<<<<<<<<<<<<< * cdef bamReadBuffer theBuffer * */ if (unlikely(((PyObject *)__pyx_v_readBuffers) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_readBuffers)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nIndividuals = __pyx_t_4; /* "variantcaller.pyx":554 * cdef bamReadBuffer theBuffer * * logger.debug("Making ref call in region %s:%s-%s" %(chrom, windowStart, windowEnd)) # <<<<<<<<<<<<<< * * cdef list genotypes = pop.genotypes */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__debug); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong(__pyx_v_windowStart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyInt_FromLong(__pyx_v_windowEnd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_v_chrom)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_20), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __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 = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "variantcaller.pyx":556 * logger.debug("Making ref call in region %s:%s-%s" %(chrom, windowStart, windowEnd)) * * cdef list genotypes = pop.genotypes # <<<<<<<<<<<<<< * cdef int refIndex = 0 * cdef DiploidGenotype genotype = None */ __pyx_t_5 = ((PyObject *)__pyx_v_pop->genotypes); __Pyx_INCREF(__pyx_t_5); __pyx_v_genotypes = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "variantcaller.pyx":557 * * cdef list genotypes = pop.genotypes * cdef int refIndex = 0 # <<<<<<<<<<<<<< * cdef DiploidGenotype genotype = None * cdef Haplotype hap1 = None */ __pyx_v_refIndex = 0; /* "variantcaller.pyx":558 * cdef list genotypes = pop.genotypes * cdef int refIndex = 0 * cdef DiploidGenotype genotype = None # <<<<<<<<<<<<<< * cdef Haplotype hap1 = None * cdef Haplotype hap2 = None */ __Pyx_INCREF(Py_None); __pyx_v_genotype = ((struct __pyx_obj_9cgenotype_DiploidGenotype *)Py_None); /* "variantcaller.pyx":559 * cdef int refIndex = 0 * cdef DiploidGenotype genotype = None * cdef Haplotype hap1 = None # <<<<<<<<<<<<<< * cdef Haplotype hap2 = None * */ __Pyx_INCREF(Py_None); __pyx_v_hap1 = ((struct __pyx_obj_10chaplotype_Haplotype *)Py_None); /* "variantcaller.pyx":560 * cdef DiploidGenotype genotype = None * cdef Haplotype hap1 = None * cdef Haplotype hap2 = None # <<<<<<<<<<<<<< * * for index,genotype in enumerate(genotypes): */ __Pyx_INCREF(Py_None); __pyx_v_hap2 = ((struct __pyx_obj_10chaplotype_Haplotype *)Py_None); /* "variantcaller.pyx":562 * cdef Haplotype hap2 = None * * for index,genotype in enumerate(genotypes): # <<<<<<<<<<<<<< * * hap1 = genotype.hap1 */ __pyx_t_4 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_genotypes); __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_9cgenotype_DiploidGenotype))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_v_genotype)); __pyx_v_genotype = ((struct __pyx_obj_9cgenotype_DiploidGenotype *)__pyx_t_6); __pyx_t_6 = 0; __pyx_v_index = __pyx_t_4; __pyx_t_4 = (__pyx_t_4 + 1); /* "variantcaller.pyx":564 * for index,genotype in enumerate(genotypes): * * hap1 = genotype.hap1 # <<<<<<<<<<<<<< * hap2 = genotype.hap2 * */ __pyx_t_6 = ((PyObject *)__pyx_v_genotype->hap1); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_v_hap1)); __pyx_v_hap1 = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":565 * * hap1 = genotype.hap1 * hap2 = genotype.hap2 # <<<<<<<<<<<<<< * * if len(hap1.variants) == 0 and len(hap2.variants) == 0: */ __pyx_t_6 = ((PyObject *)__pyx_v_genotype->hap2); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_v_hap2)); __pyx_v_hap2 = ((struct __pyx_obj_10chaplotype_Haplotype *)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":567 * hap2 = genotype.hap2 * * if len(hap1.variants) == 0 and len(hap2.variants) == 0: # <<<<<<<<<<<<<< * refIndex = index * break */ __pyx_t_6 = ((PyObject *)__pyx_v_hap1->variants); __Pyx_INCREF(__pyx_t_6); if (unlikely(__pyx_t_6 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = PyTuple_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = (__pyx_t_8 == 0); if (__pyx_t_9) { __pyx_t_6 = ((PyObject *)__pyx_v_hap2->variants); __Pyx_INCREF(__pyx_t_6); if (unlikely(__pyx_t_6 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = PyTuple_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = (__pyx_t_8 == 0); __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_9; } if (__pyx_t_11) { /* "variantcaller.pyx":568 * * if len(hap1.variants) == 0 and len(hap2.variants) == 0: * refIndex = index # <<<<<<<<<<<<<< * break * else: */ __pyx_v_refIndex = __pyx_v_index; /* "variantcaller.pyx":569 * if len(hap1.variants) == 0 and len(hap2.variants) == 0: * refIndex = index * break # <<<<<<<<<<<<<< * else: * raise StandardError, "Could not find ref in genotype list. There are %s genotypes. They are %s" %(len(genotypes), genotypes) */ goto __pyx_L4_break; goto __pyx_L5; } __pyx_L5:; } /*else*/ { /* "variantcaller.pyx":571 * break * else: * raise StandardError, "Could not find ref in genotype list. There are %s genotypes. They are %s" %(len(genotypes), genotypes) # <<<<<<<<<<<<<< * * minLikelihood = 0 */ 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 = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = PyList_GET_SIZE(((PyObject *)__pyx_v_genotypes)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_genotypes)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_genotypes)); __Pyx_GIVEREF(((PyObject *)__pyx_v_genotypes)); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_builtin_StandardError, ((PyObject *)__pyx_t_6), 0, 0); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4_break:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "variantcaller.pyx":573 * raise StandardError, "Could not find ref in genotype list. There are %s genotypes. They are %s" %(len(genotypes), genotypes) * * minLikelihood = 0 # <<<<<<<<<<<<<< * cdef int isZeroCoverageBAM = 0 * cdef int minReadsForSample = -1 */ __pyx_v_minLikelihood = 0.0; /* "variantcaller.pyx":574 * * minLikelihood = 0 * cdef int isZeroCoverageBAM = 0 # <<<<<<<<<<<<<< * cdef int minReadsForSample = -1 * cdef int readsThisSample = 0 */ __pyx_v_isZeroCoverageBAM = 0; /* "variantcaller.pyx":575 * minLikelihood = 0 * cdef int isZeroCoverageBAM = 0 * cdef int minReadsForSample = -1 # <<<<<<<<<<<<<< * cdef int readsThisSample = 0 * */ __pyx_v_minReadsForSample = -1; /* "variantcaller.pyx":576 * cdef int isZeroCoverageBAM = 0 * cdef int minReadsForSample = -1 * cdef int readsThisSample = 0 # <<<<<<<<<<<<<< * * for index,theBuffer in enumerate(readBuffers): */ __pyx_v_readsThisSample = 0; /* "variantcaller.pyx":578 * cdef int readsThisSample = 0 * * for index,theBuffer in enumerate(readBuffers): # <<<<<<<<<<<<<< * * readsThisSample = theBuffer.reads.windowEnd - theBuffer.reads.windowStart */ __pyx_t_4 = 0; __pyx_t_5 = ((PyObject *)__pyx_v_readBuffers); __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theBuffer)); __pyx_v_theBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_6); __pyx_t_6 = 0; __pyx_v_index = __pyx_t_4; __pyx_t_4 = (__pyx_t_4 + 1); /* "variantcaller.pyx":580 * for index,theBuffer in enumerate(readBuffers): * * readsThisSample = theBuffer.reads.windowEnd - theBuffer.reads.windowStart # <<<<<<<<<<<<<< * * if minReadsForSample == -1: */ __pyx_v_readsThisSample = (__pyx_v_theBuffer->reads->windowEnd - __pyx_v_theBuffer->reads->windowStart); /* "variantcaller.pyx":582 * readsThisSample = theBuffer.reads.windowEnd - theBuffer.reads.windowStart * * if minReadsForSample == -1: # <<<<<<<<<<<<<< * minReadsForSample = readsThisSample * else: */ __pyx_t_11 = (__pyx_v_minReadsForSample == -1); if (__pyx_t_11) { /* "variantcaller.pyx":583 * * if minReadsForSample == -1: * minReadsForSample = readsThisSample # <<<<<<<<<<<<<< * else: * minReadsForSample = min(minReadsForSample, readsThisSample) */ __pyx_v_minReadsForSample = __pyx_v_readsThisSample; goto __pyx_L9; } /*else*/ { /* "variantcaller.pyx":585 * minReadsForSample = readsThisSample * else: * minReadsForSample = min(minReadsForSample, readsThisSample) # <<<<<<<<<<<<<< * * if readsThisSample > 0: */ __pyx_t_3 = __pyx_v_readsThisSample; __pyx_t_12 = __pyx_v_minReadsForSample; if ((__pyx_t_3 < __pyx_t_12)) { __pyx_t_13 = __pyx_t_3; } else { __pyx_t_13 = __pyx_t_12; } __pyx_v_minReadsForSample = __pyx_t_13; } __pyx_L9:; /* "variantcaller.pyx":587 * minReadsForSample = min(minReadsForSample, readsThisSample) * * if readsThisSample > 0: # <<<<<<<<<<<<<< * thisLikelihood = (log(pop.genotypeLikelihoods[index][refIndex]) + pop.maxLogLikelihoods[index]) / pop.nReads[index] * minLikelihood = min(thisLikelihood, minLikelihood) */ __pyx_t_11 = (__pyx_v_readsThisSample > 0); if (__pyx_t_11) { /* "variantcaller.pyx":588 * * if readsThisSample > 0: * thisLikelihood = (log(pop.genotypeLikelihoods[index][refIndex]) + pop.maxLogLikelihoods[index]) / pop.nReads[index] # <<<<<<<<<<<<<< * minLikelihood = min(thisLikelihood, minLikelihood) * else: */ __pyx_v_thisLikelihood = ((log(((__pyx_v_pop->genotypeLikelihoods[__pyx_v_index])[__pyx_v_refIndex])) + (__pyx_v_pop->maxLogLikelihoods[__pyx_v_index])) / ((double)(__pyx_v_pop->nReads[__pyx_v_index]))); /* "variantcaller.pyx":589 * if readsThisSample > 0: * thisLikelihood = (log(pop.genotypeLikelihoods[index][refIndex]) + pop.maxLogLikelihoods[index]) / pop.nReads[index] * minLikelihood = min(thisLikelihood, minLikelihood) # <<<<<<<<<<<<<< * else: * isZeroCoverageBAM = 1 */ __pyx_t_14 = __pyx_v_minLikelihood; __pyx_t_15 = __pyx_v_thisLikelihood; if ((__pyx_t_14 < __pyx_t_15)) { __pyx_t_16 = __pyx_t_14; } else { __pyx_t_16 = __pyx_t_15; } __pyx_v_minLikelihood = __pyx_t_16; goto __pyx_L10; } /*else*/ { /* "variantcaller.pyx":591 * minLikelihood = min(thisLikelihood, minLikelihood) * else: * isZeroCoverageBAM = 1 # <<<<<<<<<<<<<< * * */ __pyx_v_isZeroCoverageBAM = 1; } __pyx_L10:; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "variantcaller.pyx":603 * # candidate. Try qual == phred( min( (1.0 - max(varPosteriors), sum(mapQuals)/sizeof(window) ) ) ) * * cdef int phredPValue = int(-10*log10(betaBinomialCDF(0, minReadsForSample, 20, 20))) # <<<<<<<<<<<<<< * * if isZeroCoverageBAM: */ __pyx_v_phredPValue = ((int)(-10.0 * log10(__pyx_f_13platypusutils_betaBinomialCDF(0, __pyx_v_minReadsForSample, 20, 20)))); /* "variantcaller.pyx":605 * cdef int phredPValue = int(-10*log10(betaBinomialCDF(0, minReadsForSample, 20, 20))) * * if isZeroCoverageBAM: # <<<<<<<<<<<<<< * qual = 0 * else: */ if (__pyx_v_isZeroCoverageBAM) { /* "variantcaller.pyx":606 * * if isZeroCoverageBAM: * qual = 0 # <<<<<<<<<<<<<< * else: * if len(variants) == 0: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_qual = __pyx_int_0; goto __pyx_L11; } /*else*/ { /* "variantcaller.pyx":608 * qual = 0 * else: * if len(variants) == 0: # <<<<<<<<<<<<<< * windowSize = windowEnd - windowStart * sumOfMapQuals = sumMapQualsTimesReadLength(readBuffers) */ 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 = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_variants)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = (__pyx_t_4 == 0); if (__pyx_t_11) { /* "variantcaller.pyx":609 * else: * if len(variants) == 0: * windowSize = windowEnd - windowStart # <<<<<<<<<<<<<< * sumOfMapQuals = sumMapQualsTimesReadLength(readBuffers) * qual = min(int(sumOfMapQuals/windowSize), phredPValue) */ __pyx_t_5 = PyInt_FromLong((__pyx_v_windowEnd - __pyx_v_windowStart)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_windowSize = __pyx_t_5; __pyx_t_5 = 0; /* "variantcaller.pyx":610 * if len(variants) == 0: * windowSize = windowEnd - windowStart * sumOfMapQuals = sumMapQualsTimesReadLength(readBuffers) # <<<<<<<<<<<<<< * qual = min(int(sumOfMapQuals/windowSize), phredPValue) * */ __pyx_t_5 = PyInt_FromLong(__pyx_f_13variantcaller_sumMapQualsTimesReadLength(__pyx_v_readBuffers)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_sumOfMapQuals = __pyx_t_5; __pyx_t_5 = 0; /* "variantcaller.pyx":611 * windowSize = windowEnd - windowStart * sumOfMapQuals = sumMapQualsTimesReadLength(readBuffers) * qual = min(int(sumOfMapQuals/windowSize), phredPValue) # <<<<<<<<<<<<<< * * else: */ __pyx_t_13 = __pyx_v_phredPValue; __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_sumOfMapQuals, __pyx_v_windowSize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { __pyx_t_1 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_1 = 0; } else { __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_qual = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L12; } /*else*/ { /* "variantcaller.pyx":614 * * else: * windowSize = windowEnd - windowStart # <<<<<<<<<<<<<< * sumOfMapQuals = sumMapQualsTimesReadLength(readBuffers) * tempQual = sumOfMapQuals/windowSize */ __pyx_t_5 = PyInt_FromLong((__pyx_v_windowEnd - __pyx_v_windowStart)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_windowSize = __pyx_t_5; __pyx_t_5 = 0; /* "variantcaller.pyx":615 * else: * windowSize = windowEnd - windowStart * sumOfMapQuals = sumMapQualsTimesReadLength(readBuffers) # <<<<<<<<<<<<<< * tempQual = sumOfMapQuals/windowSize * maxPost = max( [pop.calculatePosterior(v, 1) for v in variants] ) */ __pyx_t_5 = PyInt_FromLong(__pyx_f_13variantcaller_sumMapQualsTimesReadLength(__pyx_v_readBuffers)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_sumOfMapQuals = __pyx_t_5; __pyx_t_5 = 0; /* "variantcaller.pyx":616 * windowSize = windowEnd - windowStart * sumOfMapQuals = sumMapQualsTimesReadLength(readBuffers) * tempQual = sumOfMapQuals/windowSize # <<<<<<<<<<<<<< * maxPost = max( [pop.calculatePosterior(v, 1) for v in variants] ) * maxProbVar = 1.0 - 10**(-0.1*maxPost) */ __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_sumOfMapQuals, __pyx_v_windowSize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_tempQual = __pyx_t_5; __pyx_t_5 = 0; /* "variantcaller.pyx":617 * sumOfMapQuals = sumMapQualsTimesReadLength(readBuffers) * tempQual = sumOfMapQuals/windowSize * maxPost = max( [pop.calculatePosterior(v, 1) for v in variants] ) # <<<<<<<<<<<<<< * maxProbVar = 1.0 - 10**(-0.1*maxPost) * probRef = 1.0 - maxProbVar */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (unlikely(((PyObject *)__pyx_v_variants) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = ((PyObject *)__pyx_v_variants); __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_v); __pyx_v_v = __pyx_t_1; __pyx_t_1 = 0; if (!(likely(((__pyx_v_v) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_v, __pyx_ptype_7variant_Variant))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_v; __Pyx_INCREF(__pyx_t_1); __pyx_t_17.__pyx_n = 1; __pyx_t_17.flatPrior = 1; __pyx_t_16 = ((struct __pyx_vtabstruct_11cpopulation_Population *)__pyx_v_pop->__pyx_vtab)->calculatePosterior(__pyx_v_pop, ((struct __pyx_obj_7variant_Variant *)__pyx_t_1), &__pyx_t_17); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyFloat_FromDouble(__pyx_t_16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__Pyx_PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_t_5)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_v_maxPost = __pyx_t_5; __pyx_t_5 = 0; /* "variantcaller.pyx":618 * tempQual = sumOfMapQuals/windowSize * maxPost = max( [pop.calculatePosterior(v, 1) for v in variants] ) * maxProbVar = 1.0 - 10**(-0.1*maxPost) # <<<<<<<<<<<<<< * probRef = 1.0 - maxProbVar * qual = min(int(min(tempQual, round(-10.0 * log10(1.0-probRef)))), phredPValue) */ __pyx_t_5 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyFloat_FromDouble(-0.1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyNumber_Multiply(__pyx_t_6, __pyx_v_maxPost); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Power(__pyx_int_10, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_maxProbVar = __pyx_t_1; __pyx_t_1 = 0; /* "variantcaller.pyx":619 * maxPost = max( [pop.calculatePosterior(v, 1) for v in variants] ) * maxProbVar = 1.0 - 10**(-0.1*maxPost) * probRef = 1.0 - maxProbVar # <<<<<<<<<<<<<< * qual = min(int(min(tempQual, round(-10.0 * log10(1.0-probRef)))), phredPValue) * */ __pyx_t_1 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyNumber_Subtract(__pyx_t_1, __pyx_v_maxProbVar); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_probRef = __pyx_t_6; __pyx_t_6 = 0; /* "variantcaller.pyx":620 * maxProbVar = 1.0 - 10**(-0.1*maxPost) * probRef = 1.0 - maxProbVar * qual = min(int(min(tempQual, round(-10.0 * log10(1.0-probRef)))), phredPValue) # <<<<<<<<<<<<<< * * */ __pyx_t_13 = __pyx_v_phredPValue; __pyx_t_6 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyNumber_Subtract(__pyx_t_6, __pyx_v_probRef); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = round((-10.0 * log10(__pyx_t_16))); __Pyx_INCREF(__pyx_v_tempQual); __pyx_t_1 = __pyx_v_tempQual; __pyx_t_5 = PyFloat_FromDouble(__pyx_t_14); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_11) { __pyx_t_2 = PyFloat_FromDouble(__pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; __pyx_t_2 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; } __Pyx_DECREF(__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 = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_11) { __pyx_t_5 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; } else { __Pyx_INCREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_qual = __pyx_t_6; __pyx_t_6 = 0; } __pyx_L12:; } __pyx_L11:; /* "variantcaller.pyx":624 * * # Sort out VCF output * ref = "N" # <<<<<<<<<<<<<< * alt = ["."] * id = "." */ __Pyx_INCREF(((PyObject *)__pyx_n_s__N)); __pyx_v_ref = ((PyObject *)__pyx_n_s__N); /* "variantcaller.pyx":625 * # Sort out VCF output * ref = "N" * alt = ["."] # <<<<<<<<<<<<<< * id = "." * linefilter = ["REFCALL"] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); __pyx_v_alt = __pyx_t_6; __pyx_t_6 = 0; /* "variantcaller.pyx":626 * ref = "N" * alt = ["."] * id = "." # <<<<<<<<<<<<<< * linefilter = ["REFCALL"] * lineinfo = {} */ __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); __pyx_v_id = ((PyObject *)__pyx_kp_s_22); /* "variantcaller.pyx":627 * alt = ["."] * id = "." * linefilter = ["REFCALL"] # <<<<<<<<<<<<<< * lineinfo = {} * lineinfo['BE'] = [windowEnd+1] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_n_s__REFCALL)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__REFCALL)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__REFCALL)); __pyx_v_linefilter = __pyx_t_6; __pyx_t_6 = 0; /* "variantcaller.pyx":628 * id = "." * linefilter = ["REFCALL"] * lineinfo = {} # <<<<<<<<<<<<<< * lineinfo['BE'] = [windowEnd+1] * lineinfo['Size'] = [windowEnd-windowStart] */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_v_lineinfo = __pyx_t_6; __pyx_t_6 = 0; /* "variantcaller.pyx":629 * linefilter = ["REFCALL"] * lineinfo = {} * lineinfo['BE'] = [windowEnd+1] # <<<<<<<<<<<<<< * lineinfo['Size'] = [windowEnd-windowStart] * */ __pyx_t_6 = PyInt_FromLong((__pyx_v_windowEnd + 1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__BE), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "variantcaller.pyx":630 * lineinfo = {} * lineinfo['BE'] = [windowEnd+1] * lineinfo['Size'] = [windowEnd-windowStart] # <<<<<<<<<<<<<< * * # I'll fill in some of these later. */ __pyx_t_1 = PyInt_FromLong((__pyx_v_windowEnd - __pyx_v_windowStart)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__Size), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":633 * * # I'll fill in some of these later. * lineinfo['FR'] = ["."] # <<<<<<<<<<<<<< * lineinfo['MMLQ'] = ["."] * lineinfo['HP'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__FR), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":634 * # I'll fill in some of these later. * lineinfo['FR'] = ["."] * lineinfo['MMLQ'] = ["."] # <<<<<<<<<<<<<< * lineinfo['HP'] = ["."] * lineinfo['TCR'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__MMLQ), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":635 * lineinfo['FR'] = ["."] * lineinfo['MMLQ'] = ["."] * lineinfo['HP'] = ["."] # <<<<<<<<<<<<<< * lineinfo['TCR'] = ["."] * lineinfo['WE'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__HP), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":636 * lineinfo['MMLQ'] = ["."] * lineinfo['HP'] = ["."] * lineinfo['TCR'] = ["."] # <<<<<<<<<<<<<< * lineinfo['WE'] = ["."] * lineinfo['WS'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__TCR), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":637 * lineinfo['HP'] = ["."] * lineinfo['TCR'] = ["."] * lineinfo['WE'] = ["."] # <<<<<<<<<<<<<< * lineinfo['WS'] = ["."] * lineinfo['Source'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__WE), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":638 * lineinfo['TCR'] = ["."] * lineinfo['WE'] = ["."] * lineinfo['WS'] = ["."] # <<<<<<<<<<<<<< * lineinfo['Source'] = ["."] * lineinfo['FS'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__WS), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":639 * lineinfo['WE'] = ["."] * lineinfo['WS'] = ["."] * lineinfo['Source'] = ["."] # <<<<<<<<<<<<<< * lineinfo['FS'] = ["."] * lineinfo['BS'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__Source), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":640 * lineinfo['WS'] = ["."] * lineinfo['Source'] = ["."] * lineinfo['FS'] = ["."] # <<<<<<<<<<<<<< * lineinfo['BS'] = ["."] * lineinfo['PP'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__FS), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":641 * lineinfo['Source'] = ["."] * lineinfo['FS'] = ["."] * lineinfo['BS'] = ["."] # <<<<<<<<<<<<<< * lineinfo['PP'] = ["."] * lineinfo['TR'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__BS), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":642 * lineinfo['FS'] = ["."] * lineinfo['BS'] = ["."] * lineinfo['PP'] = ["."] # <<<<<<<<<<<<<< * lineinfo['TR'] = ["."] * lineinfo['NF'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__PP), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":643 * lineinfo['BS'] = ["."] * lineinfo['PP'] = ["."] * lineinfo['TR'] = ["."] # <<<<<<<<<<<<<< * lineinfo['NF'] = ["."] * lineinfo['TCF'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__TR), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":644 * lineinfo['PP'] = ["."] * lineinfo['TR'] = ["."] * lineinfo['NF'] = ["."] # <<<<<<<<<<<<<< * lineinfo['TCF'] = ["."] * lineinfo['NR'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__NF), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":645 * lineinfo['TR'] = ["."] * lineinfo['NF'] = ["."] * lineinfo['TCF'] = ["."] # <<<<<<<<<<<<<< * lineinfo['NR'] = ["."] * lineinfo['TC'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__TCF), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":646 * lineinfo['NF'] = ["."] * lineinfo['TCF'] = ["."] * lineinfo['NR'] = ["."] # <<<<<<<<<<<<<< * lineinfo['TC'] = ["."] * lineinfo['MGOF'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__NR), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":647 * lineinfo['TCF'] = ["."] * lineinfo['NR'] = ["."] * lineinfo['TC'] = ["."] # <<<<<<<<<<<<<< * lineinfo['MGOF'] = ["."] * lineinfo['SbPval'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__TC), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":648 * lineinfo['NR'] = ["."] * lineinfo['TC'] = ["."] * lineinfo['MGOF'] = ["."] # <<<<<<<<<<<<<< * lineinfo['SbPval'] = ["."] * lineinfo['ReadPosRankSum'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__MGOF), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":649 * lineinfo['TC'] = ["."] * lineinfo['MGOF'] = ["."] * lineinfo['SbPval'] = ["."] # <<<<<<<<<<<<<< * lineinfo['ReadPosRankSum'] = ["."] * lineinfo['MQ'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__SbPval), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":650 * lineinfo['MGOF'] = ["."] * lineinfo['SbPval'] = ["."] * lineinfo['ReadPosRankSum'] = ["."] # <<<<<<<<<<<<<< * lineinfo['MQ'] = ["."] * lineinfo['QD'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__ReadPosRankSum), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":651 * lineinfo['SbPval'] = ["."] * lineinfo['ReadPosRankSum'] = ["."] * lineinfo['MQ'] = ["."] # <<<<<<<<<<<<<< * lineinfo['QD'] = ["."] * lineinfo['SC'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__MQ), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":652 * lineinfo['ReadPosRankSum'] = ["."] * lineinfo['MQ'] = ["."] * lineinfo['QD'] = ["."] # <<<<<<<<<<<<<< * lineinfo['SC'] = ["."] * lineinfo['BRF'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__QD), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":653 * lineinfo['MQ'] = ["."] * lineinfo['QD'] = ["."] * lineinfo['SC'] = ["."] # <<<<<<<<<<<<<< * lineinfo['BRF'] = ["."] * lineinfo['HapScore'] = ["."] */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__SC), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":654 * lineinfo['QD'] = ["."] * lineinfo['SC'] = ["."] * lineinfo['BRF'] = ["."] # <<<<<<<<<<<<<< * lineinfo['HapScore'] = ["."] * */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__BRF), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":655 * lineinfo['SC'] = ["."] * lineinfo['BRF'] = ["."] * lineinfo['HapScore'] = ["."] # <<<<<<<<<<<<<< * * # Most of these are empty */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); if (PyDict_SetItem(((PyObject *)__pyx_v_lineinfo), ((PyObject *)__pyx_n_s__HapScore), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "variantcaller.pyx":658 * * # Most of these are empty * theFormat = ['GT:GL:GOF:GQ:NR:NV'] # <<<<<<<<<<<<<< * * vcfDataLine = {'chrom':chrom,'pos':windowStart,'ref':ref,'alt':alt,'id':id,'info':lineinfo,'filter':linefilter,'qual':qual,'format':theFormat} */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_23)); PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_23)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23)); __pyx_v_theFormat = __pyx_t_6; __pyx_t_6 = 0; /* "variantcaller.pyx":660 * theFormat = ['GT:GL:GOF:GQ:NR:NV'] * * vcfDataLine = {'chrom':chrom,'pos':windowStart,'ref':ref,'alt':alt,'id':id,'info':lineinfo,'filter':linefilter,'qual':qual,'format':theFormat} # <<<<<<<<<<<<<< * * for i from 0 <= i < nIndividuals: */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__chrom), ((PyObject *)__pyx_v_chrom)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromLong(__pyx_v_windowStart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__pos), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__ref), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__alt), ((PyObject *)__pyx_v_alt)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__id), __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_v_lineinfo)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__filter), ((PyObject *)__pyx_v_linefilter)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__qual), __pyx_v_qual) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_v_theFormat)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_vcfDataLine = __pyx_t_6; __pyx_t_6 = 0; /* "variantcaller.pyx":662 * vcfDataLine = {'chrom':chrom,'pos':windowStart,'ref':ref,'alt':alt,'id':id,'info':lineinfo,'filter':linefilter,'qual':qual,'format':theFormat} * * for i from 0 <= i < nIndividuals: # <<<<<<<<<<<<<< * * theBuffer = readBuffers[i] */ __pyx_t_13 = __pyx_v_nIndividuals; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_13; __pyx_v_i++) { /* "variantcaller.pyx":664 * 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 = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_readBuffers), __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7cwindow_bamReadBuffer))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theBuffer)); __pyx_v_theBuffer = ((struct __pyx_obj_7cwindow_bamReadBuffer *)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":665 * * theBuffer = readBuffers[i] * thisSample = theBuffer.sample # <<<<<<<<<<<<<< * * # Missing genotype call. Probably due to zero coverage for this individual. */ __pyx_t_6 = ((PyObject *)__pyx_v_theBuffer->sample); __Pyx_INCREF(__pyx_t_6); __Pyx_XDECREF(((PyObject *)__pyx_v_thisSample)); __pyx_v_thisSample = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "variantcaller.pyx":668 * * # Missing genotype call. Probably due to zero coverage for this individual. * if theBuffer.reads.windowEnd - theBuffer.reads.windowStart == 0: # <<<<<<<<<<<<<< * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[-1,-1,-1], GQ=[-1],GOF=[-1],NR=[0], NV=[0]) * else: */ __pyx_t_11 = ((__pyx_v_theBuffer->reads->windowEnd - __pyx_v_theBuffer->reads->windowStart) == 0); if (__pyx_t_11) { /* "variantcaller.pyx":669 * # Missing genotype call. Probably due to zero coverage for this individual. * if theBuffer.reads.windowEnd - theBuffer.reads.windowStart == 0: * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[-1,-1,-1], GQ=[-1],GOF=[-1],NR=[0], NV=[0]) # <<<<<<<<<<<<<< * else: * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[-1,-1,-1], GQ=[-1],GOF=[-1],NR=[theBuffer.reads.windowEnd - theBuffer.reads.windowStart], NV=[0]) */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_24)); PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_24)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__GT), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__GL), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__GQ), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__GOF), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__NR), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__NV), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_v_thisSample), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L17; } /*else*/ { /* "variantcaller.pyx":671 * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[-1,-1,-1], GQ=[-1],GOF=[-1],NR=[0], NV=[0]) * else: * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[-1,-1,-1], GQ=[-1],GOF=[-1],NR=[theBuffer.reads.windowEnd - theBuffer.reads.windowStart], NV=[0]) # <<<<<<<<<<<<<< * * vcfFile.write_data(outputFile, vcfDataLine) */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_24)); PyList_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_24)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24)); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__GT), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__GL), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__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 = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__GQ), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__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 = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__GOF), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong((__pyx_v_theBuffer->reads->windowEnd - __pyx_v_theBuffer->reads->windowStart)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__NR), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__NV), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyDict_SetItem(((PyObject *)__pyx_v_vcfDataLine), ((PyObject *)__pyx_v_thisSample), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; } __pyx_L17:; } /* "variantcaller.pyx":673 * vcfDataLine[thisSample] = dict(GT=[[".", "/", "."]], GL=[-1,-1,-1], GQ=[-1],GOF=[-1],NR=[theBuffer.reads.windowEnd - theBuffer.reads.windowStart], NV=[0]) * * vcfFile.write_data(outputFile, vcfDataLine) # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_vcfFile, __pyx_n_s__write_data); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_outputFile); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_outputFile); __Pyx_GIVEREF(__pyx_v_outputFile); __Pyx_INCREF(((PyObject *)__pyx_v_vcfDataLine)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_vcfDataLine)); __Pyx_GIVEREF(((PyObject *)__pyx_v_vcfDataLine)); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("variantcaller.outputRefCall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_variants); __Pyx_XDECREF((PyObject *)__pyx_v_theBuffer); __Pyx_XDECREF(__pyx_v_genotypes); __Pyx_XDECREF((PyObject *)__pyx_v_genotype); __Pyx_XDECREF((PyObject *)__pyx_v_hap1); __Pyx_XDECREF((PyObject *)__pyx_v_hap2); __Pyx_XDECREF(__pyx_v_qual); __Pyx_XDECREF(__pyx_v_windowSize); __Pyx_XDECREF(__pyx_v_sumOfMapQuals); __Pyx_XDECREF(__pyx_v_tempQual); __Pyx_XDECREF(__pyx_v_maxPost); __Pyx_XDECREF(__pyx_v_maxProbVar); __Pyx_XDECREF(__pyx_v_probRef); __Pyx_XDECREF(__pyx_v_ref); __Pyx_XDECREF(__pyx_v_alt); __Pyx_XDECREF(__pyx_v_id); __Pyx_XDECREF(__pyx_v_linefilter); __Pyx_XDECREF(__pyx_v_lineinfo); __Pyx_XDECREF(__pyx_v_theFormat); __Pyx_XDECREF(__pyx_v_vcfDataLine); __Pyx_XDECREF(__pyx_v_thisSample); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":686 * bamFiles = None * * def __init__(self, fileName, options, regions, continuing=False, samples=None, bamFileNames=None, samplesByID=None, samplesByBAM=None, bamFiles=None, theLocks=None): # <<<<<<<<<<<<<< * """ * Constructor. Store options and output file name */ static PyObject *__pyx_pf_13variantcaller_21PlatypusSingleProcess_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_continuing); PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_continuing); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_continuing); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("variantcaller.PlatypusSingleProcess.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_13variantcaller_21PlatypusSingleProcess_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_13variantcaller_21PlatypusSingleProcess___init__[] = "\n Constructor. Store options and output file name\n "; static PyMethodDef __pyx_mdef_13variantcaller_21PlatypusSingleProcess_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_13variantcaller_21PlatypusSingleProcess_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_13variantcaller_21PlatypusSingleProcess___init__)}; static PyObject *__pyx_pw_13variantcaller_21PlatypusSingleProcess_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fileName = 0; PyObject *__pyx_v_options = 0; PyObject *__pyx_v_regions = 0; PyObject *__pyx_v_continuing = 0; PyObject *__pyx_v_samples = 0; PyObject *__pyx_v_bamFileNames = 0; PyObject *__pyx_v_samplesByID = 0; PyObject *__pyx_v_samplesByBAM = 0; PyObject *__pyx_v_bamFiles = 0; PyObject *__pyx_v_theLocks = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__fileName,&__pyx_n_s__options,&__pyx_n_s__regions,&__pyx_n_s__continuing,&__pyx_n_s__samples,&__pyx_n_s__bamFileNames,&__pyx_n_s__samplesByID,&__pyx_n_s__samplesByBAM,&__pyx_n_s__bamFiles,&__pyx_n_s__theLocks,0}; PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0}; __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self); values[4] = __pyx_dynamic_args->__pyx_arg_continuing; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); values[7] = ((PyObject *)((PyObject *)Py_None)); values[8] = ((PyObject *)((PyObject *)Py_None)); values[9] = ((PyObject *)((PyObject *)Py_None)); values[10] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); 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__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fileName)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 11, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__options)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 11, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__regions)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 11, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__continuing); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bamFileNames); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samplesByID); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samplesByBAM); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bamFiles); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__theLocks); if (value) { values[10] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_fileName = values[1]; __pyx_v_options = values[2]; __pyx_v_regions = values[3]; __pyx_v_continuing = values[4]; __pyx_v_samples = values[5]; __pyx_v_bamFileNames = values[6]; __pyx_v_samplesByID = values[7]; __pyx_v_samplesByBAM = values[8]; __pyx_v_bamFiles = values[9]; __pyx_v_theLocks = values[10]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("variantcaller.PlatypusSingleProcess.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_13variantcaller_21PlatypusSingleProcess___init__(__pyx_self, __pyx_v_self, __pyx_v_fileName, __pyx_v_options, __pyx_v_regions, __pyx_v_continuing, __pyx_v_samples, __pyx_v_bamFileNames, __pyx_v_samplesByID, __pyx_v_samplesByBAM, __pyx_v_bamFiles, __pyx_v_theLocks); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_13variantcaller_21PlatypusSingleProcess___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fileName, PyObject *__pyx_v_options, PyObject *__pyx_v_regions, PyObject *__pyx_v_continuing, PyObject *__pyx_v_samples, PyObject *__pyx_v_bamFileNames, PyObject *__pyx_v_samplesByID, PyObject *__pyx_v_samplesByBAM, PyObject *__pyx_v_bamFiles, PyObject *__pyx_v_theLocks) { struct __pyx_obj_15samtoolsWrapper_Samfile *__pyx_v_theBamFile = 0; PyObject *__pyx_v_theLock = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; int __pyx_t_13; long __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "variantcaller.pyx":690 * Constructor. Store options and output file name * """ * self.options = options # <<<<<<<<<<<<<< * self.fileName = fileName * self.regions = regions */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__options, __pyx_v_options) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":691 * """ * self.options = options * self.fileName = fileName # <<<<<<<<<<<<<< * self.regions = regions * self.continuing = continuing */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__fileName, __pyx_v_fileName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":692 * self.options = options * self.fileName = fileName * self.regions = regions # <<<<<<<<<<<<<< * self.continuing = continuing * */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__regions, __pyx_v_regions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":693 * self.fileName = fileName * self.regions = regions * self.continuing = continuing # <<<<<<<<<<<<<< * * cdef Samfile theBamFile */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__continuing, __pyx_v_continuing) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":697 * cdef Samfile theBamFile * * if bamFiles is not None and theLocks is not None: # <<<<<<<<<<<<<< * for theBamFile,theLock in zip(bamFiles,theLocks): * theBamFile.lock = theLock */ __pyx_t_1 = (__pyx_v_bamFiles != Py_None); if (__pyx_t_1) { __pyx_t_2 = (__pyx_v_theLocks != Py_None); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "variantcaller.pyx":698 * * if bamFiles is not None and theLocks is not None: * for theBamFile,theLock in zip(bamFiles,theLocks): # <<<<<<<<<<<<<< * theBamFile.lock = theLock * */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_bamFiles); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_bamFiles); __Pyx_GIVEREF(__pyx_v_bamFiles); __Pyx_INCREF(__pyx_v_theLocks); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_theLocks); __Pyx_GIVEREF(__pyx_v_theLocks); __pyx_t_5 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_5)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #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 = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_9 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_15samtoolsWrapper_Samfile))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_theBamFile)); __pyx_v_theBamFile = ((struct __pyx_obj_15samtoolsWrapper_Samfile *)__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_v_theLock); __pyx_v_theLock = __pyx_t_9; __pyx_t_9 = 0; /* "variantcaller.pyx":699 * if bamFiles is not None and theLocks is not None: * for theBamFile,theLock in zip(bamFiles,theLocks): * theBamFile.lock = theLock # <<<<<<<<<<<<<< * * # setting the indel error model. currently this is hard-coded */ __Pyx_INCREF(__pyx_v_theLock); __Pyx_GIVEREF(__pyx_v_theLock); __Pyx_GOTREF(__pyx_v_theBamFile->lock); __Pyx_DECREF(__pyx_v_theBamFile->lock); __pyx_v_theBamFile->lock = __pyx_v_theLock; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; /* "variantcaller.pyx":702 * * # setting the indel error model. currently this is hard-coded * self.indelErrorModel = chaplotype.default_indel_error_model # <<<<<<<<<<<<<< * * if self.options.verbosity >= 3: */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__chaplotype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s_25); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__indelErrorModel, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "variantcaller.pyx":704 * self.indelErrorModel = chaplotype.default_indel_error_model * * if self.options.verbosity >= 3: # <<<<<<<<<<<<<< * logger.info("Searching for variants in the following regions: %s" %(self.regions)) * */ __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "variantcaller.pyx":705 * * if self.options.verbosity >= 3: * logger.info("Searching for variants in the following regions: %s" %(self.regions)) # <<<<<<<<<<<<<< * * # Need to load data etc. */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__regions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_26), __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __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 = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L8; } __pyx_L8:; /* "variantcaller.pyx":708 * * # Need to load data etc. * if options.shareBAMFiles == 0 or options.nCPU == 1: # <<<<<<<<<<<<<< * * self.bamFileNames = options.bamFiles */ __pyx_t_9 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__shareBAMFiles); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyObject_RichCompare(__pyx_t_9, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_3) { __pyx_t_5 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__nCPU); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "variantcaller.pyx":710 * if options.shareBAMFiles == 0 or options.nCPU == 1: * * self.bamFileNames = options.bamFiles # <<<<<<<<<<<<<< * * if len(self.bamFileNames) == 1 and not self.bamFileNames[0].lower().endswith(".bam"): */ __pyx_t_9 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__bamFiles); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__bamFileNames, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "variantcaller.pyx":712 * self.bamFileNames = options.bamFiles * * if len(self.bamFileNames) == 1 and not self.bamFileNames[0].lower().endswith(".bam"): # <<<<<<<<<<<<<< * logger.debug("Treating --bamFiles argument, %s as a text file containing a list of BAM file names" %(self.bamFileNames)) * self.bamFileNames = platypusutils.getBAMFileNamesFromTextFile(self.bamFileNames[0]) */ __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__bamFileNames); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = (__pyx_t_6 == 1); if (__pyx_t_2) { __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__bamFileNames); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__lower); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__endswith); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = (!__pyx_t_3); __pyx_t_3 = __pyx_t_1; } else { __pyx_t_3 = __pyx_t_2; } if (__pyx_t_3) { /* "variantcaller.pyx":713 * * if len(self.bamFileNames) == 1 and not self.bamFileNames[0].lower().endswith(".bam"): * logger.debug("Treating --bamFiles argument, %s as a text file containing a list of BAM file names" %(self.bamFileNames)) # <<<<<<<<<<<<<< * self.bamFileNames = platypusutils.getBAMFileNamesFromTextFile(self.bamFileNames[0]) * */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__debug); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__bamFileNames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __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 = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":714 * if len(self.bamFileNames) == 1 and not self.bamFileNames[0].lower().endswith(".bam"): * logger.debug("Treating --bamFiles argument, %s as a text file containing a list of BAM file names" %(self.bamFileNames)) * self.bamFileNames = platypusutils.getBAMFileNamesFromTextFile(self.bamFileNames[0]) # <<<<<<<<<<<<<< * * self.samples,self.samplesByID,self.samplesByBAM,self.bamFiles = platypusutils.getSampleNamesAndLoadIterators(self.bamFileNames, self.regions, options) */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__platypusutils); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s_30); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __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_GetAttr(__pyx_v_self, __pyx_n_s__bamFileNames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__bamFileNames, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10; } __pyx_L10:; /* "variantcaller.pyx":716 * self.bamFileNames = platypusutils.getBAMFileNamesFromTextFile(self.bamFileNames[0]) * * self.samples,self.samplesByID,self.samplesByBAM,self.bamFiles = platypusutils.getSampleNamesAndLoadIterators(self.bamFileNames, self.regions, options) # <<<<<<<<<<<<<< * * # Sample names, bam files etc will have been passed in from the parent process. */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__platypusutils); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s_31); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__bamFileNames); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__regions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 3); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); __pyx_t_9 = PyList_GET_ITEM(sequence, 2); __pyx_t_10 = PyList_GET_ITEM(sequence, 3); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_8,&__pyx_t_4,&__pyx_t_9,&__pyx_t_10}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} *(temps[i]) = item; } #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_8,&__pyx_t_4,&__pyx_t_9,&__pyx_t_10}; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_12)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_11(__pyx_t_12); if (unlikely(!item)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_12), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L12_unpacking_done:; } if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__samples, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__samplesByID, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__samplesByBAM, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__bamFiles, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L9; } /*else*/ { /* "variantcaller.pyx":720 * # Sample names, bam files etc will have been passed in from the parent process. * else: * self.samples = samples # <<<<<<<<<<<<<< * self.bamFileNames = bamFileNames * self.samplesByID = samplesByID */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__samples, __pyx_v_samples) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":721 * else: * self.samples = samples * self.bamFileNames = bamFileNames # <<<<<<<<<<<<<< * self.samplesByID = samplesByID * self.samplesByBAM = samplesByBAM */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__bamFileNames, __pyx_v_bamFileNames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":722 * self.samples = samples * self.bamFileNames = bamFileNames * self.samplesByID = samplesByID # <<<<<<<<<<<<<< * self.samplesByBAM = samplesByBAM * self.bamFiles = bamFiles */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__samplesByID, __pyx_v_samplesByID) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":723 * self.bamFileNames = bamFileNames * self.samplesByID = samplesByID * self.samplesByBAM = samplesByBAM # <<<<<<<<<<<<<< * self.bamFiles = bamFiles * */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__samplesByBAM, __pyx_v_samplesByBAM) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":724 * self.samplesByID = samplesByID * self.samplesByBAM = samplesByBAM * self.bamFiles = bamFiles # <<<<<<<<<<<<<< * * if options.refFile.endswith(".gz") or options.refFile.endswith(".bz2") or options.refFile.endswith(".bgz"): */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__bamFiles, __pyx_v_bamFiles) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L9:; /* "variantcaller.pyx":726 * self.bamFiles = bamFiles * * if options.refFile.endswith(".gz") or options.refFile.endswith(".bz2") or options.refFile.endswith(".bgz"): # <<<<<<<<<<<<<< * logger.error("Reference file-name (%s) looks like a compressed file-name. Please un-compress the reference FASTA file before running Platypus" %(options.refFile)) * raise StandardError, "Invalid reference FASTA file supplied" */ __pyx_t_5 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__refFile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__endswith); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_3) { __pyx_t_5 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__refFile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__endswith); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_2) { __pyx_t_5 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__refFile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__endswith); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = __pyx_t_1; } else { __pyx_t_13 = __pyx_t_2; } __pyx_t_2 = __pyx_t_13; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "variantcaller.pyx":727 * * if options.refFile.endswith(".gz") or options.refFile.endswith(".bz2") or options.refFile.endswith(".bgz"): * logger.error("Reference file-name (%s) looks like a compressed file-name. Please un-compress the reference FASTA file before running Platypus" %(options.refFile)) # <<<<<<<<<<<<<< * raise StandardError, "Invalid reference FASTA file supplied" * */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__refFile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_38), __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __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 = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "variantcaller.pyx":728 * if options.refFile.endswith(".gz") or options.refFile.endswith(".bz2") or options.refFile.endswith(".bgz"): * logger.error("Reference file-name (%s) looks like a compressed file-name. Please un-compress the reference FASTA file before running Platypus" %(options.refFile)) * raise StandardError, "Invalid reference FASTA file supplied" # <<<<<<<<<<<<<< * * self.refFile = fastafile.FastaFile(options.refFile, options.refFile + ".fai") */ __Pyx_Raise(__pyx_builtin_StandardError, ((PyObject *)__pyx_kp_s_39), 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L13; } __pyx_L13:; /* "variantcaller.pyx":730 * raise StandardError, "Invalid reference FASTA file supplied" * * self.refFile = fastafile.FastaFile(options.refFile, options.refFile + ".fai") # <<<<<<<<<<<<<< * * # Set these to sensible values, based on population size */ __pyx_t_9 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__refFile); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__refFile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_40)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9fastafile_FastaFile)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__refFile, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "variantcaller.pyx":733 * * # Set these to sensible values, based on population size * if self.options.maxHaplotypes == -1: # <<<<<<<<<<<<<< * self.options.maxHaplotypes = 257 * */ __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__maxHaplotypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_2) { /* "variantcaller.pyx":734 * # Set these to sensible values, based on population size * if self.options.maxHaplotypes == -1: * self.options.maxHaplotypes = 257 # <<<<<<<<<<<<<< * * self.options.maxHaplotypes = min(257, self.options.maxHaplotypes) */ __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyObject_SetAttr(__pyx_t_10, __pyx_n_s__maxHaplotypes, __pyx_int_257) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L14; } __pyx_L14:; /* "variantcaller.pyx":736 * self.options.maxHaplotypes = 257 * * self.options.maxHaplotypes = min(257, self.options.maxHaplotypes) # <<<<<<<<<<<<<< * self.options.maxGenotypes = min(33153, platypusutils.nCombinationsWithReplacement(self.options.maxHaplotypes, 2)) * #self.options.maxGenotypes = 33153 */ __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__maxHaplotypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_14 = 257; __pyx_t_9 = PyInt_FromLong(__pyx_t_14); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_9, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = __pyx_t_5; } else { __pyx_t_4 = PyInt_FromLong(__pyx_t_14); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_10; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyObject_SetAttr(__pyx_t_10, __pyx_n_s__maxHaplotypes, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "variantcaller.pyx":737 * * self.options.maxHaplotypes = min(257, self.options.maxHaplotypes) * self.options.maxGenotypes = min(33153, platypusutils.nCombinationsWithReplacement(self.options.maxHaplotypes, 2)) # <<<<<<<<<<<<<< * #self.options.maxGenotypes = 33153 * #self.options.maxHaplotypes = min(257, self.options.maxHaplotypes) */ __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__platypusutils); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s_41); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__maxHaplotypes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__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 = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_14 = 33153; __pyx_t_5 = PyInt_FromLong(__pyx_t_14); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_2) { __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = __pyx_t_4; } else { __pyx_t_9 = PyInt_FromLong(__pyx_t_14); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __pyx_t_9; __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_10; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyObject_SetAttr(__pyx_t_10, __pyx_n_s__maxGenotypes, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __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; /* "variantcaller.pyx":741 * #self.options.maxHaplotypes = min(257, self.options.maxHaplotypes) * * logger.debug("Max haplotypes = %s" %(self.options.maxHaplotypes)) # <<<<<<<<<<<<<< * logger.debug("Max genotypes = %s" %(self.options.maxGenotypes)) * */ __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__debug); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__maxHaplotypes); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_42), __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __Pyx_DECREF(__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 = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_10)); __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "variantcaller.pyx":742 * * logger.debug("Max haplotypes = %s" %(self.options.maxHaplotypes)) * logger.debug("Max genotypes = %s" %(self.options.maxGenotypes)) # <<<<<<<<<<<<<< * * # Make sure to set this correctly. When sharing BAM files, this is set in parent process */ __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__debug); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__maxGenotypes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_43), __pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_10)); __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "variantcaller.pyx":745 * * # Make sure to set this correctly. When sharing BAM files, this is set in parent process * if options.shareBAMFiles == 0: # <<<<<<<<<<<<<< * options.nInd = len(set(self.samples)) * */ __pyx_t_10 = PyObject_GetAttr(__pyx_v_options, __pyx_n_s__shareBAMFiles); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "variantcaller.pyx":746 * # Make sure to set this correctly. When sharing BAM files, this is set in parent process * if options.shareBAMFiles == 0: * options.nInd = len(set(self.samples)) # <<<<<<<<<<<<<< * * def run(self): */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_6 = PySet_Size(__pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(__pyx_v_options, __pyx_n_s__nInd, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L15; } __pyx_L15:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("variantcaller.PlatypusSingleProcess.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_theBamFile); __Pyx_XDECREF(__pyx_v_theLock); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_13variantcaller_21PlatypusSingleProcess_3run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_13variantcaller_21PlatypusSingleProcess_2run[] = "\n Run a single Platypus process\n "; static PyMethodDef __pyx_mdef_13variantcaller_21PlatypusSingleProcess_3run = {__Pyx_NAMESTR("run"), (PyCFunction)__pyx_pw_13variantcaller_21PlatypusSingleProcess_3run, METH_O, __Pyx_DOCSTR(__pyx_doc_13variantcaller_21PlatypusSingleProcess_2run)}; static PyObject *__pyx_pw_13variantcaller_21PlatypusSingleProcess_3run(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run (wrapper)", 0); __pyx_r = __pyx_pf_13variantcaller_21PlatypusSingleProcess_2run(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":748 * options.nInd = len(set(self.samples)) * * def run(self): # <<<<<<<<<<<<<< * """ * Run a single Platypus process */ static PyObject *__pyx_pf_13variantcaller_21PlatypusSingleProcess_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { struct __pyx_obj_11cpopulation_Population *__pyx_v_pop = 0; PyObject *__pyx_v_index = NULL; PyObject *__pyx_v_chrom = NULL; PyObject *__pyx_v_start = NULL; PyObject *__pyx_v_end = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); 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("run", 0); /* "variantcaller.pyx":754 * # Cache reference sequence for this region. This should result in a substantial speed-up for * # the fastafile.getSequence function. * self.vcf = pyvcf.VCF() # <<<<<<<<<<<<<< * self.vcf.setheader(vcfHeader + [('platypusOptions', str(self.options))]) * self.vcf.setsamples(sorted(set(self.samples))) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pyvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__VCF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__vcf, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "variantcaller.pyx":755 * # the fastafile.getSequence function. * self.vcf = pyvcf.VCF() * self.vcf.setheader(vcfHeader + [('platypusOptions', str(self.options))]) # <<<<<<<<<<<<<< * self.vcf.setsamples(sorted(set(self.samples))) * self.vcf.setinfo(vcfutils.vcfInfoSignature) */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__vcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__setheader); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__vcfHeader); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 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_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__platypusOptions)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__platypusOptions)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__platypusOptions)); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__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 = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __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 = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":756 * self.vcf = pyvcf.VCF() * self.vcf.setheader(vcfHeader + [('platypusOptions', str(self.options))]) * self.vcf.setsamples(sorted(set(self.samples))) # <<<<<<<<<<<<<< * self.vcf.setinfo(vcfutils.vcfInfoSignature) * self.vcf.setfilter(vcfutils.vcfFilterSignature) */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__vcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__setsamples); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":757 * self.vcf.setheader(vcfHeader + [('platypusOptions', str(self.options))]) * self.vcf.setsamples(sorted(set(self.samples))) * self.vcf.setinfo(vcfutils.vcfInfoSignature) # <<<<<<<<<<<<<< * self.vcf.setfilter(vcfutils.vcfFilterSignature) * self.vcf.setformat(vcfutils.vcfFormatSignature) */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__vcf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__setinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__vcfutils); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__vcfInfoSignature); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "variantcaller.pyx":758 * self.vcf.setsamples(sorted(set(self.samples))) * self.vcf.setinfo(vcfutils.vcfInfoSignature) * self.vcf.setfilter(vcfutils.vcfFilterSignature) # <<<<<<<<<<<<<< * self.vcf.setformat(vcfutils.vcfFormatSignature) * self.windowGenerator = window.WindowGenerator() */ __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__vcf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__setfilter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__vcfutils); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__vcfFilterSignature); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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 = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "variantcaller.pyx":759 * self.vcf.setinfo(vcfutils.vcfInfoSignature) * self.vcf.setfilter(vcfutils.vcfFilterSignature) * self.vcf.setformat(vcfutils.vcfFormatSignature) # <<<<<<<<<<<<<< * self.windowGenerator = window.WindowGenerator() * */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__vcf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setformat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__vcfutils); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__vcfFormatSignature); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":760 * self.vcf.setfilter(vcfutils.vcfFilterSignature) * self.vcf.setformat(vcfutils.vcfFormatSignature) * self.windowGenerator = window.WindowGenerator() # <<<<<<<<<<<<<< * * if self.continuing: */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__window); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__WindowGenerator); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__windowGenerator, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "variantcaller.pyx":762 * self.windowGenerator = window.WindowGenerator() * * if self.continuing: # <<<<<<<<<<<<<< * logger.info("Opening file %s for appending" %(self.fileName)) * self.outputFile = open(self.fileName, 'a') */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__continuing); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":763 * * if self.continuing: * logger.info("Opening file %s for appending" %(self.fileName)) # <<<<<<<<<<<<<< * self.outputFile = open(self.fileName, 'a') * else: */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fileName); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "variantcaller.pyx":764 * if self.continuing: * logger.info("Opening file %s for appending" %(self.fileName)) * self.outputFile = open(self.fileName, 'a') # <<<<<<<<<<<<<< * else: * self.outputFile = open(self.fileName, 'w') */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__open); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fileName); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__a)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__a)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__outputFile, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "variantcaller.pyx":766 * self.outputFile = open(self.fileName, 'a') * else: * self.outputFile = open(self.fileName, 'w') # <<<<<<<<<<<<<< * self.vcf.writeheader(self.outputFile) * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__open); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fileName); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__w)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__w)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__w)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__outputFile, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "variantcaller.pyx":767 * else: * self.outputFile = open(self.fileName, 'w') * self.vcf.writeheader(self.outputFile) # <<<<<<<<<<<<<< * * cdef Population pop = Population(self.options) */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__vcf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__writeheader); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__outputFile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "variantcaller.pyx":769 * self.vcf.writeheader(self.outputFile) * * cdef Population pop = Population(self.options) # <<<<<<<<<<<<<< * * for index,(chrom,start,end) in enumerate(self.regions): */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_11cpopulation_Population)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_pop = ((struct __pyx_obj_11cpopulation_Population *)__pyx_t_2); __pyx_t_2 = 0; /* "variantcaller.pyx":771 * cdef Population pop = Population(self.options) * * for index,(chrom,start,end) in enumerate(self.regions): # <<<<<<<<<<<<<< * * if index % self.options.printEvery == 0: */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__regions); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_7(__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 = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); __pyx_t_9 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 2; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __Pyx_XDECREF(__pyx_v_chrom); __pyx_v_chrom = __pyx_t_1; __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_v_start); __pyx_v_start = __pyx_t_8; __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_v_end); __pyx_v_end = __pyx_t_9; __pyx_t_9 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF(__pyx_v_index); __pyx_v_index = __pyx_t_2; __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; /* "variantcaller.pyx":773 * for index,(chrom,start,end) in enumerate(self.regions): * * if index % self.options.printEvery == 0: # <<<<<<<<<<<<<< * logger.info("Processing region %s:%s-%s. (Only printing this message every %s regions of size %s)" %(chrom, start, end, self.options.printEvery, self.options.bufferSize)) * elif self.options.verbosity >= 3: */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__printEvery); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(__pyx_v_index, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":774 * * if index % self.options.printEvery == 0: * logger.info("Processing region %s:%s-%s. (Only printing this message every %s regions of size %s)" %(chrom, start, end, self.options.printEvery, self.options.bufferSize)) # <<<<<<<<<<<<<< * elif self.options.verbosity >= 3: * logger.info("Processing region %s:%s-%s" %(chrom, start, end)) */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__printEvery); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__bufferSize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_chrom); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); __Pyx_INCREF(__pyx_v_start); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_start); __Pyx_GIVEREF(__pyx_v_start); __Pyx_INCREF(__pyx_v_end); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_end); __Pyx_GIVEREF(__pyx_v_end); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_45), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __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 = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8; } /* "variantcaller.pyx":775 * if index % self.options.printEvery == 0: * logger.info("Processing region %s:%s-%s. (Only printing this message every %s regions of size %s)" %(chrom, start, end, self.options.printEvery, self.options.bufferSize)) * elif self.options.verbosity >= 3: # <<<<<<<<<<<<<< * logger.info("Processing region %s:%s-%s" %(chrom, start, end)) * else: */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__verbosity); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "variantcaller.pyx":776 * logger.info("Processing region %s:%s-%s. (Only printing this message every %s regions of size %s)" %(chrom, start, end, self.options.printEvery, self.options.bufferSize)) * elif self.options.verbosity >= 3: * logger.info("Processing region %s:%s-%s" %(chrom, start, end)) # <<<<<<<<<<<<<< * else: * pass */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_chrom); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); __Pyx_INCREF(__pyx_v_start); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start); __Pyx_GIVEREF(__pyx_v_start); __Pyx_INCREF(__pyx_v_end); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end); __Pyx_GIVEREF(__pyx_v_end); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __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 = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8; } /*else*/ { } __pyx_L8:; /* "variantcaller.pyx":780 * pass * * callVariantsInRegion(chrom, start, end, self.bamFiles, self.refFile, self.indelErrorModel, self.options, self.windowGenerator, self.outputFile, self.vcf, self.samples, self.samplesByID, self.samplesByBAM, pop) # <<<<<<<<<<<<<< * * self.outputFile.close() */ if (!(likely(PyBytes_CheckExact(__pyx_v_chrom))||((__pyx_v_chrom) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_chrom)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_v_chrom; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_v_start); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_v_end); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__bamFiles); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__refFile); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_9fastafile_FastaFile))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__indelErrorModel); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (!(likely(PyDict_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__options); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__windowGenerator); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__outputFile); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__vcf); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__samples); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (!(likely(PyList_CheckExact(__pyx_t_17))||((__pyx_t_17) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_17)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__samplesByID); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (!(likely(PyDict_CheckExact(__pyx_t_18))||((__pyx_t_18) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_18)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__samplesByBAM); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); if (!(likely(PyDict_CheckExact(__pyx_t_19))||((__pyx_t_19) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_19)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_f_13variantcaller_callVariantsInRegion(((PyObject*)__pyx_t_4), __pyx_t_12, __pyx_t_13, __pyx_t_1, ((struct __pyx_obj_9fastafile_FastaFile *)__pyx_t_9), ((PyObject*)__pyx_t_8), __pyx_t_10, __pyx_t_14, __pyx_t_15, __pyx_t_16, ((PyObject*)__pyx_t_17), ((PyObject*)__pyx_t_18), ((PyObject*)__pyx_t_19), __pyx_v_pop); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "variantcaller.pyx":782 * callVariantsInRegion(chrom, start, end, self.bamFiles, self.refFile, self.indelErrorModel, self.options, self.windowGenerator, self.outputFile, self.vcf, self.samples, self.samplesByID, self.samplesByBAM, pop) * * self.outputFile.close() # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__outputFile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__close); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __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("variantcaller.PlatypusSingleProcess.run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pop); __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_chrom); __Pyx_XDECREF(__pyx_v_start); __Pyx_XDECREF(__pyx_v_end); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":791 * multi-process job. * """ * def __init__(self, fileName, options, regions, continuing=False, samples=None, bamFileNames=None, samplesByID=None, samplesByBAM=None, bamFiles=None, theLocks=None): # <<<<<<<<<<<<<< * """ * Constructor. Store options and output file name */ static PyObject *__pyx_pf_13variantcaller_20PlatypusMultiProcess_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_continuing); PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_continuing); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_continuing); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __Pyx_INCREF(((PyObject *)Py_None)); PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)Py_None)); __Pyx_GIVEREF(((PyObject *)Py_None)); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("variantcaller.PlatypusMultiProcess.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_13variantcaller_20PlatypusMultiProcess_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_13variantcaller_20PlatypusMultiProcess___init__[] = "\n Constructor. Store options and output file name\n "; static PyMethodDef __pyx_mdef_13variantcaller_20PlatypusMultiProcess_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_13variantcaller_20PlatypusMultiProcess_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_13variantcaller_20PlatypusMultiProcess___init__)}; static PyObject *__pyx_pw_13variantcaller_20PlatypusMultiProcess_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fileName = 0; PyObject *__pyx_v_options = 0; PyObject *__pyx_v_regions = 0; PyObject *__pyx_v_continuing = 0; PyObject *__pyx_v_samples = 0; PyObject *__pyx_v_bamFileNames = 0; PyObject *__pyx_v_samplesByID = 0; PyObject *__pyx_v_samplesByBAM = 0; PyObject *__pyx_v_bamFiles = 0; PyObject *__pyx_v_theLocks = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__fileName,&__pyx_n_s__options,&__pyx_n_s__regions,&__pyx_n_s__continuing,&__pyx_n_s__samples,&__pyx_n_s__bamFileNames,&__pyx_n_s__samplesByID,&__pyx_n_s__samplesByBAM,&__pyx_n_s__bamFiles,&__pyx_n_s__theLocks,0}; PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0}; __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self); values[4] = __pyx_dynamic_args->__pyx_arg_continuing; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); values[7] = ((PyObject *)((PyObject *)Py_None)); values[8] = ((PyObject *)((PyObject *)Py_None)); values[9] = ((PyObject *)((PyObject *)Py_None)); values[10] = ((PyObject *)((PyObject *)Py_None)); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); 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__self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fileName)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 11, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__options)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 11, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__regions)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 11, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__continuing); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bamFileNames); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samplesByID); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samplesByBAM); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bamFiles); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__theLocks); if (value) { values[10] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_fileName = values[1]; __pyx_v_options = values[2]; __pyx_v_regions = values[3]; __pyx_v_continuing = values[4]; __pyx_v_samples = values[5]; __pyx_v_bamFileNames = values[6]; __pyx_v_samplesByID = values[7]; __pyx_v_samplesByBAM = values[8]; __pyx_v_bamFiles = values[9]; __pyx_v_theLocks = values[10]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("variantcaller.PlatypusMultiProcess.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_13variantcaller_20PlatypusMultiProcess___init__(__pyx_self, __pyx_v_self, __pyx_v_fileName, __pyx_v_options, __pyx_v_regions, __pyx_v_continuing, __pyx_v_samples, __pyx_v_bamFileNames, __pyx_v_samplesByID, __pyx_v_samplesByBAM, __pyx_v_bamFiles, __pyx_v_theLocks); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_13variantcaller_20PlatypusMultiProcess___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fileName, PyObject *__pyx_v_options, PyObject *__pyx_v_regions, PyObject *__pyx_v_continuing, PyObject *__pyx_v_samples, PyObject *__pyx_v_bamFileNames, PyObject *__pyx_v_samplesByID, PyObject *__pyx_v_samplesByBAM, PyObject *__pyx_v_bamFiles, PyObject *__pyx_v_theLocks) { 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("__init__", 0); /* "variantcaller.pyx":795 * Constructor. Store options and output file name * """ * multiprocessing.Process.__init__(self) # <<<<<<<<<<<<<< * self.singleProcess = PlatypusSingleProcess(fileName, options, regions, continuing, samples, bamFileNames, samplesByID, samplesByBAM, bamFiles, theLocks) * */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__multiprocessing); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__Process); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __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 = 795; __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; /* "variantcaller.pyx":796 * """ * multiprocessing.Process.__init__(self) * self.singleProcess = PlatypusSingleProcess(fileName, options, regions, continuing, samples, bamFileNames, samplesByID, samplesByBAM, bamFiles, theLocks) # <<<<<<<<<<<<<< * * def run(self): */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_47); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_fileName); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fileName); __Pyx_GIVEREF(__pyx_v_fileName); __Pyx_INCREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); __Pyx_INCREF(__pyx_v_regions); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_regions); __Pyx_GIVEREF(__pyx_v_regions); __Pyx_INCREF(__pyx_v_continuing); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_continuing); __Pyx_GIVEREF(__pyx_v_continuing); __Pyx_INCREF(__pyx_v_samples); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_samples); __Pyx_GIVEREF(__pyx_v_samples); __Pyx_INCREF(__pyx_v_bamFileNames); PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_bamFileNames); __Pyx_GIVEREF(__pyx_v_bamFileNames); __Pyx_INCREF(__pyx_v_samplesByID); PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_v_samplesByID); __Pyx_GIVEREF(__pyx_v_samplesByID); __Pyx_INCREF(__pyx_v_samplesByBAM); PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_v_samplesByBAM); __Pyx_GIVEREF(__pyx_v_samplesByBAM); __Pyx_INCREF(__pyx_v_bamFiles); PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_v_bamFiles); __Pyx_GIVEREF(__pyx_v_bamFiles); __Pyx_INCREF(__pyx_v_theLocks); PyTuple_SET_ITEM(__pyx_t_2, 9, __pyx_v_theLocks); __Pyx_GIVEREF(__pyx_v_theLocks); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__singleProcess, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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("variantcaller.PlatypusMultiProcess.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_13variantcaller_20PlatypusMultiProcess_3run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_13variantcaller_20PlatypusMultiProcess_2run[] = "\n Run a single Platypus process\n "; static PyMethodDef __pyx_mdef_13variantcaller_20PlatypusMultiProcess_3run = {__Pyx_NAMESTR("run"), (PyCFunction)__pyx_pw_13variantcaller_20PlatypusMultiProcess_3run, METH_O, __Pyx_DOCSTR(__pyx_doc_13variantcaller_20PlatypusMultiProcess_2run)}; static PyObject *__pyx_pw_13variantcaller_20PlatypusMultiProcess_3run(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run (wrapper)", 0); __pyx_r = __pyx_pf_13variantcaller_20PlatypusMultiProcess_2run(__pyx_self, ((PyObject *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "variantcaller.pyx":798 * self.singleProcess = PlatypusSingleProcess(fileName, options, regions, continuing, samples, bamFileNames, samplesByID, samplesByBAM, bamFiles, theLocks) * * def run(self): # <<<<<<<<<<<<<< * """ * Run a single Platypus process */ static PyObject *__pyx_pf_13variantcaller_20PlatypusMultiProcess_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("run", 0); /* "variantcaller.pyx":802 * Run a single Platypus process * """ * self.singleProcess.run() # <<<<<<<<<<<<<< * * ################################################################################################## */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__singleProcess); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__run); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_AddTraceback("variantcaller.PlatypusMultiProcess.run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __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 PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, __Pyx_NAMESTR("variantcaller"), __Pyx_DOCSTR(__pyx_k_48), /* 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_n_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 1}, {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0}, {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0}, {&__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_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0}, {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, {&__pyx_n_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 1}, {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0}, {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, {&__pyx_n_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 1}, {&__pyx_n_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 1}, {&__pyx_n_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 1}, {&__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_39, __pyx_k_39, sizeof(__pyx_k_39), 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_n_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 1}, {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0}, {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0}, {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, {&__pyx_n_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 1}, {&__pyx_n_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 1}, {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 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_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 0}, {&__pyx_n_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 1}, {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, {&__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__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 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__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__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__N, __pyx_k__N, sizeof(__pyx_k__N), 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__PLATYPUS_VERSION, __pyx_k__PLATYPUS_VERSION, sizeof(__pyx_k__PLATYPUS_VERSION), 0, 0, 1, 1}, {&__pyx_n_s__PP, __pyx_k__PP, sizeof(__pyx_k__PP), 0, 0, 1, 1}, {&__pyx_n_s__Process, __pyx_k__Process, sizeof(__pyx_k__Process), 0, 0, 1, 1}, {&__pyx_n_s__QD, __pyx_k__QD, sizeof(__pyx_k__QD), 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__SeqLength, __pyx_k__SeqLength, sizeof(__pyx_k__SeqLength), 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__StandardError, __pyx_k__StandardError, sizeof(__pyx_k__StandardError), 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__VCF, __pyx_k__VCF, sizeof(__pyx_k__VCF), 0, 0, 1, 1}, {&__pyx_n_s__Variants, __pyx_k__Variants, sizeof(__pyx_k__Variants), 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__WindowGenerator, __pyx_k__WindowGenerator, sizeof(__pyx_k__WindowGenerator), 0, 0, 1, 1}, {&__pyx_n_s__WindowsAndVariants, __pyx_k__WindowsAndVariants, sizeof(__pyx_k__WindowsAndVariants), 0, 0, 1, 1}, {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 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__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1}, {&__pyx_n_s__alt, __pyx_k__alt, sizeof(__pyx_k__alt), 0, 0, 1, 1}, {&__pyx_n_s__assemble, __pyx_k__assemble, sizeof(__pyx_k__assemble), 0, 0, 1, 1}, {&__pyx_n_s__assembleAll, __pyx_k__assembleAll, sizeof(__pyx_k__assembleAll), 0, 0, 1, 1}, {&__pyx_n_s__assemblyRegionSize, __pyx_k__assemblyRegionSize, sizeof(__pyx_k__assemblyRegionSize), 0, 0, 1, 1}, {&__pyx_n_s__bamFileNames, __pyx_k__bamFileNames, sizeof(__pyx_k__bamFileNames), 0, 0, 1, 1}, {&__pyx_n_s__bamFiles, __pyx_k__bamFiles, sizeof(__pyx_k__bamFiles), 0, 0, 1, 1}, {&__pyx_n_s__bisect, __pyx_k__bisect, sizeof(__pyx_k__bisect), 0, 0, 1, 1}, {&__pyx_n_s__bufferSize, __pyx_k__bufferSize, sizeof(__pyx_k__bufferSize), 0, 0, 1, 1}, {&__pyx_n_s__chaplotype, __pyx_k__chaplotype, sizeof(__pyx_k__chaplotype), 0, 0, 1, 1}, {&__pyx_n_s__chrom, __pyx_k__chrom, sizeof(__pyx_k__chrom), 0, 0, 1, 1}, {&__pyx_n_s__chromosome, __pyx_k__chromosome, sizeof(__pyx_k__chromosome), 0, 0, 1, 1}, {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1}, {&__pyx_n_s__compressReads, __pyx_k__compressReads, sizeof(__pyx_k__compressReads), 0, 0, 1, 1}, {&__pyx_n_s__continuing, __pyx_k__continuing, sizeof(__pyx_k__continuing), 0, 0, 1, 1}, {&__pyx_n_s__date, __pyx_k__date, sizeof(__pyx_k__date), 0, 0, 1, 1}, {&__pyx_n_s__datetime, __pyx_k__datetime, sizeof(__pyx_k__datetime), 0, 0, 1, 1}, {&__pyx_n_s__debug, __pyx_k__debug, sizeof(__pyx_k__debug), 0, 0, 1, 1}, {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1}, {&__pyx_n_s__endPos, __pyx_k__endPos, sizeof(__pyx_k__endPos), 0, 0, 1, 1}, {&__pyx_n_s__endswith, __pyx_k__endswith, sizeof(__pyx_k__endswith), 0, 0, 1, 1}, {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, {&__pyx_n_s__error, __pyx_k__error, sizeof(__pyx_k__error), 0, 0, 1, 1}, {&__pyx_n_s__exception, __pyx_k__exception, sizeof(__pyx_k__exception), 0, 0, 1, 1}, {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1}, {&__pyx_n_s__fileDate, __pyx_k__fileDate, sizeof(__pyx_k__fileDate), 0, 0, 1, 1}, {&__pyx_n_s__fileName, __pyx_k__fileName, sizeof(__pyx_k__fileName), 0, 0, 1, 1}, {&__pyx_n_s__filter, __pyx_k__filter, sizeof(__pyx_k__filter), 0, 0, 1, 1}, {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, {&__pyx_n_s__fromtimestamp, __pyx_k__fromtimestamp, sizeof(__pyx_k__fromtimestamp), 0, 0, 1, 1}, {&__pyx_n_s__genIndels, __pyx_k__genIndels, sizeof(__pyx_k__genIndels), 0, 0, 1, 1}, {&__pyx_n_s__genSNPs, __pyx_k__genSNPs, sizeof(__pyx_k__genSNPs), 0, 0, 1, 1}, {&__pyx_n_s__genotype, __pyx_k__genotype, sizeof(__pyx_k__genotype), 0, 0, 1, 1}, {&__pyx_n_s__genotypes, __pyx_k__genotypes, sizeof(__pyx_k__genotypes), 0, 0, 1, 1}, {&__pyx_n_s__getLogger, __pyx_k__getLogger, sizeof(__pyx_k__getLogger), 0, 0, 1, 1}, {&__pyx_n_s__getVariantsFromBAMs, __pyx_k__getVariantsFromBAMs, sizeof(__pyx_k__getVariantsFromBAMs), 0, 0, 1, 1}, {&__pyx_n_s__hap1, __pyx_k__hap1, sizeof(__pyx_k__hap1), 0, 0, 1, 1}, {&__pyx_n_s__hap2, __pyx_k__hap2, sizeof(__pyx_k__hap2), 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__indelErrorModel, __pyx_k__indelErrorModel, sizeof(__pyx_k__indelErrorModel), 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__isZeroCoverageBAM, __pyx_k__isZeroCoverageBAM, sizeof(__pyx_k__isZeroCoverageBAM), 0, 0, 1, 1}, {&__pyx_n_s__linefilter, __pyx_k__linefilter, sizeof(__pyx_k__linefilter), 0, 0, 1, 1}, {&__pyx_n_s__lineinfo, __pyx_k__lineinfo, sizeof(__pyx_k__lineinfo), 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__lower, __pyx_k__lower, sizeof(__pyx_k__lower), 0, 0, 1, 1}, {&__pyx_n_s__max, __pyx_k__max, sizeof(__pyx_k__max), 0, 0, 1, 1}, {&__pyx_n_s__maxEMIterations, __pyx_k__maxEMIterations, sizeof(__pyx_k__maxEMIterations), 0, 0, 1, 1}, {&__pyx_n_s__maxGenotypes, __pyx_k__maxGenotypes, sizeof(__pyx_k__maxGenotypes), 0, 0, 1, 1}, {&__pyx_n_s__maxHaplotypes, __pyx_k__maxHaplotypes, sizeof(__pyx_k__maxHaplotypes), 0, 0, 1, 1}, {&__pyx_n_s__maxPost, __pyx_k__maxPost, sizeof(__pyx_k__maxPost), 0, 0, 1, 1}, {&__pyx_n_s__maxProbVar, __pyx_k__maxProbVar, sizeof(__pyx_k__maxProbVar), 0, 0, 1, 1}, {&__pyx_n_s__maxReads, __pyx_k__maxReads, sizeof(__pyx_k__maxReads), 0, 0, 1, 1}, {&__pyx_n_s__maxSize, __pyx_k__maxSize, sizeof(__pyx_k__maxSize), 0, 0, 1, 1}, {&__pyx_n_s__maxVariants, __pyx_k__maxVariants, sizeof(__pyx_k__maxVariants), 0, 0, 1, 1}, {&__pyx_n_s__minBaseQual, __pyx_k__minBaseQual, sizeof(__pyx_k__minBaseQual), 0, 0, 1, 1}, {&__pyx_n_s__minFlank, __pyx_k__minFlank, sizeof(__pyx_k__minFlank), 0, 0, 1, 1}, {&__pyx_n_s__minLikelihood, __pyx_k__minLikelihood, sizeof(__pyx_k__minLikelihood), 0, 0, 1, 1}, {&__pyx_n_s__minMapQual, __pyx_k__minMapQual, sizeof(__pyx_k__minMapQual), 0, 0, 1, 1}, {&__pyx_n_s__minReads, __pyx_k__minReads, sizeof(__pyx_k__minReads), 0, 0, 1, 1}, {&__pyx_n_s__minReadsForSample, __pyx_k__minReadsForSample, sizeof(__pyx_k__minReadsForSample), 0, 0, 1, 1}, {&__pyx_n_s__multiprocessing, __pyx_k__multiprocessing, sizeof(__pyx_k__multiprocessing), 0, 0, 1, 1}, {&__pyx_n_s__nCPU, __pyx_k__nCPU, sizeof(__pyx_k__nCPU), 0, 0, 1, 1}, {&__pyx_n_s__nInd, __pyx_k__nInd, sizeof(__pyx_k__nInd), 0, 0, 1, 1}, {&__pyx_n_s__nIndividuals, __pyx_k__nIndividuals, sizeof(__pyx_k__nIndividuals), 0, 0, 1, 1}, {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1}, {&__pyx_n_s__open, __pyx_k__open, sizeof(__pyx_k__open), 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__outputRefCall, __pyx_k__outputRefCall, sizeof(__pyx_k__outputRefCall), 0, 0, 1, 1}, {&__pyx_n_s__outputRefCalls, __pyx_k__outputRefCalls, sizeof(__pyx_k__outputRefCalls), 0, 0, 1, 1}, {&__pyx_n_s__phredPValue, __pyx_k__phredPValue, sizeof(__pyx_k__phredPValue), 0, 0, 1, 1}, {&__pyx_n_s__platypusOptions, __pyx_k__platypusOptions, sizeof(__pyx_k__platypusOptions), 0, 0, 1, 1}, {&__pyx_n_s__platypusutils, __pyx_k__platypusutils, sizeof(__pyx_k__platypusutils), 0, 0, 1, 1}, {&__pyx_n_s__ploidy, __pyx_k__ploidy, sizeof(__pyx_k__ploidy), 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__printEvery, __pyx_k__printEvery, sizeof(__pyx_k__printEvery), 0, 0, 1, 1}, {&__pyx_n_s__probRef, __pyx_k__probRef, sizeof(__pyx_k__probRef), 0, 0, 1, 1}, {&__pyx_n_s__pyvcf, __pyx_k__pyvcf, sizeof(__pyx_k__pyvcf), 0, 0, 1, 1}, {&__pyx_n_s__qual, __pyx_k__qual, sizeof(__pyx_k__qual), 0, 0, 1, 1}, {&__pyx_n_s__qualBinSize, __pyx_k__qualBinSize, sizeof(__pyx_k__qualBinSize), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__readBuffers, __pyx_k__readBuffers, sizeof(__pyx_k__readBuffers), 0, 0, 1, 1}, {&__pyx_n_s__readsThisSample, __pyx_k__readsThisSample, sizeof(__pyx_k__readsThisSample), 0, 0, 1, 1}, {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1}, {&__pyx_n_s__refFile, __pyx_k__refFile, sizeof(__pyx_k__refFile), 0, 0, 1, 1}, {&__pyx_n_s__refIndex, __pyx_k__refIndex, sizeof(__pyx_k__refIndex), 0, 0, 1, 1}, {&__pyx_n_s__regions, __pyx_k__regions, sizeof(__pyx_k__regions), 0, 0, 1, 1}, {&__pyx_n_s__rlen, __pyx_k__rlen, sizeof(__pyx_k__rlen), 0, 0, 1, 1}, {&__pyx_n_s__run, __pyx_k__run, sizeof(__pyx_k__run), 0, 0, 1, 1}, {&__pyx_n_s__samples, __pyx_k__samples, sizeof(__pyx_k__samples), 0, 0, 1, 1}, {&__pyx_n_s__samplesByBAM, __pyx_k__samplesByBAM, sizeof(__pyx_k__samplesByBAM), 0, 0, 1, 1}, {&__pyx_n_s__samplesByID, __pyx_k__samplesByID, sizeof(__pyx_k__samplesByID), 0, 0, 1, 1}, {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1}, {&__pyx_n_s__setfilter, __pyx_k__setfilter, sizeof(__pyx_k__setfilter), 0, 0, 1, 1}, {&__pyx_n_s__setformat, __pyx_k__setformat, sizeof(__pyx_k__setformat), 0, 0, 1, 1}, {&__pyx_n_s__setheader, __pyx_k__setheader, sizeof(__pyx_k__setheader), 0, 0, 1, 1}, {&__pyx_n_s__setinfo, __pyx_k__setinfo, sizeof(__pyx_k__setinfo), 0, 0, 1, 1}, {&__pyx_n_s__setsamples, __pyx_k__setsamples, sizeof(__pyx_k__setsamples), 0, 0, 1, 1}, {&__pyx_n_s__shareBAMFiles, __pyx_k__shareBAMFiles, sizeof(__pyx_k__shareBAMFiles), 0, 0, 1, 1}, {&__pyx_n_s__singleProcess, __pyx_k__singleProcess, sizeof(__pyx_k__singleProcess), 0, 0, 1, 1}, {&__pyx_n_s__sorted, __pyx_k__sorted, sizeof(__pyx_k__sorted), 0, 0, 1, 1}, {&__pyx_n_s__source, __pyx_k__source, sizeof(__pyx_k__source), 0, 0, 1, 1}, {&__pyx_n_s__sourceFile, __pyx_k__sourceFile, sizeof(__pyx_k__sourceFile), 0, 0, 1, 1}, {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1}, {&__pyx_n_s__startPos, __pyx_k__startPos, sizeof(__pyx_k__startPos), 0, 0, 1, 1}, {&__pyx_n_s__sumOfMapQuals, __pyx_k__sumOfMapQuals, sizeof(__pyx_k__sumOfMapQuals), 0, 0, 1, 1}, {&__pyx_n_s__tempQual, __pyx_k__tempQual, sizeof(__pyx_k__tempQual), 0, 0, 1, 1}, {&__pyx_n_s__theBamFile, __pyx_k__theBamFile, sizeof(__pyx_k__theBamFile), 0, 0, 1, 1}, {&__pyx_n_s__theBuffer, __pyx_k__theBuffer, sizeof(__pyx_k__theBuffer), 0, 0, 1, 1}, {&__pyx_n_s__theFormat, __pyx_k__theFormat, sizeof(__pyx_k__theFormat), 0, 0, 1, 1}, {&__pyx_n_s__theLock, __pyx_k__theLock, sizeof(__pyx_k__theLock), 0, 0, 1, 1}, {&__pyx_n_s__theLocks, __pyx_k__theLocks, sizeof(__pyx_k__theLocks), 0, 0, 1, 1}, {&__pyx_n_s__thisLikelihood, __pyx_k__thisLikelihood, sizeof(__pyx_k__thisLikelihood), 0, 0, 1, 1}, {&__pyx_n_s__thisSample, __pyx_k__thisSample, sizeof(__pyx_k__thisSample), 0, 0, 1, 1}, {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1}, {&__pyx_n_s__useIndelErrorModel, __pyx_k__useIndelErrorModel, sizeof(__pyx_k__useIndelErrorModel), 0, 0, 1, 1}, {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1}, {&__pyx_n_s__variantcaller, __pyx_k__variantcaller, sizeof(__pyx_k__variantcaller), 0, 0, 1, 1}, {&__pyx_n_s__variants, __pyx_k__variants, sizeof(__pyx_k__variants), 0, 0, 1, 1}, {&__pyx_n_s__variantutils, __pyx_k__variantutils, sizeof(__pyx_k__variantutils), 0, 0, 1, 1}, {&__pyx_n_s__vcf, __pyx_k__vcf, sizeof(__pyx_k__vcf), 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__vcfHeader, __pyx_k__vcfHeader, sizeof(__pyx_k__vcfHeader), 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__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1}, {&__pyx_n_s__warning, __pyx_k__warning, sizeof(__pyx_k__warning), 0, 0, 1, 1}, {&__pyx_n_s__window, __pyx_k__window, sizeof(__pyx_k__window), 0, 0, 1, 1}, {&__pyx_n_s__windowEnd, __pyx_k__windowEnd, sizeof(__pyx_k__windowEnd), 0, 0, 1, 1}, {&__pyx_n_s__windowGenerator, __pyx_k__windowGenerator, sizeof(__pyx_k__windowGenerator), 0, 0, 1, 1}, {&__pyx_n_s__windowIndex, __pyx_k__windowIndex, sizeof(__pyx_k__windowIndex), 0, 0, 1, 1}, {&__pyx_n_s__windowSize, __pyx_k__windowSize, sizeof(__pyx_k__windowSize), 0, 0, 1, 1}, {&__pyx_n_s__windowStart, __pyx_k__windowStart, sizeof(__pyx_k__windowStart), 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__writeheader, __pyx_k__writeheader, sizeof(__pyx_k__writeheader), 0, 0, 1, 1}, {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1}, {&__pyx_n_s__zip, __pyx_k__zip, sizeof(__pyx_k__zip), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __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 = 265; __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 = 421; __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 = 421; __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 = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_StandardError = __Pyx_GetName(__pyx_b, __pyx_n_s__StandardError); if (!__pyx_builtin_StandardError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __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 = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_zip = __Pyx_GetName(__pyx_b, __pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __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); /* "variantcaller.pyx":712 * self.bamFileNames = options.bamFiles * * if len(self.bamFileNames) == 1 and not self.bamFileNames[0].lower().endswith(".bam"): # <<<<<<<<<<<<<< * logger.debug("Treating --bamFiles argument, %s as a text file containing a list of BAM file names" %(self.bamFileNames)) * self.bamFileNames = platypusutils.getBAMFileNamesFromTextFile(self.bamFileNames[0]) */ __pyx_k_tuple_28 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_28); __Pyx_INCREF(((PyObject *)__pyx_kp_s_27)); PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, ((PyObject *)__pyx_kp_s_27)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_27)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28)); /* "variantcaller.pyx":726 * self.bamFiles = bamFiles * * if options.refFile.endswith(".gz") or options.refFile.endswith(".bz2") or options.refFile.endswith(".bgz"): # <<<<<<<<<<<<<< * logger.error("Reference file-name (%s) looks like a compressed file-name. Please un-compress the reference FASTA file before running Platypus" %(options.refFile)) * raise StandardError, "Invalid reference FASTA file supplied" */ __pyx_k_tuple_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_33); __Pyx_INCREF(((PyObject *)__pyx_kp_s_32)); PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_kp_s_32)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_35); __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_34)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); __pyx_k_tuple_37 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_37); __Pyx_INCREF(((PyObject *)__pyx_kp_s_36)); PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_kp_s_36)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_36)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37)); /* "variantcaller.pyx":50 * from platypusutils import open * * logger = logging.getLogger("Log") # <<<<<<<<<<<<<< * vcfHeader = [('fileDate',datetime.date.fromtimestamp(time.time())), ('source','Platypus_Version_%s' %(platypusutils.PLATYPUS_VERSION))] * */ __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_49); __Pyx_INCREF(((PyObject *)__pyx_n_s__Log)); PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_n_s__Log)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Log)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49)); /* "variantcaller.pyx":545 * ################################################################################################### * * def outputRefCall(bytes chrom, Population pop, vcfFile, FastaFile refFile, outputFile, int windowIndex, dict window, options, list readBuffers): # <<<<<<<<<<<<<< * """ * """ */ __pyx_k_tuple_51 = PyTuple_New(43); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_51); __Pyx_INCREF(((PyObject *)__pyx_n_s__chrom)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_n_s__chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chrom)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pop)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 1, ((PyObject *)__pyx_n_s__pop)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pop)); __Pyx_INCREF(((PyObject *)__pyx_n_s__vcfFile)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 2, ((PyObject *)__pyx_n_s__vcfFile)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vcfFile)); __Pyx_INCREF(((PyObject *)__pyx_n_s__refFile)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 3, ((PyObject *)__pyx_n_s__refFile)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__refFile)); __Pyx_INCREF(((PyObject *)__pyx_n_s__outputFile)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 4, ((PyObject *)__pyx_n_s__outputFile)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outputFile)); __Pyx_INCREF(((PyObject *)__pyx_n_s__windowIndex)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 5, ((PyObject *)__pyx_n_s__windowIndex)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__windowIndex)); __Pyx_INCREF(((PyObject *)__pyx_n_s__window)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 6, ((PyObject *)__pyx_n_s__window)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__window)); __Pyx_INCREF(((PyObject *)__pyx_n_s__options)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 7, ((PyObject *)__pyx_n_s__options)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__options)); __Pyx_INCREF(((PyObject *)__pyx_n_s__readBuffers)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 8, ((PyObject *)__pyx_n_s__readBuffers)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__readBuffers)); __Pyx_INCREF(((PyObject *)__pyx_n_s__windowStart)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 9, ((PyObject *)__pyx_n_s__windowStart)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__windowStart)); __Pyx_INCREF(((PyObject *)__pyx_n_s__windowEnd)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 10, ((PyObject *)__pyx_n_s__windowEnd)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__windowEnd)); __Pyx_INCREF(((PyObject *)__pyx_n_s__variants)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 11, ((PyObject *)__pyx_n_s__variants)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__variants)); __Pyx_INCREF(((PyObject *)__pyx_n_s__nIndividuals)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 12, ((PyObject *)__pyx_n_s__nIndividuals)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nIndividuals)); __Pyx_INCREF(((PyObject *)__pyx_n_s__theBuffer)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 13, ((PyObject *)__pyx_n_s__theBuffer)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theBuffer)); __Pyx_INCREF(((PyObject *)__pyx_n_s__genotypes)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 14, ((PyObject *)__pyx_n_s__genotypes)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genotypes)); __Pyx_INCREF(((PyObject *)__pyx_n_s__refIndex)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 15, ((PyObject *)__pyx_n_s__refIndex)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__refIndex)); __Pyx_INCREF(((PyObject *)__pyx_n_s__genotype)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 16, ((PyObject *)__pyx_n_s__genotype)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genotype)); __Pyx_INCREF(((PyObject *)__pyx_n_s__hap1)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 17, ((PyObject *)__pyx_n_s__hap1)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hap1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__hap2)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 18, ((PyObject *)__pyx_n_s__hap2)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hap2)); __Pyx_INCREF(((PyObject *)__pyx_n_s__index)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 19, ((PyObject *)__pyx_n_s__index)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index)); __Pyx_INCREF(((PyObject *)__pyx_n_s__minLikelihood)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 20, ((PyObject *)__pyx_n_s__minLikelihood)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minLikelihood)); __Pyx_INCREF(((PyObject *)__pyx_n_s__isZeroCoverageBAM)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 21, ((PyObject *)__pyx_n_s__isZeroCoverageBAM)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__isZeroCoverageBAM)); __Pyx_INCREF(((PyObject *)__pyx_n_s__minReadsForSample)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 22, ((PyObject *)__pyx_n_s__minReadsForSample)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minReadsForSample)); __Pyx_INCREF(((PyObject *)__pyx_n_s__readsThisSample)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 23, ((PyObject *)__pyx_n_s__readsThisSample)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__readsThisSample)); __Pyx_INCREF(((PyObject *)__pyx_n_s__thisLikelihood)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 24, ((PyObject *)__pyx_n_s__thisLikelihood)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__thisLikelihood)); __Pyx_INCREF(((PyObject *)__pyx_n_s__phredPValue)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 25, ((PyObject *)__pyx_n_s__phredPValue)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__phredPValue)); __Pyx_INCREF(((PyObject *)__pyx_n_s__qual)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 26, ((PyObject *)__pyx_n_s__qual)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__qual)); __Pyx_INCREF(((PyObject *)__pyx_n_s__windowSize)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 27, ((PyObject *)__pyx_n_s__windowSize)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__windowSize)); __Pyx_INCREF(((PyObject *)__pyx_n_s__sumOfMapQuals)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 28, ((PyObject *)__pyx_n_s__sumOfMapQuals)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sumOfMapQuals)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tempQual)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 29, ((PyObject *)__pyx_n_s__tempQual)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tempQual)); __Pyx_INCREF(((PyObject *)__pyx_n_s__maxPost)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 30, ((PyObject *)__pyx_n_s__maxPost)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__maxPost)); __Pyx_INCREF(((PyObject *)__pyx_n_s__maxProbVar)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 31, ((PyObject *)__pyx_n_s__maxProbVar)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__maxProbVar)); __Pyx_INCREF(((PyObject *)__pyx_n_s__probRef)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 32, ((PyObject *)__pyx_n_s__probRef)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__probRef)); __Pyx_INCREF(((PyObject *)__pyx_n_s__ref)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 33, ((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_51, 34, ((PyObject *)__pyx_n_s__alt)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alt)); __Pyx_INCREF(((PyObject *)__pyx_n_s__id)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 35, ((PyObject *)__pyx_n_s__id)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__id)); __Pyx_INCREF(((PyObject *)__pyx_n_s__linefilter)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 36, ((PyObject *)__pyx_n_s__linefilter)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__linefilter)); __Pyx_INCREF(((PyObject *)__pyx_n_s__lineinfo)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 37, ((PyObject *)__pyx_n_s__lineinfo)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lineinfo)); __Pyx_INCREF(((PyObject *)__pyx_n_s__theFormat)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 38, ((PyObject *)__pyx_n_s__theFormat)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theFormat)); __Pyx_INCREF(((PyObject *)__pyx_n_s__vcfDataLine)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 39, ((PyObject *)__pyx_n_s__vcfDataLine)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vcfDataLine)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 40, ((PyObject *)__pyx_n_s__i)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); __Pyx_INCREF(((PyObject *)__pyx_n_s__thisSample)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 41, ((PyObject *)__pyx_n_s__thisSample)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__thisSample)); __Pyx_INCREF(((PyObject *)__pyx_n_s__v)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 42, ((PyObject *)__pyx_n_s__v)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); __pyx_k_codeobj_52 = (PyObject*)__Pyx_PyCode_New(9, 0, 43, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_53, __pyx_n_s__outputRefCall, 545, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":686 * bamFiles = None * * def __init__(self, fileName, options, regions, continuing=False, samples=None, bamFileNames=None, samplesByID=None, samplesByBAM=None, bamFiles=None, theLocks=None): # <<<<<<<<<<<<<< * """ * Constructor. Store options and output file name */ __pyx_k_tuple_54 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_54); __Pyx_INCREF(((PyObject *)__pyx_n_s__self)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 0, ((PyObject *)__pyx_n_s__self)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fileName)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 1, ((PyObject *)__pyx_n_s__fileName)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fileName)); __Pyx_INCREF(((PyObject *)__pyx_n_s__options)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 2, ((PyObject *)__pyx_n_s__options)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__options)); __Pyx_INCREF(((PyObject *)__pyx_n_s__regions)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 3, ((PyObject *)__pyx_n_s__regions)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__regions)); __Pyx_INCREF(((PyObject *)__pyx_n_s__continuing)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 4, ((PyObject *)__pyx_n_s__continuing)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__continuing)); __Pyx_INCREF(((PyObject *)__pyx_n_s__samples)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 5, ((PyObject *)__pyx_n_s__samples)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__samples)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bamFileNames)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 6, ((PyObject *)__pyx_n_s__bamFileNames)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bamFileNames)); __Pyx_INCREF(((PyObject *)__pyx_n_s__samplesByID)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 7, ((PyObject *)__pyx_n_s__samplesByID)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__samplesByID)); __Pyx_INCREF(((PyObject *)__pyx_n_s__samplesByBAM)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 8, ((PyObject *)__pyx_n_s__samplesByBAM)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__samplesByBAM)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bamFiles)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 9, ((PyObject *)__pyx_n_s__bamFiles)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bamFiles)); __Pyx_INCREF(((PyObject *)__pyx_n_s__theLocks)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 10, ((PyObject *)__pyx_n_s__theLocks)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theLocks)); __Pyx_INCREF(((PyObject *)__pyx_n_s__theBamFile)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 11, ((PyObject *)__pyx_n_s__theBamFile)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theBamFile)); __Pyx_INCREF(((PyObject *)__pyx_n_s__theLock)); PyTuple_SET_ITEM(__pyx_k_tuple_54, 12, ((PyObject *)__pyx_n_s__theLock)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theLock)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54)); __pyx_k_codeobj_55 = (PyObject*)__Pyx_PyCode_New(11, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_53, __pyx_n_s____init__, 686, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":748 * options.nInd = len(set(self.samples)) * * def run(self): # <<<<<<<<<<<<<< * """ * Run a single Platypus process */ __pyx_k_tuple_56 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_56); __Pyx_INCREF(((PyObject *)__pyx_n_s__self)); PyTuple_SET_ITEM(__pyx_k_tuple_56, 0, ((PyObject *)__pyx_n_s__self)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pop)); PyTuple_SET_ITEM(__pyx_k_tuple_56, 1, ((PyObject *)__pyx_n_s__pop)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pop)); __Pyx_INCREF(((PyObject *)__pyx_n_s__index)); PyTuple_SET_ITEM(__pyx_k_tuple_56, 2, ((PyObject *)__pyx_n_s__index)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index)); __Pyx_INCREF(((PyObject *)__pyx_n_s__chrom)); PyTuple_SET_ITEM(__pyx_k_tuple_56, 3, ((PyObject *)__pyx_n_s__chrom)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chrom)); __Pyx_INCREF(((PyObject *)__pyx_n_s__start)); PyTuple_SET_ITEM(__pyx_k_tuple_56, 4, ((PyObject *)__pyx_n_s__start)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start)); __Pyx_INCREF(((PyObject *)__pyx_n_s__end)); PyTuple_SET_ITEM(__pyx_k_tuple_56, 5, ((PyObject *)__pyx_n_s__end)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__end)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); __pyx_k_codeobj_57 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_53, __pyx_n_s__run, 748, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":791 * multi-process job. * """ * def __init__(self, fileName, options, regions, continuing=False, samples=None, bamFileNames=None, samplesByID=None, samplesByBAM=None, bamFiles=None, theLocks=None): # <<<<<<<<<<<<<< * """ * Constructor. Store options and output file name */ __pyx_k_tuple_59 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_59); __Pyx_INCREF(((PyObject *)__pyx_n_s__self)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_n_s__self)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self)); __Pyx_INCREF(((PyObject *)__pyx_n_s__fileName)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 1, ((PyObject *)__pyx_n_s__fileName)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fileName)); __Pyx_INCREF(((PyObject *)__pyx_n_s__options)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 2, ((PyObject *)__pyx_n_s__options)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__options)); __Pyx_INCREF(((PyObject *)__pyx_n_s__regions)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 3, ((PyObject *)__pyx_n_s__regions)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__regions)); __Pyx_INCREF(((PyObject *)__pyx_n_s__continuing)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 4, ((PyObject *)__pyx_n_s__continuing)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__continuing)); __Pyx_INCREF(((PyObject *)__pyx_n_s__samples)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 5, ((PyObject *)__pyx_n_s__samples)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__samples)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bamFileNames)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 6, ((PyObject *)__pyx_n_s__bamFileNames)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bamFileNames)); __Pyx_INCREF(((PyObject *)__pyx_n_s__samplesByID)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 7, ((PyObject *)__pyx_n_s__samplesByID)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__samplesByID)); __Pyx_INCREF(((PyObject *)__pyx_n_s__samplesByBAM)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 8, ((PyObject *)__pyx_n_s__samplesByBAM)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__samplesByBAM)); __Pyx_INCREF(((PyObject *)__pyx_n_s__bamFiles)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 9, ((PyObject *)__pyx_n_s__bamFiles)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bamFiles)); __Pyx_INCREF(((PyObject *)__pyx_n_s__theLocks)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 10, ((PyObject *)__pyx_n_s__theLocks)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theLocks)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); __pyx_k_codeobj_60 = (PyObject*)__Pyx_PyCode_New(11, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_53, __pyx_n_s____init__, 791, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":798 * self.singleProcess = PlatypusSingleProcess(fileName, options, regions, continuing, samples, bamFileNames, samplesByID, samplesByBAM, bamFiles, theLocks) * * def run(self): # <<<<<<<<<<<<<< * """ * Run a single Platypus process */ __pyx_k_tuple_61 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_61); __Pyx_INCREF(((PyObject *)__pyx_n_s__self)); PyTuple_SET_ITEM(__pyx_k_tuple_61, 0, ((PyObject *)__pyx_n_s__self)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); __pyx_k_codeobj_62 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_53, __pyx_n_s__run, 798, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __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_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__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_257 = PyInt_FromLong(257); if (unlikely(!__pyx_int_257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_2500 = PyInt_FromLong(2500); if (unlikely(!__pyx_int_2500)) {__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 initvariantcaller(void); /*proto*/ PyMODINIT_FUNC initvariantcaller(void) #else PyMODINIT_FUNC PyInit_variantcaller(void); /*proto*/ PyMODINIT_FUNC PyInit_variantcaller(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; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = 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_variantcaller(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("variantcaller"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_48), 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, "variantcaller")) { if (unlikely(PyDict_SetItemString(modules, "variantcaller", __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_variantcaller) { 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 ---*/ /*--- Type init code ---*/ /*--- 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, "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;} if (__Pyx_ImportFunction(__pyx_t_2, "loadBAMData", (void (**)(void))&__pyx_f_13platypusutils_loadBAMData, "PyObject *(PyObject *, PyObject *, int, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, char *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_2, "leftNormaliseIndel", (void (**)(void))&__pyx_f_13platypusutils_leftNormaliseIndel, "struct __pyx_obj_7variant_Variant *(struct __pyx_obj_7variant_Variant *, struct __pyx_obj_9fastafile_FastaFile *, 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; __pyx_t_3 = __Pyx_ImportModule("vcfutils"); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_3, "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_ImportFunction(__pyx_t_3, "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;} Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_ImportModule("variantFilter"); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_4, "filterVariants", (void (**)(void))&__pyx_f_13variantFilter_filterVariants, "PyObject *(PyObject *, struct __pyx_obj_9fastafile_FastaFile *, int, int, int, int, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_4, "filterVariantsInWindow", (void (**)(void))&__pyx_f_13variantFilter_filterVariantsInWindow, "void (PyObject *, PyObject *, int, int, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PyObject *, struct __pyx_obj_10chaplotype_Haplotype *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_4, "filterVariantsByCoverage", (void (**)(void))&__pyx_f_13variantFilter_filterVariantsByCoverage, "void (PyObject *, PyObject *, int, int, struct __pyx_obj_9fastafile_FastaFile *, PyObject *, PyObject *, struct __pyx_obj_10chaplotype_Haplotype *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_4, "getHaplotypesInWindow", (void (**)(void))&__pyx_f_13variantFilter_getHaplotypesInWindow, "PyObject *(PyObject *, int, struct __pyx_obj_9fastafile_FastaFile *, int, int, int, int, int, int, int, int, int, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_4, "padVariants", (void (**)(void))&__pyx_f_13variantFilter_padVariants, "PyObject *(PyObject *, struct __pyx_obj_9fastafile_FastaFile *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_ImportModule("cgenotype"); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_5, "generateAllGenotypesFromHaplotypeList", (void (**)(void))&__pyx_f_9cgenotype_generateAllGenotypesFromHaplotypeList, "PyObject *(int, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_ImportModule("assembler"); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_6, "assembleReadsAndDetectVariants", (void (**)(void))&__pyx_f_9assembler_assembleReadsAndDetectVariants, "PyObject *(char *, int, int, int, int, PyObject *, char *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_6); __pyx_t_6 = 0; /*--- Execution code ---*/ /* "variantcaller.pyx":8 * from __future__ import division * * import logging # <<<<<<<<<<<<<< * import multiprocessing * import window */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__logging), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__logging, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":9 * * import logging * import multiprocessing # <<<<<<<<<<<<<< * import window * import pyvcf */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__multiprocessing), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__multiprocessing, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":10 * import logging * import multiprocessing * import window # <<<<<<<<<<<<<< * import pyvcf * import variantutils */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__window), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__window, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":11 * import multiprocessing * import window * import pyvcf # <<<<<<<<<<<<<< * import variantutils * import time */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__pyvcf), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pyvcf, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":12 * import window * import pyvcf * import variantutils # <<<<<<<<<<<<<< * import time * import datetime */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__variantutils), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__variantutils, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":13 * import pyvcf * import variantutils * import time # <<<<<<<<<<<<<< * import datetime * import platypusutils */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__time, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":14 * import variantutils * import time * import datetime # <<<<<<<<<<<<<< * import platypusutils * import vcfutils */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__datetime, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":15 * import time * import datetime * import platypusutils # <<<<<<<<<<<<<< * import vcfutils * import chaplotype */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__platypusutils), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__platypusutils, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":16 * import datetime * import platypusutils * import vcfutils # <<<<<<<<<<<<<< * import chaplotype * */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__vcfutils), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__vcfutils, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":17 * import platypusutils * import vcfutils * import chaplotype # <<<<<<<<<<<<<< * * cimport platypusutils */ __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__chaplotype), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__chaplotype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":45 * from platypusutils cimport loadBAMData * from assembler cimport assembleReadsAndDetectVariants * from bisect import bisect # <<<<<<<<<<<<<< * from platypusutils cimport leftNormaliseIndel * from platypusutils cimport betaBinomialCDF */ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_n_s__bisect)); PyList_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__bisect)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bisect)); __pyx_t_8 = __Pyx_Import(((PyObject *)__pyx_n_s__bisect), ((PyObject *)__pyx_t_7), -1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__bisect); if (__pyx_t_7 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__bisect); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bisect, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "variantcaller.pyx":48 * from platypusutils cimport leftNormaliseIndel * from platypusutils cimport betaBinomialCDF * from platypusutils import open # <<<<<<<<<<<<<< * * logger = logging.getLogger("Log") */ __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_n_s__open)); PyList_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_n_s__open)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__open)); __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__platypusutils), ((PyObject *)__pyx_t_8), -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__open); if (__pyx_t_8 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__open); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__open, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":50 * from platypusutils import open * * logger = logging.getLogger("Log") # <<<<<<<<<<<<<< * vcfHeader = [('fileDate',datetime.date.fromtimestamp(time.time())), ('source','Platypus_Version_%s' %(platypusutils.PLATYPUS_VERSION))] * */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__logging); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__getLogger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s__logger, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":51 * * logger = logging.getLogger("Log") * vcfHeader = [('fileDate',datetime.date.fromtimestamp(time.time())), ('source','Platypus_Version_%s' %(platypusutils.PLATYPUS_VERSION))] # <<<<<<<<<<<<<< * * ################################################################################################### */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__date); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__fromtimestamp); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__time); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__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 = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_n_s__fileDate)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_n_s__fileDate)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fileDate)); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__platypusutils); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__PLATYPUS_VERSION); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_50), __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_n_s__source)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__source)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__source)); PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); PyList_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_9 = 0; __pyx_t_7 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s__vcfHeader, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "variantcaller.pyx":545 * ################################################################################################### * * def outputRefCall(bytes chrom, Population pop, vcfFile, FastaFile refFile, outputFile, int windowIndex, dict window, options, list readBuffers): # <<<<<<<<<<<<<< * """ * """ */ __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_13variantcaller_1outputRefCall, NULL, __pyx_n_s__variantcaller); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__outputRefCall, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "variantcaller.pyx":677 * ################################################################################################### * * class PlatypusSingleProcess(object): # <<<<<<<<<<<<<< * """ * Simple class to represent a single Platypus process. */ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); /* "variantcaller.pyx":681 * Simple class to represent a single Platypus process. * """ * samples = None # <<<<<<<<<<<<<< * samplesByID = None * samplesByBAM = None */ if (PyObject_SetItem(__pyx_t_8, __pyx_n_s__samples, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":682 * """ * samples = None * samplesByID = None # <<<<<<<<<<<<<< * samplesByBAM = None * bamFiles = None */ if (PyObject_SetItem(__pyx_t_8, __pyx_n_s__samplesByID, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":683 * samples = None * samplesByID = None * samplesByBAM = None # <<<<<<<<<<<<<< * bamFiles = None * */ if (PyObject_SetItem(__pyx_t_8, __pyx_n_s__samplesByBAM, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":684 * samplesByID = None * samplesByBAM = None * bamFiles = None # <<<<<<<<<<<<<< * * def __init__(self, fileName, options, regions, continuing=False, samples=None, bamFileNames=None, samplesByID=None, samplesByBAM=None, bamFiles=None, theLocks=None): */ if (PyObject_SetItem(__pyx_t_8, __pyx_n_s__bamFiles, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "variantcaller.pyx":686 * bamFiles = None * * def __init__(self, fileName, options, regions, continuing=False, samples=None, bamFileNames=None, samplesByID=None, samplesByBAM=None, bamFiles=None, theLocks=None): # <<<<<<<<<<<<<< * """ * Constructor. Store options and output file name */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_13variantcaller_21PlatypusSingleProcess_1__init__, 0, NULL, __pyx_n_s__variantcaller, ((PyObject *)__pyx_k_codeobj_55)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_7)->__pyx_arg_continuing = __pyx_t_9; __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_7, __pyx_pf_13variantcaller_21PlatypusSingleProcess_4__defaults__); if (PyObject_SetItem(__pyx_t_8, __pyx_n_s____init__, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":748 * options.nInd = len(set(self.samples)) * * def run(self): # <<<<<<<<<<<<<< * """ * Run a single Platypus process */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_13variantcaller_21PlatypusSingleProcess_3run, 0, NULL, __pyx_n_s__variantcaller, ((PyObject *)__pyx_k_codeobj_57)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_8, __pyx_n_s__run, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "variantcaller.pyx":677 * ################################################################################################### * * class PlatypusSingleProcess(object): # <<<<<<<<<<<<<< * """ * Simple class to represent a single Platypus process. */ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); if (PyDict_SetItemString(((PyObject *)__pyx_t_8), "__doc__", ((PyObject *)__pyx_kp_s_58)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_CreateClass(((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_8), __pyx_n_s_47, __pyx_n_s__variantcaller); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s_47, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "variantcaller.pyx":786 * ################################################################################################### * * class PlatypusMultiProcess(multiprocessing.Process): # <<<<<<<<<<<<<< * """ * Simple class to represent a single Platypus process, which is run as part of a */ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); /* "variantcaller.pyx":791 * multi-process job. * """ * def __init__(self, fileName, options, regions, continuing=False, samples=None, bamFileNames=None, samplesByID=None, samplesByBAM=None, bamFiles=None, theLocks=None): # <<<<<<<<<<<<<< * """ * Constructor. Store options and output file name */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_13variantcaller_20PlatypusMultiProcess_1__init__, 0, NULL, __pyx_n_s__variantcaller, ((PyObject *)__pyx_k_codeobj_60)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults1), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_9)->__pyx_arg_continuing = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_13variantcaller_20PlatypusMultiProcess_4__defaults__); if (PyObject_SetItem(__pyx_t_8, __pyx_n_s____init__, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "variantcaller.pyx":798 * self.singleProcess = PlatypusSingleProcess(fileName, options, regions, continuing, samples, bamFileNames, samplesByID, samplesByBAM, bamFiles, theLocks) * * def run(self): # <<<<<<<<<<<<<< * """ * Run a single Platypus process */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_13variantcaller_20PlatypusMultiProcess_3run, 0, NULL, __pyx_n_s__variantcaller, ((PyObject *)__pyx_k_codeobj_62)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetItem(__pyx_t_8, __pyx_n_s__run, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "variantcaller.pyx":786 * ################################################################################################### * * class PlatypusMultiProcess(multiprocessing.Process): # <<<<<<<<<<<<<< * """ * Simple class to represent a single Platypus process, which is run as part of a */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__multiprocessing); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__Process); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__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 = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItemString(((PyObject *)__pyx_t_8), "__doc__", ((PyObject *)__pyx_kp_s_63)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_CreateClass(((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_8), __pyx_n_s_64, __pyx_n_s__variantcaller); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_s_64, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "variantcaller.pyx":1 * """ # <<<<<<<<<<<<<< * This module contains the top-level variant-calling * code, including a VariantCaller class. */ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 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); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); if (__pyx_m) { __Pyx_AddTraceback("init variantcaller", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init variantcaller"); } __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 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 int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; #endif Py_INCREF(local_type); Py_INCREF(local_value); Py_INCREF(local_tb); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } 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 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 } #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_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 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_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(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->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } 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 void __Pyx_RaiseImportError(PyObject *name) { #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_ImportError, "cannot import name %.230s", PyString_AsString(name)); #else PyErr_Format(PyExc_ImportError, "cannot import name %S", name); #endif } static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { PyObject *metaclass; #if PY_MAJOR_VERSION < 3 if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = PyObject_GetAttrString(base, (char *)"__class__"); if (!metaclass) { PyErr_Clear(); metaclass = (PyObject*) Py_TYPE(base); } } else { metaclass = (PyObject *) &PyClass_Type; } #else if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { PyObject *base = PyTuple_GET_ITEM(bases, 0); metaclass = (PyObject*) Py_TYPE(base); } else { metaclass = (PyObject *) &PyType_Type; } #endif Py_INCREF(metaclass); return metaclass; } static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, PyObject *modname) { PyObject *result; PyObject *metaclass; if (PyDict_SetItemString(dict, "__module__", modname) < 0) return NULL; metaclass = PyDict_GetItemString(dict, "__metaclass__"); if (metaclass) { Py_INCREF(metaclass); } else { metaclass = __Pyx_FindPy2Metaclass(bases); } result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); Py_DECREF(metaclass); return result; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (op->func_doc == NULL && op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif } if (op->func_doc == 0) { Py_INCREF(Py_None); return Py_None; } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) op->func_doc = Py_None; /* Mark as deleted */ else op->func_doc = value; Py_INCREF(op->func_doc); Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (op->func_name == NULL) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (value == NULL || !PyUnicode_Check(value)) { #else if (value == NULL || !PyString_Check(value)) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (op->func_dict == NULL) { op->func_dict = PyDict_New(); if (op->func_dict == NULL) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (value == NULL) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op) { PyObject* dict = PyModule_GetDict(__pyx_m); Py_XINCREF(dict); return dict; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { if (op->defaults_tuple) { Py_INCREF(op->defaults_tuple); return op->defaults_tuple; } if (op->defaults_getter) { PyObject *res = op->defaults_getter((PyObject *) op); if (res) { Py_INCREF(res); op->defaults_tuple = res; } return res; } Py_INCREF(Py_None); return Py_None; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ #define PY_WRITE_RESTRICTED WRITE_RESTRICTED #endif static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject *closure, PyObject *module, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; op->func_weakreflist = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; op->func_doc = NULL; op->func_classobj = NULL; Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_getter = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (m->func_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_doc); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { PyObject *func_name = __Pyx_CyFunction_get_name(op); #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", func_name, (void *)op); #else return PyString_FromFormat("", PyString_AsString(func_name), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); Py_ssize_t size; switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { case METH_VARARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 0) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%zd given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL) || PyDict_Size(kw) == 0) { size = PyTuple_GET_SIZE(arg); if (size == 1) return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%zd given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __Pyx_CyFunction_Call, /*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_CyFunction_traverse, /*tp_traverse*/ (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ 0, /*tp_richcompare*/ offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_CyFunction_methods, /*tp_methods*/ __pyx_CyFunction_members, /*tp_members*/ __pyx_CyFunction_getsets, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ __Pyx_CyFunction_descr_get, /*tp_descr_get*/ 0, /*tp_descr_set*/ offsetof(__pyx_CyFunctionObject, func_dict),/*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*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif if (PyType_Ready(&__pyx_CyFunctionType_type) < 0) return -1; __pyx_CyFunctionType = &__pyx_CyFunctionType_type; return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, sizeof(size)); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } 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 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); } } 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; } #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 */