_qsassemble.c 128 KB
Newer Older
1
/* Generated by Cython 0.12 on Sat Jun 19 12:17:43 2010 */
2 3 4 5 6 7

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
8
#else
9 10 11 12 13 14 15 16 17
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#if PY_VERSION_HEX < 0x02040000
  #define METH_COEXIST 0
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
18
  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
#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 PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
#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)

#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#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_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
77 78 79 80 81 82 83
  #define PyString_Type                PyUnicode_Type
  #define PyString_CheckExact          PyUnicode_CheckExact
#else
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_CheckExact           PyString_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
84 85 86 87 88 89 90 91 92 93 94 95 96 97
  #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
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
98
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
99 100
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
101
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#else
  #define _USE_MATH_DEFINES
#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
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#include <math.h>
#define __PYX_HAVE_API__obitools__align___qsassemble
#include "stdlib.h"
#include "string.h"

#ifdef __GNUC__
#define INLINE __inline__
#elif _WIN32
#define INLINE __inline
#else
#define INLINE 
#endif

153
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*/
154 155 156 157 158 159 160 161 162 163 164 165 166 167


/* Type Conversion Predeclarations */

#if PY_MAJOR_VERSION < 3
#define __Pyx_PyBytes_FromString          PyString_FromString
#define __Pyx_PyBytes_FromStringAndSize   PyString_FromStringAndSize
#define __Pyx_PyBytes_AsString            PyString_AsString
#else
#define __Pyx_PyBytes_FromString          PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize   PyBytes_FromStringAndSize
#define __Pyx_PyBytes_AsString            PyBytes_AsString
#endif

168 169 170
#define __Pyx_PyBytes_FromUString(s)      __Pyx_PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)        ((unsigned char*) __Pyx_PyBytes_AsString(s))

171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

#if !defined(T_PYSSIZET)
#if PY_VERSION_HEX < 0x02050000
#define T_PYSSIZET T_INT
#elif !defined(T_LONGLONG)
#define T_PYSSIZET \
        ((sizeof(Py_ssize_t) == sizeof(int))  ? T_INT  : \
        ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
#else
#define T_PYSSIZET \
        ((sizeof(Py_ssize_t) == sizeof(int))          ? T_INT      : \
        ((sizeof(Py_ssize_t) == sizeof(long))         ? T_LONG     : \
        ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
#endif
#endif

190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223

#if !defined(T_ULONGLONG)
#define __Pyx_T_UNSIGNED_INT(x) \
        ((sizeof(x) == sizeof(unsigned char))  ? T_UBYTE : \
        ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
        ((sizeof(x) == sizeof(unsigned int))   ? T_UINT : \
        ((sizeof(x) == sizeof(unsigned long))  ? T_ULONG : -1))))
#else
#define __Pyx_T_UNSIGNED_INT(x) \
        ((sizeof(x) == sizeof(unsigned char))  ? T_UBYTE : \
        ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
        ((sizeof(x) == sizeof(unsigned int))   ? T_UINT : \
        ((sizeof(x) == sizeof(unsigned long))  ? T_ULONG : \
        ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
#endif
#if !defined(T_LONGLONG)
#define __Pyx_T_SIGNED_INT(x) \
        ((sizeof(x) == sizeof(char))  ? T_BYTE : \
        ((sizeof(x) == sizeof(short)) ? T_SHORT : \
        ((sizeof(x) == sizeof(int))   ? T_INT : \
        ((sizeof(x) == sizeof(long))  ? T_LONG : -1))))
#else
#define __Pyx_T_SIGNED_INT(x) \
        ((sizeof(x) == sizeof(char))  ? T_BYTE : \
        ((sizeof(x) == sizeof(short)) ? T_SHORT : \
        ((sizeof(x) == sizeof(int))   ? T_INT : \
        ((sizeof(x) == sizeof(long))  ? T_LONG : \
        ((sizeof(x) == sizeof(PY_LONG_LONG))   ? T_LONGLONG : -1)))))
#endif

#define __Pyx_T_FLOATING(x) \
        ((sizeof(x) == sizeof(float)) ? T_FLOAT : \
        ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))

224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
#if !defined(T_SIZET)
#if !defined(T_ULONGLONG)
#define T_SIZET \
        ((sizeof(size_t) == sizeof(unsigned int))  ? T_UINT  : \
        ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
#else
#define T_SIZET \
        ((sizeof(size_t) == sizeof(unsigned int))          ? T_UINT      : \
        ((sizeof(size_t) == sizeof(unsigned long))         ? T_ULONG     : \
        ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
#endif
#endif

static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : 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;
261
static PyObject *__pyx_empty_bytes;
262 263 264 265 266 267 268 269 270
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;


/* Type declarations */

271
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":11
272 273 274 275 276 277 278 279 280 281 282 283
 *     void memcpy(void* s1, void* s2, int n)
 * 
 * cdef struct AlignCell :             # <<<<<<<<<<<<<<
 *     double score
 *     int   path
 */

struct __pyx_t_8obitools_5align_8_dynamic_AlignCell {
  double score;
  int path;
};

284
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":15
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
 *     int   path
 * 
 * cdef struct AlignMatrix :             # <<<<<<<<<<<<<<
 *     AlignCell*  matrix
 *     int*        bestVJump
 */

struct __pyx_t_8obitools_5align_8_dynamic_AlignMatrix {
  struct __pyx_t_8obitools_5align_8_dynamic_AlignCell *matrix;
  int *bestVJump;
  int *bestHJump;
  int msize;
  int vsize;
  int hsize;
};

301
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":24
302 303 304 305 306 307 308 309 310 311 312 313
 * 
 * 
 * cdef AlignMatrix* allocateMatrix(int hsize, int vsize,AlignMatrix *matrix=?)             # <<<<<<<<<<<<<<
 * 
 * cdef void freeMatrix(AlignMatrix* matrix)
 */

struct __pyx_opt_args_8obitools_5align_8_dynamic_allocateMatrix {
  int __pyx_n;
  struct __pyx_t_8obitools_5align_8_dynamic_AlignMatrix *matrix;
};

314
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":31
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329
 * 
 * 
 * cdef struct alignSequence:             # <<<<<<<<<<<<<<
 *     long    length
 *     long    buffsize
 */

struct __pyx_t_8obitools_5align_8_dynamic_alignSequence {
  long length;
  long buffsize;
  int hasQuality;
  char *sequence;
  double *quality;
};

330
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":38
331 332 333 334 335 336 337 338 339 340 341 342
 *     double* quality
 * 
 * cdef alignSequence* allocateSequence(object bioseq, alignSequence* seq=?)             # <<<<<<<<<<<<<<
 * 
 * cdef void freeSequence(alignSequence* seq)
 */

struct __pyx_opt_args_8obitools_5align_8_dynamic_allocateSequence {
  int __pyx_n;
  struct __pyx_t_8obitools_5align_8_dynamic_alignSequence *seq;
};

343
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":42
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
 * cdef void freeSequence(alignSequence* seq)
 * 
 * cdef struct alignPath:             # <<<<<<<<<<<<<<
 *     long length
 *     long buffsize
 */

struct __pyx_t_8obitools_5align_8_dynamic_alignPath {
  long length;
  long buffsize;
  long vStart;
  long hStart;
  long *path;
};

359
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":49
360 361 362 363 364 365 366 367 368 369 370 371
 *     long *path
 * 
 * cdef alignPath* allocatePath(long l1,long l2,alignPath* path=?)             # <<<<<<<<<<<<<<
 * 
 * cdef void reversePath(alignPath* path)
 */

struct __pyx_opt_args_8obitools_5align_8_dynamic_allocatePath {
  int __pyx_n;
  struct __pyx_t_8obitools_5align_8_dynamic_alignPath *path;
};

372 373
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":62
 * cpdef unsigned char encodeBase(unsigned char lettre)
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
 * 
 * cdef class DynamicProgramming:             # <<<<<<<<<<<<<<
 *     cdef AlignMatrix* matrix
 * 
 */

struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming {
  PyObject_HEAD
  struct __pyx_vtabstruct_8obitools_5align_8_dynamic_DynamicProgramming *__pyx_vtab;
  struct __pyx_t_8obitools_5align_8_dynamic_AlignMatrix *matrix;
  PyObject *horizontalSeq;
  PyObject *verticalSeq;
  struct __pyx_t_8obitools_5align_8_dynamic_alignSequence *hSeq;
  struct __pyx_t_8obitools_5align_8_dynamic_alignSequence *vSeq;
  struct __pyx_t_8obitools_5align_8_dynamic_alignPath *path;
  double _opengap;
  double _extgap;
  PyObject *alignment;
  int sequenceChanged;
  int scoreChanged;
};

396
/* "/Users/coissac/encours/OBITools/src/obitools/align/_nws.pxd":3
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415
 * from _dynamic cimport *
 * 
 * cdef class NWS(DynamicProgramming):             # <<<<<<<<<<<<<<
 *     cdef double _match
 *     cdef double _mismatch
 */

struct __pyx_obj_8obitools_5align_4_nws_NWS {
  struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming __pyx_base;
  double _match;
  double _mismatch;
};

struct __pyx_obj_8obitools_5align_9_assemble_DirectAssemble {
  struct __pyx_obj_8obitools_5align_4_nws_NWS __pyx_base;
  double ysmax;
  int ymax;
};

416
/* "/Users/coissac/encours/OBITools/src/obitools/align/_assemble.pxd":9
417 418 419 420 421 422 423 424 425 426
 *     cdef double doAlignment(self) except? 0
 * 
 * cdef class ReverseAssemble(DirectAssemble):             # <<<<<<<<<<<<<<
 *     pass
 */

struct __pyx_obj_8obitools_5align_9_assemble_ReverseAssemble {
  struct __pyx_obj_8obitools_5align_9_assemble_DirectAssemble __pyx_base;
};

427
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":12
428 429 430 431 432 433 434 435 436 437 438 439 440
 * 
 * 
 * cdef class QSolexaDirectAssemble(DirectAssemble):             # <<<<<<<<<<<<<<
 * 
 *     cdef double* hError
 */

struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble {
  struct __pyx_obj_8obitools_5align_9_assemble_DirectAssemble __pyx_base;
  double *hError;
  double *vError;
};

441
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":59
442 443 444 445 446 447 448 449 450 451 452 453
 * 
 * 
 * cdef class QSolexaReverseAssemble(QSolexaDirectAssemble):             # <<<<<<<<<<<<<<
 * 
 *     cdef double matchScore(self,int h, int v):
 */

struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble {
  struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble __pyx_base;
};


454 455
/* "/Users/coissac/encours/OBITools/src/obitools/align/_dynamic.pxd":62
 * cpdef unsigned char encodeBase(unsigned char lettre)
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473
 * 
 * cdef class DynamicProgramming:             # <<<<<<<<<<<<<<
 *     cdef AlignMatrix* matrix
 * 
 */

struct __pyx_vtabstruct_8obitools_5align_8_dynamic_DynamicProgramming {
  int (*allocate)(struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming *);
  double (*matchScore)(struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming *, int, int);
  double (*doAlignment)(struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming *);
  void (*reset)(struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming *);
  int (*index)(struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming *, int, int);
  int (*_needToCompute)(struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming *);
  void (*backtrack)(struct __pyx_obj_8obitools_5align_8_dynamic_DynamicProgramming *);
};
static struct __pyx_vtabstruct_8obitools_5align_8_dynamic_DynamicProgramming *__pyx_vtabptr_8obitools_5align_8_dynamic_DynamicProgramming;


474
/* "/Users/coissac/encours/OBITools/src/obitools/align/_nws.pxd":3
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493
 * from _dynamic cimport *
 * 
 * cdef class NWS(DynamicProgramming):             # <<<<<<<<<<<<<<
 *     cdef double _match
 *     cdef double _mismatch
 */

struct __pyx_vtabstruct_8obitools_5align_4_nws_NWS {
  struct __pyx_vtabstruct_8obitools_5align_8_dynamic_DynamicProgramming __pyx_base;
};
static struct __pyx_vtabstruct_8obitools_5align_4_nws_NWS *__pyx_vtabptr_8obitools_5align_4_nws_NWS;


struct __pyx_vtabstruct_8obitools_5align_9_assemble_DirectAssemble {
  struct __pyx_vtabstruct_8obitools_5align_4_nws_NWS __pyx_base;
};
static struct __pyx_vtabstruct_8obitools_5align_9_assemble_DirectAssemble *__pyx_vtabptr_8obitools_5align_9_assemble_DirectAssemble;


494
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":12
495 496 497 498 499 500 501 502 503 504 505 506 507
 * 
 * 
 * cdef class QSolexaDirectAssemble(DirectAssemble):             # <<<<<<<<<<<<<<
 * 
 *     cdef double* hError
 */

struct __pyx_vtabstruct_8obitools_5align_11_qsassemble_QSolexaDirectAssemble {
  struct __pyx_vtabstruct_8obitools_5align_9_assemble_DirectAssemble __pyx_base;
};
static struct __pyx_vtabstruct_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *__pyx_vtabptr_8obitools_5align_11_qsassemble_QSolexaDirectAssemble;


508
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":59
509 510 511 512 513 514 515 516 517 518 519 520 521
 * 
 * 
 * cdef class QSolexaReverseAssemble(QSolexaDirectAssemble):             # <<<<<<<<<<<<<<
 * 
 *     cdef double matchScore(self,int h, int v):
 */

struct __pyx_vtabstruct_8obitools_5align_11_qsassemble_QSolexaReverseAssemble {
  struct __pyx_vtabstruct_8obitools_5align_11_qsassemble_QSolexaDirectAssemble __pyx_base;
};
static struct __pyx_vtabstruct_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *__pyx_vtabptr_8obitools_5align_11_qsassemble_QSolexaReverseAssemble;


522
/* "/Users/coissac/encours/OBITools/src/obitools/align/_assemble.pxd":9
523 524 525 526 527 528 529 530 531 532
 *     cdef double doAlignment(self) except? 0
 * 
 * cdef class ReverseAssemble(DirectAssemble):             # <<<<<<<<<<<<<<
 *     pass
 */

struct __pyx_vtabstruct_8obitools_5align_9_assemble_ReverseAssemble {
  struct __pyx_vtabstruct_8obitools_5align_9_assemble_DirectAssemble __pyx_base;
};
static struct __pyx_vtabstruct_8obitools_5align_9_assemble_ReverseAssemble *__pyx_vtabptr_8obitools_5align_9_assemble_ReverseAssemble;
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637

#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) {
    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;
  }
  #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  #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_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
#else
  #define __Pyx_RefNannySetupContext(name)
  #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_XDECREF(r) Py_XDECREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name, PyObject* kw_name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/

static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static INLINE void __Pyx_RaiseTooManyValuesError(void);

static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
static int __Pyx_EndUnpack(PyObject *); /*proto*/

static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static INLINE char __Pyx_PyInt_AsChar(PyObject *);

static INLINE short __Pyx_PyInt_AsShort(PyObject *);

static INLINE int __Pyx_PyInt_AsInt(PyObject *);

static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static INLINE long __Pyx_PyInt_AsLong(PyObject *);

static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size);  /*proto*/

static PyObject *__Pyx_ImportModule(const char *name); /*proto*/

static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/

static void __Pyx_AddTraceback(const char *funcname); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
638 639 640 641 642 643 644 645 646 647 648 649 650 651
/* Module declarations from obitools.align._dynamic */

static PyTypeObject *__pyx_ptype_8obitools_5align_8_dynamic_DynamicProgramming = 0;
static struct __pyx_t_8obitools_5align_8_dynamic_AlignMatrix *(*__pyx_f_8obitools_5align_8_dynamic_allocateMatrix)(int, int, struct __pyx_opt_args_8obitools_5align_8_dynamic_allocateMatrix *__pyx_optional_args); /*proto*/
static void (*__pyx_f_8obitools_5align_8_dynamic_freeMatrix)(struct __pyx_t_8obitools_5align_8_dynamic_AlignMatrix *); /*proto*/
static void (*__pyx_f_8obitools_5align_8_dynamic_resetMatrix)(struct __pyx_t_8obitools_5align_8_dynamic_AlignMatrix *); /*proto*/
static struct __pyx_t_8obitools_5align_8_dynamic_alignSequence *(*__pyx_f_8obitools_5align_8_dynamic_allocateSequence)(PyObject *, struct __pyx_opt_args_8obitools_5align_8_dynamic_allocateSequence *__pyx_optional_args); /*proto*/
static void (*__pyx_f_8obitools_5align_8_dynamic_freeSequence)(struct __pyx_t_8obitools_5align_8_dynamic_alignSequence *); /*proto*/
static struct __pyx_t_8obitools_5align_8_dynamic_alignPath *(*__pyx_f_8obitools_5align_8_dynamic_allocatePath)(long, long, struct __pyx_opt_args_8obitools_5align_8_dynamic_allocatePath *__pyx_optional_args); /*proto*/
static void (*__pyx_f_8obitools_5align_8_dynamic_reversePath)(struct __pyx_t_8obitools_5align_8_dynamic_alignPath *); /*proto*/
static void (*__pyx_f_8obitools_5align_8_dynamic_freePath)(struct __pyx_t_8obitools_5align_8_dynamic_alignPath *); /*proto*/
static int (*__pyx_f_8obitools_5align_8_dynamic_bitCount)(int); /*proto*/
static int (*__pyx_f_8obitools_5align_8_dynamic_iupacMatch)(unsigned char, unsigned char, int __pyx_skip_dispatch); /*proto*/
static double (*__pyx_f_8obitools_5align_8_dynamic_iupacPartialMatch)(unsigned char, unsigned char, int __pyx_skip_dispatch); /*proto*/
652
static unsigned char (*__pyx_f_8obitools_5align_8_dynamic_encodeBase)(unsigned char, int __pyx_skip_dispatch); /*proto*/
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667
/* Module declarations from obitools.align._nws */

static PyTypeObject *__pyx_ptype_8obitools_5align_4_nws_NWS = 0;
/* Module declarations from obitools.align._assemble */

static PyTypeObject *__pyx_ptype_8obitools_5align_9_assemble_DirectAssemble = 0;
static PyTypeObject *__pyx_ptype_8obitools_5align_9_assemble_ReverseAssemble = 0;
/* Module declarations from obitools.align._qsassemble */

static PyTypeObject *__pyx_ptype_8obitools_5align_11_qsassemble_QSolexaDirectAssemble = 0;
static PyTypeObject *__pyx_ptype_8obitools_5align_11_qsassemble_QSolexaReverseAssemble = 0;
#define __Pyx_MODULE_NAME "obitools.align._qsassemble"
int __pyx_module_is_main_obitools__align___qsassemble = 0;

/* Implementation of obitools.align._qsassemble */
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710
static char __pyx_k_1[] = "You must use sequence with quality indices";
static char __pyx_k_2[] = "\nCreated on 6 Nov. 2009\n\n@author: coissac\n";
static char __pyx_k__hSeq[] = "hSeq";
static char __pyx_k__vSeq[] = "vSeq";
static char __pyx_k__match[] = "match";
static char __pyx_k___match[] = "_match";
static char __pyx_k__extgap[] = "extgap";
static char __pyx_k__hError[] = "hError";
static char __pyx_k__length[] = "length";
static char __pyx_k__vError[] = "vError";
static char __pyx_k__opengap[] = "opengap";
static char __pyx_k__quality[] = "quality";
static char __pyx_k__wrapped[] = "wrapped";
static char __pyx_k____init__[] = "__init__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k__sequence[] = "sequence";
static char __pyx_k___mismatch[] = "_mismatch";
static char __pyx_k__complement[] = "complement";
static char __pyx_k__buffer_info[] = "buffer_info";
static char __pyx_k__verticalSeq[] = "verticalSeq";
static char __pyx_k__horizontalSeq[] = "horizontalSeq";
static char __pyx_k__sequenceChanged[] = "sequenceChanged";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_n_s____init__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s___match;
static PyObject *__pyx_n_s___mismatch;
static PyObject *__pyx_n_s__buffer_info;
static PyObject *__pyx_n_s__complement;
static PyObject *__pyx_n_s__extgap;
static PyObject *__pyx_n_s__hError;
static PyObject *__pyx_n_s__hSeq;
static PyObject *__pyx_n_s__horizontalSeq;
static PyObject *__pyx_n_s__length;
static PyObject *__pyx_n_s__match;
static PyObject *__pyx_n_s__opengap;
static PyObject *__pyx_n_s__quality;
static PyObject *__pyx_n_s__sequence;
static PyObject *__pyx_n_s__sequenceChanged;
static PyObject *__pyx_n_s__vError;
static PyObject *__pyx_n_s__vSeq;
static PyObject *__pyx_n_s__verticalSeq;
static PyObject *__pyx_n_s__wrapped;
711 712
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_neg_2;
713 714 715
static PyObject *__pyx_int_neg_8;

/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":17
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732
 *     cdef double* vError
 * 
 *     def __init__(self,match=4,opengap=-8,extgap=-2):             # <<<<<<<<<<<<<<
 *         mismatch=-float(match)/3.0
 *         DirectAssemble.__init__(self,match,mismatch,opengap,extgap)
 */

static int __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_match = 0;
  PyObject *__pyx_v_opengap = 0;
  PyObject *__pyx_v_extgap = 0;
  PyObject *__pyx_v_mismatch;
  int __pyx_r;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
733 734
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__match,&__pyx_n_s__opengap,&__pyx_n_s__extgap,0};
  __Pyx_RefNannySetupContext("__init__");
735 736 737
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
738 739 740
    values[0] = ((PyObject *)__pyx_int_4);
    values[1] = ((PyObject *)__pyx_int_neg_8);
    values[2] = ((PyObject *)__pyx_int_neg_2);
741 742 743 744 745 746 747 748 749 750
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      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;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      if (kw_args > 1) {
751
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__match);
752 753 754 755
        if (unlikely(value)) { values[0] = value; kw_args--; }
      }
      case  1:
      if (kw_args > 1) {
756
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__opengap);
757 758 759 760
        if (unlikely(value)) { values[1] = value; kw_args--; }
      }
      case  2:
      if (kw_args > 1) {
761
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__extgap);
762 763 764 765 766 767 768 769 770 771
        if (unlikely(value)) { values[2] = value; kw_args--; }
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_match = values[0];
    __pyx_v_opengap = values[1];
    __pyx_v_extgap = values[2];
  } else {
772 773 774
    __pyx_v_match = ((PyObject *)__pyx_int_4);
    __pyx_v_opengap = ((PyObject *)__pyx_int_neg_8);
    __pyx_v_extgap = ((PyObject *)__pyx_int_neg_2);
775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3: __pyx_v_extgap = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: __pyx_v_opengap = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: __pyx_v_match = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("obitools.align._qsassemble.QSolexaDirectAssemble.__init__");
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_v_mismatch = Py_None; __Pyx_INCREF(Py_None);

792
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":18
793 794 795 796 797 798 799
 * 
 *     def __init__(self,match=4,opengap=-8,extgap=-2):
 *         mismatch=-float(match)/3.0             # <<<<<<<<<<<<<<
 *         DirectAssemble.__init__(self,match,mismatch,opengap,extgap)
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
800
  __Pyx_GOTREF(__pyx_t_1);
801 802 803
  __Pyx_INCREF(__pyx_v_match);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_match);
  __Pyx_GIVEREF(__pyx_v_match);
804
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyFloat_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
805
  __Pyx_GOTREF(__pyx_t_2);
806 807 808
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
809 810 811
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(3.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
812 813 814
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
815 816
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_mismatch);
817 818
  __pyx_v_mismatch = __pyx_t_3;
  __pyx_t_3 = 0;
819

820
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":19
821 822 823 824 825 826
 *     def __init__(self,match=4,opengap=-8,extgap=-2):
 *         mismatch=-float(match)/3.0
 *         DirectAssemble.__init__(self,match,mismatch,opengap,extgap)             # <<<<<<<<<<<<<<
 * 
 *     cdef double matchScore(self,int h, int v):
 */
827 828
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8obitools_5align_9_assemble_DirectAssemble)), __pyx_n_s____init__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
829
  __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
830
  __Pyx_GOTREF(__pyx_t_2);
831 832 833 834 835 836 837 838 839 840 841 842 843 844 845
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_match);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_match);
  __Pyx_GIVEREF(__pyx_v_match);
  __Pyx_INCREF(__pyx_v_mismatch);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_mismatch);
  __Pyx_GIVEREF(__pyx_v_mismatch);
  __Pyx_INCREF(__pyx_v_opengap);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_opengap);
  __Pyx_GIVEREF(__pyx_v_opengap);
  __Pyx_INCREF(__pyx_v_extgap);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_extgap);
  __Pyx_GIVEREF(__pyx_v_extgap);
846 847
  __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
848
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
849 850
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
851 852 853 854 855 856 857 858 859 860 861

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("obitools.align._qsassemble.QSolexaDirectAssemble.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_mismatch);
862
  __Pyx_RefNannyFinishContext();
863 864 865
  return __pyx_r;
}

866
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":21
867 868 869 870 871 872 873 874 875 876 877 878 879 880
 *         DirectAssemble.__init__(self,match,mismatch,opengap,extgap)
 * 
 *     cdef double matchScore(self,int h, int v):             # <<<<<<<<<<<<<<
 *         cdef double score
 *         cdef double smatch
 */

static  double __pyx_f_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_matchScore(struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *__pyx_v_self, int __pyx_v_h, int __pyx_v_v) {
  double __pyx_v_score;
  double __pyx_v_smatch;
  double __pyx_v_smismatch;
  double __pyx_v_hok;
  double __pyx_v_vok;
  double __pyx_r;
881
  __Pyx_RefNannySetupContext("matchScore");
882

883
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":25
884 885 886 887 888 889 890 891
 *         cdef double smatch
 *         cdef double smismatch
 *         cdef double hok=1-self.hError[h-1]             # <<<<<<<<<<<<<<
 *         cdef double vok=1-self.vError[v-1]
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])
 */
  __pyx_v_hok = (1 - (__pyx_v_self->hError[(__pyx_v_h - 1)]));

892
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":26
893 894 895 896 897 898 899 900
 *         cdef double smismatch
 *         cdef double hok=1-self.hError[h-1]
 *         cdef double vok=1-self.vError[v-1]             # <<<<<<<<<<<<<<
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3
 */
  __pyx_v_vok = (1 - (__pyx_v_self->vError[(__pyx_v_v - 1)]));

901
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":27
902 903 904 905 906 907 908 909
 *         cdef double hok=1-self.hError[h-1]
 *         cdef double vok=1-self.vError[v-1]
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])             # <<<<<<<<<<<<<<
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3
 *         smismatch=((hok+vok-4*hok*vok)*(self._match-self._mismatch)+2*self._match+7*self._mismatch)/9
 */
  __pyx_v_score = __pyx_f_8obitools_5align_8_dynamic_iupacPartialMatch((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.hSeq->sequence[(__pyx_v_h - 1)]), (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.vSeq->sequence[(__pyx_v_v - 1)]), 0);

910
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":28
911 912 913 914 915 916 917 918
 *         cdef double vok=1-self.vError[v-1]
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3             # <<<<<<<<<<<<<<
 *         smismatch=((hok+vok-4*hok*vok)*(self._match-self._mismatch)+2*self._match+7*self._mismatch)/9
 *         return smatch * score + smismatch * (1. - score)
 */
  __pyx_v_smatch = ((((((((4 * __pyx_v_hok) * __pyx_v_vok) - __pyx_v_hok) - __pyx_v_vok) * (__pyx_v_self->__pyx_base.__pyx_base._match - __pyx_v_self->__pyx_base.__pyx_base._mismatch)) + __pyx_v_self->__pyx_base.__pyx_base._match) + (2 * __pyx_v_self->__pyx_base.__pyx_base._mismatch)) / 3);

919
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":29
920 921 922 923 924 925 926 927
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3
 *         smismatch=((hok+vok-4*hok*vok)*(self._match-self._mismatch)+2*self._match+7*self._mismatch)/9             # <<<<<<<<<<<<<<
 *         return smatch * score + smismatch * (1. - score)
 * 
 */
  __pyx_v_smismatch = ((((((__pyx_v_hok + __pyx_v_vok) - ((4 * __pyx_v_hok) * __pyx_v_vok)) * (__pyx_v_self->__pyx_base.__pyx_base._match - __pyx_v_self->__pyx_base.__pyx_base._mismatch)) + (2 * __pyx_v_self->__pyx_base.__pyx_base._match)) + (7 * __pyx_v_self->__pyx_base.__pyx_base._mismatch)) / 9);

928
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":30
929 930 931 932 933 934 935 936 937 938 939
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3
 *         smismatch=((hok+vok-4*hok*vok)*(self._match-self._mismatch)+2*self._match+7*self._mismatch)/9
 *         return smatch * score + smismatch * (1. - score)             # <<<<<<<<<<<<<<
 * 
 *     property seqA:
 */
  __pyx_r = ((__pyx_v_smatch * __pyx_v_score) + (__pyx_v_smismatch * (1.0 - __pyx_v_score)));
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
940
  __Pyx_RefNannyFinishContext();
941 942 943
  return __pyx_r;
}

944
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":33
945 946 947 948 949 950 951 952 953 954
 * 
 *     property seqA:
 *             def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self.horizontalSeq
 * 
 */

static PyObject *__pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqA___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqA___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
955
  __Pyx_RefNannySetupContext("__get__");
956

957
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":34
958 959 960 961 962 963 964 965 966 967 968 969 970 971
 *     property seqA:
 *             def __get__(self):
 *                 return self.horizontalSeq             # <<<<<<<<<<<<<<
 * 
 *             def __set__(self, seq):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.horizontalSeq);
  __pyx_r = ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.horizontalSeq;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
972
  __Pyx_RefNannyFinishContext();
973 974 975
  return __pyx_r;
}

976
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":36
977 978 979 980 981 982 983 984 985 986 987 988 989 990
 *                 return self.horizontalSeq
 * 
 *             def __set__(self, seq):             # <<<<<<<<<<<<<<
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 */

static int __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqA___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq); /*proto*/
static int __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqA___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_v_olength;
  PyObject *__pyx_v_oaddress;
  int __pyx_r;
  int __pyx_t_1;
  struct __pyx_t_8obitools_5align_8_dynamic_alignSequence *__pyx_t_2;
991
  struct __pyx_opt_args_8obitools_5align_8_dynamic_allocateSequence __pyx_t_3;
992
  PyObject *__pyx_t_4 = NULL;
993 994 995 996 997
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned long __pyx_t_8;
  __Pyx_RefNannySetupContext("__set__");
998 999 1000
  __pyx_v_olength = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_oaddress = Py_None; __Pyx_INCREF(Py_None);

1001
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":38
1002 1003 1004 1005 1006 1007 1008
 *             def __set__(self, seq):
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"             # <<<<<<<<<<<<<<
 *                 self.sequenceChanged=True
 *                 self.horizontalSeq=seq
 */
  #ifndef PYREX_WITHOUT_ASSERTIONS
1009
  __pyx_t_1 = PyObject_HasAttr(__pyx_v_seq, ((PyObject *)__pyx_n_s__quality)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1010
  if (unlikely(!__pyx_t_1)) {
1011
    PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_1));
1012 1013 1014 1015
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

1016
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":39
1017 1018 1019 1020 1021 1022 1023 1024
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 *                 self.sequenceChanged=True             # <<<<<<<<<<<<<<
 *                 self.horizontalSeq=seq
 *                 self.hSeq=allocateSequence(self.horizontalSeq,self.hSeq)
 */
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.sequenceChanged = 1;

1025
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":40
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 *                 self.sequenceChanged=True
 *                 self.horizontalSeq=seq             # <<<<<<<<<<<<<<
 *                 self.hSeq=allocateSequence(self.horizontalSeq,self.hSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()
 */
  __Pyx_INCREF(__pyx_v_seq);
  __Pyx_GIVEREF(__pyx_v_seq);
  __Pyx_GOTREF(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.horizontalSeq);
  __Pyx_DECREF(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.horizontalSeq);
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.horizontalSeq = __pyx_v_seq;

1038
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":41
1039 1040 1041 1042 1043 1044
 *                 self.sequenceChanged=True
 *                 self.horizontalSeq=seq
 *                 self.hSeq=allocateSequence(self.horizontalSeq,self.hSeq)             # <<<<<<<<<<<<<<
 *                 (oaddress,olength)=seq.quality.buffer_info()
 *                 self.hError=<double*><unsigned long int>oaddress
 */
1045 1046 1047
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.seq = ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.hSeq;
  __pyx_t_2 = __pyx_f_8obitools_5align_8_dynamic_allocateSequence(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.horizontalSeq, &__pyx_t_3); 
1048 1049
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.hSeq = __pyx_t_2;

1050
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":42
1051 1052 1053 1054 1055 1056
 *                 self.horizontalSeq=seq
 *                 self.hSeq=allocateSequence(self.horizontalSeq,self.hSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()             # <<<<<<<<<<<<<<
 *                 self.hError=<double*><unsigned long int>oaddress
 * 
 */
1057
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_seq, __pyx_n_s__quality); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1058
  __Pyx_GOTREF(__pyx_t_4);
1059 1060
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__buffer_info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
1061
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1062 1063 1064 1065 1066 1067 1068 1069
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
    PyObject* tuple = __pyx_t_4;
    __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1070
    __Pyx_DECREF(__pyx_v_oaddress);
1071 1072
    __pyx_v_oaddress = __pyx_t_5;
    __pyx_t_5 = 0;
1073
    __Pyx_DECREF(__pyx_v_olength);
1074 1075
    __pyx_v_olength = __pyx_t_6;
    __pyx_t_6 = 0;
1076
  } else {
1077 1078 1079 1080 1081 1082 1083 1084 1085
    __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
1086
    __Pyx_DECREF(__pyx_v_oaddress);
1087 1088
    __pyx_v_oaddress = __pyx_t_5;
    __pyx_t_5 = 0;
1089
    __Pyx_DECREF(__pyx_v_olength);
1090 1091
    __pyx_v_olength = __pyx_t_6;
    __pyx_t_6 = 0;
1092 1093
  }

1094
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":43
1095 1096 1097 1098 1099 1100
 *                 self.hSeq=allocateSequence(self.horizontalSeq,self.hSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()
 *                 self.hError=<double*><unsigned long int>oaddress             # <<<<<<<<<<<<<<
 * 
 *     property seqB:
 */
1101 1102
  __pyx_t_8 = __Pyx_PyInt_AsUnsignedLong(__pyx_v_oaddress); if (unlikely((__pyx_t_8 == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->hError = ((double *)((unsigned long)__pyx_t_8));
1103 1104 1105 1106 1107

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
1108 1109 1110
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
1111 1112 1113 1114 1115
  __Pyx_AddTraceback("obitools.align._qsassemble.QSolexaDirectAssemble.seqA.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_olength);
  __Pyx_DECREF(__pyx_v_oaddress);
1116
  __Pyx_RefNannyFinishContext();
1117 1118 1119
  return __pyx_r;
}

1120
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":46
1121 1122 1123 1124 1125 1126 1127 1128 1129 1130
 * 
 *     property seqB:
 *             def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self.verticalSeq
 * 
 */

static PyObject *__pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqB___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqB___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
1131
  __Pyx_RefNannySetupContext("__get__");
1132

1133
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":47
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147
 *     property seqB:
 *             def __get__(self):
 *                 return self.verticalSeq             # <<<<<<<<<<<<<<
 * 
 *             def __set__(self, seq):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.verticalSeq);
  __pyx_r = ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.verticalSeq;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
1148
  __Pyx_RefNannyFinishContext();
1149 1150 1151
  return __pyx_r;
}

1152
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":49
1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
 *                 return self.verticalSeq
 * 
 *             def __set__(self, seq):             # <<<<<<<<<<<<<<
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 */

static int __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqB___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq); /*proto*/
static int __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqB___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_v_olength;
  PyObject *__pyx_v_oaddress;
  int __pyx_r;
  int __pyx_t_1;
  struct __pyx_t_8obitools_5align_8_dynamic_alignSequence *__pyx_t_2;
1167
  struct __pyx_opt_args_8obitools_5align_8_dynamic_allocateSequence __pyx_t_3;
1168
  PyObject *__pyx_t_4 = NULL;
1169 1170 1171 1172 1173
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned long __pyx_t_8;
  __Pyx_RefNannySetupContext("__set__");
1174 1175 1176
  __pyx_v_olength = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_oaddress = Py_None; __Pyx_INCREF(Py_None);

1177
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":51
1178 1179 1180 1181 1182 1183 1184
 *             def __set__(self, seq):
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"             # <<<<<<<<<<<<<<
 *                 self.sequenceChanged=True
 *                 self.verticalSeq=seq
 */
  #ifndef PYREX_WITHOUT_ASSERTIONS
1185
  __pyx_t_1 = PyObject_HasAttr(__pyx_v_seq, ((PyObject *)__pyx_n_s__quality)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1186
  if (unlikely(!__pyx_t_1)) {
1187
    PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_1));
1188 1189 1190 1191
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

1192
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":52
1193 1194 1195 1196 1197 1198 1199 1200
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 *                 self.sequenceChanged=True             # <<<<<<<<<<<<<<
 *                 self.verticalSeq=seq
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)
 */
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.sequenceChanged = 1;

1201
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":53
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 *                 self.sequenceChanged=True
 *                 self.verticalSeq=seq             # <<<<<<<<<<<<<<
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()
 */
  __Pyx_INCREF(__pyx_v_seq);
  __Pyx_GIVEREF(__pyx_v_seq);
  __Pyx_GOTREF(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.verticalSeq);
  __Pyx_DECREF(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.verticalSeq);
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.verticalSeq = __pyx_v_seq;

1214
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":54
1215 1216 1217 1218 1219 1220
 *                 self.sequenceChanged=True
 *                 self.verticalSeq=seq
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)             # <<<<<<<<<<<<<<
 *                 (oaddress,olength)=seq.quality.buffer_info()
 *                 self.vError=<double*><unsigned long int>oaddress
 */
1221 1222 1223
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.seq = ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.vSeq;
  __pyx_t_2 = __pyx_f_8obitools_5align_8_dynamic_allocateSequence(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.verticalSeq, &__pyx_t_3); 
1224 1225
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.vSeq = __pyx_t_2;

1226
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":55
1227 1228 1229 1230 1231 1232
 *                 self.verticalSeq=seq
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()             # <<<<<<<<<<<<<<
 *                 self.vError=<double*><unsigned long int>oaddress
 * 
 */
1233
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_seq, __pyx_n_s__quality); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1234
  __Pyx_GOTREF(__pyx_t_4);
1235 1236
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__buffer_info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
1237
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1238 1239 1240 1241 1242 1243 1244 1245
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
    PyObject* tuple = __pyx_t_4;
    __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1246
    __Pyx_DECREF(__pyx_v_oaddress);
1247 1248
    __pyx_v_oaddress = __pyx_t_5;
    __pyx_t_5 = 0;
1249
    __Pyx_DECREF(__pyx_v_olength);
1250 1251
    __pyx_v_olength = __pyx_t_6;
    __pyx_t_6 = 0;
1252
  } else {
1253 1254 1255 1256 1257 1258 1259 1260 1261
    __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
1262
    __Pyx_DECREF(__pyx_v_oaddress);
1263 1264
    __pyx_v_oaddress = __pyx_t_5;
    __pyx_t_5 = 0;
1265
    __Pyx_DECREF(__pyx_v_olength);
1266 1267
    __pyx_v_olength = __pyx_t_6;
    __pyx_t_6 = 0;
1268 1269
  }

1270
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":56
1271 1272 1273 1274 1275 1276
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()
 *                 self.vError=<double*><unsigned long int>oaddress             # <<<<<<<<<<<<<<
 * 
 * 
 */
1277 1278
  __pyx_t_8 = __Pyx_PyInt_AsUnsignedLong(__pyx_v_oaddress); if (unlikely((__pyx_t_8 == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)__pyx_v_self)->vError = ((double *)((unsigned long)__pyx_t_8));
1279 1280 1281 1282 1283

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
1284 1285 1286
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
1287 1288 1289 1290 1291
  __Pyx_AddTraceback("obitools.align._qsassemble.QSolexaDirectAssemble.seqB.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_olength);
  __Pyx_DECREF(__pyx_v_oaddress);
1292
  __Pyx_RefNannyFinishContext();
1293 1294 1295
  return __pyx_r;
}

1296
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":61
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310
 * cdef class QSolexaReverseAssemble(QSolexaDirectAssemble):
 * 
 *     cdef double matchScore(self,int h, int v):             # <<<<<<<<<<<<<<
 *         cdef double score
 *         cdef double smatch
 */

static  double __pyx_f_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_matchScore(struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *__pyx_v_self, int __pyx_v_h, int __pyx_v_v) {
  double __pyx_v_score;
  double __pyx_v_smatch;
  double __pyx_v_smismatch;
  double __pyx_v_hok;
  double __pyx_v_vok;
  double __pyx_r;
1311
  __Pyx_RefNannySetupContext("matchScore");
1312

1313
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":65
1314 1315 1316 1317 1318 1319 1320 1321
 *         cdef double smatch
 *         cdef double smismatch
 *         cdef double hok=1-self.hError[h-1]             # <<<<<<<<<<<<<<
 *         cdef double vok=1-self.vError[self.vSeq.length - v]
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])
 */
  __pyx_v_hok = (1 - (__pyx_v_self->__pyx_base.hError[(__pyx_v_h - 1)]));

1322
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":66
1323 1324 1325 1326 1327 1328 1329 1330
 *         cdef double smismatch
 *         cdef double hok=1-self.hError[h-1]
 *         cdef double vok=1-self.vError[self.vSeq.length - v]             # <<<<<<<<<<<<<<
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3
 */
  __pyx_v_vok = (1 - (__pyx_v_self->__pyx_base.vError[(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.vSeq->length - __pyx_v_v)]));

1331
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":67
1332 1333 1334 1335 1336 1337 1338 1339
 *         cdef double hok=1-self.hError[h-1]
 *         cdef double vok=1-self.vError[self.vSeq.length - v]
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])             # <<<<<<<<<<<<<<
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3
 *         smismatch=((hok+vok-4*hok*vok)*(self._match-self._mismatch)+2*self._match+7*self._mismatch)/9
 */
  __pyx_v_score = __pyx_f_8obitools_5align_8_dynamic_iupacPartialMatch((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.hSeq->sequence[(__pyx_v_h - 1)]), (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.vSeq->sequence[(__pyx_v_v - 1)]), 0);

1340
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":68
1341 1342 1343 1344 1345 1346 1347 1348
 *         cdef double vok=1-self.vError[self.vSeq.length - v]
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3             # <<<<<<<<<<<<<<
 *         smismatch=((hok+vok-4*hok*vok)*(self._match-self._mismatch)+2*self._match+7*self._mismatch)/9
 *         return smatch * score + smismatch * (1. - score)
 */
  __pyx_v_smatch = ((((((((4 * __pyx_v_hok) * __pyx_v_vok) - __pyx_v_hok) - __pyx_v_vok) * (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._match - __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._mismatch)) + __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._match) + (2 * __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._mismatch)) / 3);

1349
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":69
1350 1351 1352 1353 1354 1355 1356 1357
 *         score=iupacPartialMatch(self.hSeq.sequence[h-1],self.vSeq.sequence[v-1])
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3
 *         smismatch=((hok+vok-4*hok*vok)*(self._match-self._mismatch)+2*self._match+7*self._mismatch)/9             # <<<<<<<<<<<<<<
 *         return smatch * score + smismatch * (1. - score)
 * 
 */
  __pyx_v_smismatch = ((((((__pyx_v_hok + __pyx_v_vok) - ((4 * __pyx_v_hok) * __pyx_v_vok)) * (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._match - __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._mismatch)) + (2 * __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._match)) + (7 * __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._mismatch)) / 9);

1358
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":70
1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369
 *         smatch=((4*hok*vok-hok-vok)*(self._match-self._mismatch)+self._match+2*self._mismatch)/3
 *         smismatch=((hok+vok-4*hok*vok)*(self._match-self._mismatch)+2*self._match+7*self._mismatch)/9
 *         return smatch * score + smismatch * (1. - score)             # <<<<<<<<<<<<<<
 * 
 *     property seqB:
 */
  __pyx_r = ((__pyx_v_smatch * __pyx_v_score) + (__pyx_v_smismatch * (1.0 - __pyx_v_score)));
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
1370
  __Pyx_RefNannyFinishContext();
1371 1372 1373
  return __pyx_r;
}

1374
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":73
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385
 * 
 *     property seqB:
 *             def __get__(self):             # <<<<<<<<<<<<<<
 *                 return self.verticalSeq.wrapped
 * 
 */

static PyObject *__pyx_pf_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_4seqB___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_4seqB___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
1386
  __Pyx_RefNannySetupContext("__get__");
1387

1388
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":74
1389 1390 1391 1392 1393 1394 1395
 *     property seqB:
 *             def __get__(self):
 *                 return self.verticalSeq.wrapped             # <<<<<<<<<<<<<<
 * 
 *             def __set__(self, seq):
 */
  __Pyx_XDECREF(__pyx_r);
1396
  __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.verticalSeq, __pyx_n_s__wrapped); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __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("obitools.align._qsassemble.QSolexaReverseAssemble.seqB.__get__");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
1410
  __Pyx_RefNannyFinishContext();
1411 1412 1413
  return __pyx_r;
}

1414
/* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":76
1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430
 *                 return self.verticalSeq.wrapped
 * 
 *             def __set__(self, seq):             # <<<<<<<<<<<<<<
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 */

static int __pyx_pf_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_4seqB___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq); /*proto*/
static int __pyx_pf_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_4seqB___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_v_olength;
  PyObject *__pyx_v_oaddress;
  int __pyx_r;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_t_8obitools_5align_8_dynamic_alignSequence *__pyx_t_4;
1431 1432 1433 1434 1435
  struct __pyx_opt_args_8obitools_5align_8_dynamic_allocateSequence __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned long __pyx_t_8;
  __Pyx_RefNannySetupContext("__set__");
1436 1437 1438
  __pyx_v_olength = Py_None; __Pyx_INCREF(Py_None);
  __pyx_v_oaddress = Py_None; __Pyx_INCREF(Py_None);

1439
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":78
1440 1441 1442 1443 1444 1445 1446
 *             def __set__(self, seq):
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"             # <<<<<<<<<<<<<<
 *                 self.sequenceChanged=True
 *                 self.verticalSeq=seq.complement()
 */
  #ifndef PYREX_WITHOUT_ASSERTIONS
1447
  __pyx_t_1 = PyObject_HasAttr(__pyx_v_seq, ((PyObject *)__pyx_n_s__quality)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1448
  if (unlikely(!__pyx_t_1)) {
1449
    PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_1));
1450 1451 1452 1453
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

1454
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":79
1455 1456 1457 1458 1459 1460 1461 1462
 *                 cdef object oaddresse,olength
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 *                 self.sequenceChanged=True             # <<<<<<<<<<<<<<
 *                 self.verticalSeq=seq.complement()
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)
 */
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.sequenceChanged = 1;

1463
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":80
1464 1465 1466 1467 1468 1469
 *                 assert hasattr(seq, "quality"),"You must use sequence with quality indices"
 *                 self.sequenceChanged=True
 *                 self.verticalSeq=seq.complement()             # <<<<<<<<<<<<<<
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()
 */
1470
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_seq, __pyx_n_s__complement); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1471 1472 1473 1474 1475 1476 1477 1478 1479 1480
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.verticalSeq);
  __Pyx_DECREF(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.verticalSeq);
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.verticalSeq = __pyx_t_3;
  __pyx_t_3 = 0;

1481
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":81
1482 1483 1484 1485 1486 1487
 *                 self.sequenceChanged=True
 *                 self.verticalSeq=seq.complement()
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)             # <<<<<<<<<<<<<<
 *                 (oaddress,olength)=seq.quality.buffer_info()
 *                 self.vError=<double*><unsigned long int>oaddress
 */
1488 1489 1490
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.seq = ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.vSeq;
  __pyx_t_4 = __pyx_f_8obitools_5align_8_dynamic_allocateSequence(((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.verticalSeq, &__pyx_t_5); 
1491 1492
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.vSeq = __pyx_t_4;

1493
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":82
1494 1495 1496 1497 1498
 *                 self.verticalSeq=seq.complement()
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()             # <<<<<<<<<<<<<<
 *                 self.vError=<double*><unsigned long int>oaddress
 */
1499
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_seq, __pyx_n_s__quality); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1500
  __Pyx_GOTREF(__pyx_t_3);
1501
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__buffer_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1502 1503 1504 1505 1506 1507 1508
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
    PyObject* tuple = __pyx_t_3;
1509 1510
    __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
1511 1512
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_oaddress);
1513 1514
    __pyx_v_oaddress = __pyx_t_2;
    __pyx_t_2 = 0;
1515
    __Pyx_DECREF(__pyx_v_olength);
1516 1517
    __pyx_v_olength = __pyx_t_6;
    __pyx_t_6 = 0;
1518
  } else {
1519 1520
    __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
1521
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1522 1523 1524 1525 1526 1527
    __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
1528
    __Pyx_DECREF(__pyx_v_oaddress);
1529 1530
    __pyx_v_oaddress = __pyx_t_2;
    __pyx_t_2 = 0;
1531
    __Pyx_DECREF(__pyx_v_olength);
1532 1533
    __pyx_v_olength = __pyx_t_6;
    __pyx_t_6 = 0;
1534 1535
  }

1536
  /* "/Users/coissac/encours/OBITools/src/obitools/align/_qsassemble.pyx":83
1537 1538 1539 1540
 *                 self.vSeq=allocateSequence(self.verticalSeq,self.vSeq)
 *                 (oaddress,olength)=seq.quality.buffer_info()
 *                 self.vError=<double*><unsigned long int>oaddress             # <<<<<<<<<<<<<<
 */
1541 1542
  __pyx_t_8 = __Pyx_PyInt_AsUnsignedLong(__pyx_v_oaddress); if (unlikely((__pyx_t_8 == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)__pyx_v_self)->__pyx_base.vError = ((double *)((unsigned long)__pyx_t_8));
1543 1544 1545 1546 1547 1548

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
1549 1550
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
1551 1552 1553 1554 1555
  __Pyx_AddTraceback("obitools.align._qsassemble.QSolexaReverseAssemble.seqB.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_DECREF(__pyx_v_olength);
  __Pyx_DECREF(__pyx_v_oaddress);
1556
  __Pyx_RefNannyFinishContext();
1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770
  return __pyx_r;
}
static struct __pyx_vtabstruct_8obitools_5align_11_qsassemble_QSolexaDirectAssemble __pyx_vtable_8obitools_5align_11_qsassemble_QSolexaDirectAssemble;

static PyObject *__pyx_tp_new_8obitools_5align_11_qsassemble_QSolexaDirectAssemble(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *p;
  PyObject *o = __pyx_ptype_8obitools_5align_9_assemble_DirectAssemble->tp_new(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8obitools_5align_8_dynamic_DynamicProgramming*)__pyx_vtabptr_8obitools_5align_11_qsassemble_QSolexaDirectAssemble;
  return o;
}

static void __pyx_tp_dealloc_8obitools_5align_11_qsassemble_QSolexaDirectAssemble(PyObject *o) {
  __pyx_ptype_8obitools_5align_9_assemble_DirectAssemble->tp_dealloc(o);
}

static int __pyx_tp_traverse_8obitools_5align_11_qsassemble_QSolexaDirectAssemble(PyObject *o, visitproc v, void *a) {
  int e;
  if (__pyx_ptype_8obitools_5align_9_assemble_DirectAssemble->tp_traverse) {
    e = __pyx_ptype_8obitools_5align_9_assemble_DirectAssemble->tp_traverse(o, v, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8obitools_5align_11_qsassemble_QSolexaDirectAssemble(PyObject *o) {
  if (__pyx_ptype_8obitools_5align_9_assemble_DirectAssemble->tp_clear) {
    __pyx_ptype_8obitools_5align_9_assemble_DirectAssemble->tp_clear(o);
  }
  return 0;
}

static PyObject *__pyx_getprop_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_seqA(PyObject *o, void *x) {
  return __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqA___get__(o);
}

static int __pyx_setprop_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_seqA(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqA___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_seqB(PyObject *o, void *x) {
  return __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqB___get__(o);
}

static int __pyx_setprop_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_seqB(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_4seqB___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static struct PyMethodDef __pyx_methods_8obitools_5align_11_qsassemble_QSolexaDirectAssemble[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8obitools_5align_11_qsassemble_QSolexaDirectAssemble[] = {
  {(char *)"seqA", __pyx_getprop_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_seqA, __pyx_setprop_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_seqA, 0, 0},
  {(char *)"seqB", __pyx_getprop_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_seqB, __pyx_setprop_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble_seqB, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_QSolexaDirectAssemble = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION >= 3
  0, /*reserved*/
  #else
  0, /*nb_long*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_QSolexaDirectAssemble = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_QSolexaDirectAssemble = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_QSolexaDirectAssemble = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_8obitools_5align_11_qsassemble_QSolexaDirectAssemble = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("obitools.align._qsassemble.QSolexaDirectAssemble"), /*tp_name*/
  sizeof(struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaDirectAssemble), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_QSolexaDirectAssemble, /*tp_as_number*/
  &__pyx_tp_as_sequence_QSolexaDirectAssemble, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_QSolexaDirectAssemble, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_QSolexaDirectAssemble, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_traverse*/
  __pyx_tp_clear_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_8obitools_5align_11_qsassemble_21QSolexaDirectAssemble___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
1771 1772 1773 1774
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953
};
static struct __pyx_vtabstruct_8obitools_5align_11_qsassemble_QSolexaReverseAssemble __pyx_vtable_8obitools_5align_11_qsassemble_QSolexaReverseAssemble;

static PyObject *__pyx_tp_new_8obitools_5align_11_qsassemble_QSolexaReverseAssemble(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *p;
  PyObject *o = __pyx_tp_new_8obitools_5align_11_qsassemble_QSolexaDirectAssemble(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8obitools_5align_8_dynamic_DynamicProgramming*)__pyx_vtabptr_8obitools_5align_11_qsassemble_QSolexaReverseAssemble;
  return o;
}

static PyObject *__pyx_getprop_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_seqB(PyObject *o, void *x) {
  return __pyx_pf_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_4seqB___get__(o);
}

static int __pyx_setprop_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_seqB(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_4seqB___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static struct PyMethodDef __pyx_methods_8obitools_5align_11_qsassemble_QSolexaReverseAssemble[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8obitools_5align_11_qsassemble_QSolexaReverseAssemble[] = {
  {(char *)"seqB", __pyx_getprop_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_seqB, __pyx_setprop_8obitools_5align_11_qsassemble_22QSolexaReverseAssemble_seqB, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_QSolexaReverseAssemble = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION >= 3
  0, /*reserved*/
  #else
  0, /*nb_long*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_QSolexaReverseAssemble = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_QSolexaReverseAssemble = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_QSolexaReverseAssemble = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_8obitools_5align_11_qsassemble_QSolexaReverseAssemble = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("obitools.align._qsassemble.QSolexaReverseAssemble"), /*tp_name*/
  sizeof(struct __pyx_obj_8obitools_5align_11_qsassemble_QSolexaReverseAssemble), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_QSolexaReverseAssemble, /*tp_as_number*/
  &__pyx_tp_as_sequence_QSolexaReverseAssemble, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_QSolexaReverseAssemble, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_QSolexaReverseAssemble, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_traverse*/
  __pyx_tp_clear_8obitools_5align_11_qsassemble_QSolexaDirectAssemble, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8obitools_5align_11_qsassemble_QSolexaReverseAssemble, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_8obitools_5align_11_qsassemble_QSolexaReverseAssemble, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8obitools_5align_11_qsassemble_QSolexaReverseAssemble, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
1954 1955 1956 1957
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969
};

static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("_qsassemble"),
1970
    __Pyx_DOCSTR(__pyx_k_2), /* m_doc */
1971 1972 1973 1974