From 9b860f5dead19c3e2dde85d38142d4b3600fd24c Mon Sep 17 00:00:00 2001 From: Cole Lyman Date: Wed, 4 Sep 2024 15:56:13 -0600 Subject: [PATCH] Add `all_deletion_coordinates` to be returned by `find_indels_substitutions_legacy` function (#106) (#486) * Add all_deletion_coordinates to find_indels_substitutions_legacy * Update test cases to include find_indels_substitutions_legacy and all_deletion_coordinates --- CRISPResso2/CRISPRessoCOREResources.c | 601 ++++++++++-------- CRISPResso2/CRISPRessoCOREResources.pyx | 3 + .../test_CRISPRessoCOREResources.py | 46 ++ 3 files changed, 385 insertions(+), 265 deletions(-) diff --git a/CRISPResso2/CRISPRessoCOREResources.c b/CRISPResso2/CRISPRessoCOREResources.c index bb730a48..acbfe0b8 100644 --- a/CRISPResso2/CRISPRessoCOREResources.c +++ b/CRISPResso2/CRISPRessoCOREResources.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.9 */ +/* Generated by Cython 3.0.10 */ /* BEGIN: Cython Metadata { @@ -50,10 +50,10 @@ END: Cython Metadata */ #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif -#define CYTHON_ABI "3_0_9" __PYX_EXTRA_ABI_MODULE_NAME +#define CYTHON_ABI "3_0_10" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x030009F0 +#define CYTHON_HEX_VERSION 0x03000AF0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -145,6 +145,8 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 @@ -206,6 +208,8 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX @@ -267,6 +271,8 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 @@ -276,11 +282,17 @@ END: Cython Metadata */ #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #ifndef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 1 #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS @@ -288,8 +300,6 @@ END: Cython Metadata */ #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 - #undef CYTHON_USE_PYLONG_INTERNALS - #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif @@ -301,11 +311,22 @@ END: Cython Metadata */ #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif @@ -313,6 +334,12 @@ END: Cython Metadata */ #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #endif #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 @@ -403,6 +430,9 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) @@ -2203,22 +2233,22 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_9 -#define __PYX_HAVE_RT_ImportType_proto_3_0_9 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_10 +#define __PYX_HAVE_RT_ImportType_proto_3_0_10 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_9(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_10(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_9(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_10(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_0_9 { - __Pyx_ImportType_CheckSize_Error_3_0_9 = 0, - __Pyx_ImportType_CheckSize_Warn_3_0_9 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_0_9 = 2 +enum __Pyx_ImportType_CheckSize_3_0_10 { + __Pyx_ImportType_CheckSize_Error_3_0_10 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_10 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_10 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_0_9(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_9 check_size); +static PyTypeObject *__Pyx_ImportType_3_0_10(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_10 check_size); #endif /* Import.proto */ @@ -6671,6 +6701,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_v_all_deletion_positions = NULL; PyObject *__pyx_v_deletion_positions = NULL; PyObject *__pyx_v_deletion_coordinates = NULL; + PyObject *__pyx_v_all_deletion_coordinates = NULL; PyObject *__pyx_v_deletion_sizes = NULL; PyObject *__pyx_v_all_insertion_positions = NULL; PyObject *__pyx_v_all_insertion_left_positions = NULL; @@ -7109,7 +7140,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s * all_deletion_positions=[] * deletion_positions=[] # <<<<<<<<<<<<<< * deletion_coordinates=[] - * deletion_sizes=[] + * all_deletion_coordinates=[] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -7120,8 +7151,8 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s * all_deletion_positions=[] * deletion_positions=[] * deletion_coordinates=[] # <<<<<<<<<<<<<< + * all_deletion_coordinates=[] * deletion_sizes=[] - * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -7131,97 +7162,109 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s /* "CRISPResso2/CRISPRessoCOREResources.pyx":193 * deletion_positions=[] * deletion_coordinates=[] + * all_deletion_coordinates=[] # <<<<<<<<<<<<<< + * deletion_sizes=[] + * + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_all_deletion_coordinates = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "CRISPResso2/CRISPRessoCOREResources.pyx":194 + * deletion_coordinates=[] + * all_deletion_coordinates=[] * deletion_sizes=[] # <<<<<<<<<<<<<< * * all_insertion_positions=[] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_deletion_sizes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":195 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":196 * deletion_sizes=[] * * all_insertion_positions=[] # <<<<<<<<<<<<<< * all_insertion_left_positions=[] * insertion_positions=[] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_all_insertion_positions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":196 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":197 * * all_insertion_positions=[] * all_insertion_left_positions=[] # <<<<<<<<<<<<<< * insertion_positions=[] * insertion_coordinates = [] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_all_insertion_left_positions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":197 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":198 * all_insertion_positions=[] * all_insertion_left_positions=[] * insertion_positions=[] # <<<<<<<<<<<<<< * insertion_coordinates = [] * insertion_sizes=[] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_insertion_positions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":198 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":199 * all_insertion_left_positions=[] * insertion_positions=[] * insertion_coordinates = [] # <<<<<<<<<<<<<< * insertion_sizes=[] * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_insertion_coordinates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":199 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":200 * insertion_positions=[] * insertion_coordinates = [] * insertion_sizes=[] # <<<<<<<<<<<<<< * * include_indx_set = set(_include_indx) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_insertion_sizes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":201 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":202 * insertion_sizes=[] * * include_indx_set = set(_include_indx) # <<<<<<<<<<<<<< * for p in re_find_indels.finditer(read_seq_al): * st,en=p.span() */ - __pyx_t_1 = PySet_New(__pyx_v__include_indx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_1 = PySet_New(__pyx_v__include_indx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_include_indx_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":202 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":203 * * include_indx_set = set(_include_indx) * for p in re_find_indels.finditer(read_seq_al): # <<<<<<<<<<<<<< * st,en=p.span() * ref_st = 0 */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_re_find_indels); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_re_find_indels); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_finditer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_finditer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -7242,7 +7285,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_read_seq_al}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -7251,9 +7294,9 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -7262,28 +7305,28 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 202, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 203, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 203, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 202, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 203, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 203, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -7293,7 +7336,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 202, __pyx_L1_error) + else __PYX_ERR(0, 203, __pyx_L1_error) } break; } @@ -7302,14 +7345,14 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":203 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":204 * include_indx_set = set(_include_indx) * for p in re_find_indels.finditer(read_seq_al): * st,en=p.span() # <<<<<<<<<<<<<< * ref_st = 0 * if st-1 > 0: */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_span); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_span); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = NULL; __pyx_t_2 = 0; @@ -7329,7 +7372,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_2, 0+__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -7339,7 +7382,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 203, __pyx_L1_error) + __PYX_ERR(0, 204, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7352,15 +7395,15 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); @@ -7368,7 +7411,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 203, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 204, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L16_unpacking_done; @@ -7376,17 +7419,17 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 203, __pyx_L1_error) + __PYX_ERR(0, 204, __pyx_L1_error) __pyx_L16_unpacking_done:; } - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_st = __pyx_t_2; __pyx_v_en = __pyx_t_13; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":204 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":205 * for p in re_find_indels.finditer(read_seq_al): * st,en=p.span() * ref_st = 0 # <<<<<<<<<<<<<< @@ -7396,7 +7439,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_ref_st, __pyx_int_0); - /* "CRISPResso2/CRISPRessoCOREResources.pyx":205 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":206 * st,en=p.span() * ref_st = 0 * if st-1 > 0: # <<<<<<<<<<<<<< @@ -7406,7 +7449,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __pyx_t_6 = ((__pyx_v_st - 1) > 0); if (__pyx_t_6) { - /* "CRISPResso2/CRISPRessoCOREResources.pyx":206 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":207 * ref_st = 0 * if st-1 > 0: * ref_st = ref_positions[st] # <<<<<<<<<<<<<< @@ -7418,7 +7461,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_DECREF_SET(__pyx_v_ref_st, __pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":205 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":206 * st,en=p.span() * ref_st = 0 * if st-1 > 0: # <<<<<<<<<<<<<< @@ -7427,42 +7470,42 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s */ } - /* "CRISPResso2/CRISPRessoCOREResources.pyx":207 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":208 * if st-1 > 0: * ref_st = ref_positions[st] * ref_en = idx-1 # <<<<<<<<<<<<<< * if en < len(ref_positions): * ref_en = ref_positions[en] */ - __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_idx - 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_idx - 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_ref_en, __pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":208 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":209 * ref_st = ref_positions[st] * ref_en = idx-1 * if en < len(ref_positions): # <<<<<<<<<<<<<< * ref_en = ref_positions[en] * all_deletion_positions.extend(range(ref_st,ref_en)) */ - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_ref_positions); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_ref_positions); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 209, __pyx_L1_error) __pyx_t_6 = (__pyx_v_en < __pyx_t_14); if (__pyx_t_6) { - /* "CRISPResso2/CRISPRessoCOREResources.pyx":209 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":210 * ref_en = idx-1 * if en < len(ref_positions): * ref_en = ref_positions[en] # <<<<<<<<<<<<<< * all_deletion_positions.extend(range(ref_st,ref_en)) - * inc_del_pos = include_indx_set.intersection(range(ref_st,ref_en)) + * all_deletion_coordinates.append((ref_st,ref_en)) */ __pyx_t_1 = PyList_GET_ITEM(__pyx_v_ref_positions, __pyx_v_en); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_ref_en, __pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":208 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":209 * ref_st = ref_positions[st] * ref_en = idx-1 * if en < len(ref_positions): # <<<<<<<<<<<<<< @@ -7471,115 +7514,133 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s */ } - /* "CRISPResso2/CRISPRessoCOREResources.pyx":210 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":211 * if en < len(ref_positions): * ref_en = ref_positions[en] * all_deletion_positions.extend(range(ref_st,ref_en)) # <<<<<<<<<<<<<< + * all_deletion_coordinates.append((ref_st,ref_en)) * inc_del_pos = include_indx_set.intersection(range(ref_st,ref_en)) - * if(len(inc_del_pos)>0): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_ref_st); __Pyx_GIVEREF(__pyx_v_ref_st); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ref_st)) __PYX_ERR(0, 210, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ref_st)) __PYX_ERR(0, 211, __pyx_L1_error); __Pyx_INCREF(__pyx_v_ref_en); __Pyx_GIVEREF(__pyx_v_ref_en); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref_en)) __PYX_ERR(0, 210, __pyx_L1_error); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref_en)) __PYX_ERR(0, 211, __pyx_L1_error); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyList_Extend(__pyx_v_all_deletion_positions, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Extend(__pyx_v_all_deletion_positions, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":211 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":212 * ref_en = ref_positions[en] * all_deletion_positions.extend(range(ref_st,ref_en)) + * all_deletion_coordinates.append((ref_st,ref_en)) # <<<<<<<<<<<<<< + * inc_del_pos = include_indx_set.intersection(range(ref_st,ref_en)) + * if(len(inc_del_pos)>0): + */ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_ref_st); + __Pyx_GIVEREF(__pyx_v_ref_st); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ref_st)) __PYX_ERR(0, 212, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_ref_en); + __Pyx_GIVEREF(__pyx_v_ref_en); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ref_en)) __PYX_ERR(0, 212, __pyx_L1_error); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_all_deletion_coordinates, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "CRISPResso2/CRISPRessoCOREResources.pyx":213 + * all_deletion_positions.extend(range(ref_st,ref_en)) + * all_deletion_coordinates.append((ref_st,ref_en)) * inc_del_pos = include_indx_set.intersection(range(ref_st,ref_en)) # <<<<<<<<<<<<<< * if(len(inc_del_pos)>0): * deletion_positions.extend(range(ref_st,ref_en)) */ - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_ref_st); __Pyx_GIVEREF(__pyx_v_ref_st); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ref_st)) __PYX_ERR(0, 211, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ref_st)) __PYX_ERR(0, 213, __pyx_L1_error); __Pyx_INCREF(__pyx_v_ref_en); __Pyx_GIVEREF(__pyx_v_ref_en); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ref_en)) __PYX_ERR(0, 211, __pyx_L1_error); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ref_en)) __PYX_ERR(0, 213, __pyx_L1_error); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_intersection, __pyx_v_include_indx_set, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_intersection, __pyx_v_include_indx_set, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_inc_del_pos, __pyx_t_5); __pyx_t_5 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":212 - * all_deletion_positions.extend(range(ref_st,ref_en)) + /* "CRISPResso2/CRISPRessoCOREResources.pyx":214 + * all_deletion_coordinates.append((ref_st,ref_en)) * inc_del_pos = include_indx_set.intersection(range(ref_st,ref_en)) * if(len(inc_del_pos)>0): # <<<<<<<<<<<<<< * deletion_positions.extend(range(ref_st,ref_en)) * deletion_coordinates.append((ref_st,ref_en)) */ - __pyx_t_14 = PyObject_Length(__pyx_v_inc_del_pos); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_14 = PyObject_Length(__pyx_v_inc_del_pos); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 214, __pyx_L1_error) __pyx_t_6 = (__pyx_t_14 > 0); if (__pyx_t_6) { - /* "CRISPResso2/CRISPRessoCOREResources.pyx":213 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":215 * inc_del_pos = include_indx_set.intersection(range(ref_st,ref_en)) * if(len(inc_del_pos)>0): * deletion_positions.extend(range(ref_st,ref_en)) # <<<<<<<<<<<<<< * deletion_coordinates.append((ref_st,ref_en)) * deletion_sizes.append(en-st) */ - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_ref_st); __Pyx_GIVEREF(__pyx_v_ref_st); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ref_st)) __PYX_ERR(0, 213, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ref_st)) __PYX_ERR(0, 215, __pyx_L1_error); __Pyx_INCREF(__pyx_v_ref_en); __Pyx_GIVEREF(__pyx_v_ref_en); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ref_en)) __PYX_ERR(0, 213, __pyx_L1_error); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ref_en)) __PYX_ERR(0, 215, __pyx_L1_error); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyList_Extend(__pyx_v_deletion_positions, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Extend(__pyx_v_deletion_positions, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":214 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":216 * if(len(inc_del_pos)>0): * deletion_positions.extend(range(ref_st,ref_en)) * deletion_coordinates.append((ref_st,ref_en)) # <<<<<<<<<<<<<< * deletion_sizes.append(en-st) * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_ref_st); __Pyx_GIVEREF(__pyx_v_ref_st); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ref_st)) __PYX_ERR(0, 214, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ref_st)) __PYX_ERR(0, 216, __pyx_L1_error); __Pyx_INCREF(__pyx_v_ref_en); __Pyx_GIVEREF(__pyx_v_ref_en); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref_en)) __PYX_ERR(0, 214, __pyx_L1_error); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_deletion_coordinates, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 214, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref_en)) __PYX_ERR(0, 216, __pyx_L1_error); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_deletion_coordinates, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":215 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":217 * deletion_positions.extend(range(ref_st,ref_en)) * deletion_coordinates.append((ref_st,ref_en)) * deletion_sizes.append(en-st) # <<<<<<<<<<<<<< * * deletion_n = np.sum(deletion_sizes) */ - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_en - __pyx_v_st)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_en - __pyx_v_st)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_deletion_sizes, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_deletion_sizes, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":212 - * all_deletion_positions.extend(range(ref_st,ref_en)) + /* "CRISPResso2/CRISPRessoCOREResources.pyx":214 + * all_deletion_coordinates.append((ref_st,ref_en)) * inc_del_pos = include_indx_set.intersection(range(ref_st,ref_en)) * if(len(inc_del_pos)>0): # <<<<<<<<<<<<<< * deletion_positions.extend(range(ref_st,ref_en)) @@ -7587,7 +7648,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s */ } - /* "CRISPResso2/CRISPRessoCOREResources.pyx":202 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":203 * * include_indx_set = set(_include_indx) * for p in re_find_indels.finditer(read_seq_al): # <<<<<<<<<<<<<< @@ -7597,16 +7658,16 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":217 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":219 * deletion_sizes.append(en-st) * * deletion_n = np.sum(deletion_sizes) # <<<<<<<<<<<<<< * * for p in re_find_indels.finditer(ref_seq_al): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -7627,23 +7688,23 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_deletion_sizes}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 217, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_v_deletion_n = __pyx_t_8; __pyx_t_8 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":219 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":221 * deletion_n = np.sum(deletion_sizes) * * for p in re_find_indels.finditer(ref_seq_al): # <<<<<<<<<<<<<< * st,en=p.span() * #sometimes insertions run off the end of the reference */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re_find_indels); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re_find_indels); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_finditer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_finditer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -7664,7 +7725,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_ref_seq_al}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 219, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -7673,9 +7734,9 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -7684,28 +7745,28 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 219, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 221, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 221, __pyx_L1_error) #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 219, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 221, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 221, __pyx_L1_error) #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -7715,7 +7776,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 219, __pyx_L1_error) + else __PYX_ERR(0, 221, __pyx_L1_error) } break; } @@ -7724,14 +7785,14 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_8); __pyx_t_8 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":220 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":222 * * for p in re_find_indels.finditer(ref_seq_al): * st,en=p.span() # <<<<<<<<<<<<<< * #sometimes insertions run off the end of the reference * if st == 0: # if insertion happened before ref */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_span); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_span); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; __pyx_t_13 = 0; @@ -7751,7 +7812,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_13, 0+__pyx_t_13); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 220, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -7761,7 +7822,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 220, __pyx_L1_error) + __PYX_ERR(0, 222, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7774,15 +7835,15 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); @@ -7790,7 +7851,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L23_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 220, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 222, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L24_unpacking_done; @@ -7798,17 +7859,17 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 220, __pyx_L1_error) + __PYX_ERR(0, 222, __pyx_L1_error) __pyx_L24_unpacking_done:; } - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_st = __pyx_t_13; __pyx_v_en = __pyx_t_2; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":222 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":224 * st,en=p.span() * #sometimes insertions run off the end of the reference * if st == 0: # if insertion happened before ref # <<<<<<<<<<<<<< @@ -7818,7 +7879,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __pyx_t_6 = (__pyx_v_st == 0); if (__pyx_t_6) { - /* "CRISPResso2/CRISPRessoCOREResources.pyx":223 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":225 * #sometimes insertions run off the end of the reference * if st == 0: # if insertion happened before ref * continue # <<<<<<<<<<<<<< @@ -7827,7 +7888,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s */ goto __pyx_L21_continue; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":222 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":224 * st,en=p.span() * #sometimes insertions run off the end of the reference * if st == 0: # if insertion happened before ref # <<<<<<<<<<<<<< @@ -7836,18 +7897,18 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s */ } - /* "CRISPResso2/CRISPRessoCOREResources.pyx":224 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":226 * if st == 0: # if insertion happened before ref * continue * if en == len(ref_seq_al): # if insertion happened after ref # <<<<<<<<<<<<<< * continue * ref_st = ref_positions[st-1] */ - __pyx_t_14 = PyObject_Length(__pyx_v_ref_seq_al); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_14 = PyObject_Length(__pyx_v_ref_seq_al); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 226, __pyx_L1_error) __pyx_t_6 = (__pyx_v_en == __pyx_t_14); if (__pyx_t_6) { - /* "CRISPResso2/CRISPRessoCOREResources.pyx":225 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":227 * continue * if en == len(ref_seq_al): # if insertion happened after ref * continue # <<<<<<<<<<<<<< @@ -7856,7 +7917,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s */ goto __pyx_L21_continue; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":224 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":226 * if st == 0: # if insertion happened before ref * continue * if en == len(ref_seq_al): # if insertion happened after ref # <<<<<<<<<<<<<< @@ -7865,7 +7926,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s */ } - /* "CRISPResso2/CRISPRessoCOREResources.pyx":226 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":228 * if en == len(ref_seq_al): # if insertion happened after ref * continue * ref_st = ref_positions[st-1] # <<<<<<<<<<<<<< @@ -7878,7 +7939,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_XDECREF_SET(__pyx_v_ref_st, __pyx_t_8); __pyx_t_8 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":227 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":229 * continue * ref_st = ref_positions[st-1] * ref_en = ref_positions[en] # <<<<<<<<<<<<<< @@ -7890,100 +7951,100 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_XDECREF_SET(__pyx_v_ref_en, __pyx_t_8); __pyx_t_8 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":229 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":231 * ref_en = ref_positions[en] * * all_insertion_left_positions.append(ref_st) # <<<<<<<<<<<<<< * all_insertion_positions.append(ref_st) * all_insertion_positions.append(ref_en) */ - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_all_insertion_left_positions, __pyx_v_ref_st); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 229, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_all_insertion_left_positions, __pyx_v_ref_st); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 231, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":230 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":232 * * all_insertion_left_positions.append(ref_st) * all_insertion_positions.append(ref_st) # <<<<<<<<<<<<<< * all_insertion_positions.append(ref_en) * if(ref_st in _include_indx or ref_en in _include_indx): */ - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_all_insertion_positions, __pyx_v_ref_st); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_all_insertion_positions, __pyx_v_ref_st); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 232, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":231 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":233 * all_insertion_left_positions.append(ref_st) * all_insertion_positions.append(ref_st) * all_insertion_positions.append(ref_en) # <<<<<<<<<<<<<< * if(ref_st in _include_indx or ref_en in _include_indx): * insertion_coordinates.append((ref_st,ref_en)) */ - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_all_insertion_positions, __pyx_v_ref_en); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_all_insertion_positions, __pyx_v_ref_en); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 233, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":232 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":234 * all_insertion_positions.append(ref_st) * all_insertion_positions.append(ref_en) * if(ref_st in _include_indx or ref_en in _include_indx): # <<<<<<<<<<<<<< * insertion_coordinates.append((ref_st,ref_en)) * insertion_positions.append(ref_st) */ - __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_ref_st, __pyx_v__include_indx, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_ref_st, __pyx_v__include_indx, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 234, __pyx_L1_error) if (!__pyx_t_10) { } else { __pyx_t_6 = __pyx_t_10; goto __pyx_L28_bool_binop_done; } - __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_ref_en, __pyx_v__include_indx, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_ref_en, __pyx_v__include_indx, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 234, __pyx_L1_error) __pyx_t_6 = __pyx_t_10; __pyx_L28_bool_binop_done:; if (__pyx_t_6) { - /* "CRISPResso2/CRISPRessoCOREResources.pyx":233 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":235 * all_insertion_positions.append(ref_en) * if(ref_st in _include_indx or ref_en in _include_indx): * insertion_coordinates.append((ref_st,ref_en)) # <<<<<<<<<<<<<< * insertion_positions.append(ref_st) * insertion_positions.append(ref_en) */ - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_ref_st); __Pyx_GIVEREF(__pyx_v_ref_st); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ref_st)) __PYX_ERR(0, 233, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ref_st)) __PYX_ERR(0, 235, __pyx_L1_error); __Pyx_INCREF(__pyx_v_ref_en); __Pyx_GIVEREF(__pyx_v_ref_en); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ref_en)) __PYX_ERR(0, 233, __pyx_L1_error); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_insertion_coordinates, __pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 233, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ref_en)) __PYX_ERR(0, 235, __pyx_L1_error); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_insertion_coordinates, __pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":234 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":236 * if(ref_st in _include_indx or ref_en in _include_indx): * insertion_coordinates.append((ref_st,ref_en)) * insertion_positions.append(ref_st) # <<<<<<<<<<<<<< * insertion_positions.append(ref_en) * insertion_sizes.append(en-st) */ - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_insertion_positions, __pyx_v_ref_st); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_insertion_positions, __pyx_v_ref_st); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 236, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":235 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":237 * insertion_coordinates.append((ref_st,ref_en)) * insertion_positions.append(ref_st) * insertion_positions.append(ref_en) # <<<<<<<<<<<<<< * insertion_sizes.append(en-st) * */ - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_insertion_positions, __pyx_v_ref_en); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_insertion_positions, __pyx_v_ref_en); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 237, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":236 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":238 * insertion_positions.append(ref_st) * insertion_positions.append(ref_en) * insertion_sizes.append(en-st) # <<<<<<<<<<<<<< * * insertion_n = np.sum(insertion_sizes) */ - __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_en - __pyx_v_st)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_en - __pyx_v_st)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_insertion_sizes, __pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_insertion_sizes, __pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":232 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":234 * all_insertion_positions.append(ref_st) * all_insertion_positions.append(ref_en) * if(ref_st in _include_indx or ref_en in _include_indx): # <<<<<<<<<<<<<< @@ -7992,7 +8053,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s */ } - /* "CRISPResso2/CRISPRessoCOREResources.pyx":219 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":221 * deletion_n = np.sum(deletion_sizes) * * for p in re_find_indels.finditer(ref_seq_al): # <<<<<<<<<<<<<< @@ -8003,16 +8064,16 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":238 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":240 * insertion_sizes.append(en-st) * * insertion_n = np.sum(insertion_sizes) # <<<<<<<<<<<<<< * * retDict = { */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_sum); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_sum); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -8033,142 +8094,151 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_insertion_sizes}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_v_insertion_n = __pyx_t_1; __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":341 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":243 * * retDict = { * 'all_insertion_positions':all_insertion_positions, # <<<<<<<<<<<<<< * 'all_insertion_left_positions':all_insertion_left_positions, * 'insertion_positions':insertion_positions, */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_insertion_positions, __pyx_v_all_insertion_positions) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_insertion_positions, __pyx_v_all_insertion_positions) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":342 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":244 * retDict = { * 'all_insertion_positions':all_insertion_positions, * 'all_insertion_left_positions':all_insertion_left_positions, # <<<<<<<<<<<<<< * 'insertion_positions':insertion_positions, * 'insertion_coordinates':insertion_coordinates, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_insertion_left_positions, __pyx_v_all_insertion_left_positions) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_insertion_left_positions, __pyx_v_all_insertion_left_positions) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":243 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":245 * 'all_insertion_positions':all_insertion_positions, * 'all_insertion_left_positions':all_insertion_left_positions, * 'insertion_positions':insertion_positions, # <<<<<<<<<<<<<< * 'insertion_coordinates':insertion_coordinates, * 'insertion_sizes':insertion_sizes, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_insertion_positions, __pyx_v_insertion_positions) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_insertion_positions, __pyx_v_insertion_positions) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":244 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":246 * 'all_insertion_left_positions':all_insertion_left_positions, * 'insertion_positions':insertion_positions, * 'insertion_coordinates':insertion_coordinates, # <<<<<<<<<<<<<< * 'insertion_sizes':insertion_sizes, * 'insertion_n':insertion_n, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_insertion_coordinates, __pyx_v_insertion_coordinates) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_insertion_coordinates, __pyx_v_insertion_coordinates) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":245 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":247 * 'insertion_positions':insertion_positions, * 'insertion_coordinates':insertion_coordinates, * 'insertion_sizes':insertion_sizes, # <<<<<<<<<<<<<< * 'insertion_n':insertion_n, * 'all_deletion_positions':all_deletion_positions, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_insertion_sizes, __pyx_v_insertion_sizes) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_insertion_sizes, __pyx_v_insertion_sizes) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":246 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":248 * 'insertion_coordinates':insertion_coordinates, * 'insertion_sizes':insertion_sizes, * 'insertion_n':insertion_n, # <<<<<<<<<<<<<< * 'all_deletion_positions':all_deletion_positions, * */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_insertion_n, __pyx_v_insertion_n) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_insertion_n, __pyx_v_insertion_n) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":247 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":249 * 'insertion_sizes':insertion_sizes, * 'insertion_n':insertion_n, * 'all_deletion_positions':all_deletion_positions, # <<<<<<<<<<<<<< * * 'deletion_positions':deletion_positions, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_deletion_positions, __pyx_v_all_deletion_positions) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_deletion_positions, __pyx_v_all_deletion_positions) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":249 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":251 * 'all_deletion_positions':all_deletion_positions, * * 'deletion_positions':deletion_positions, # <<<<<<<<<<<<<< * 'deletion_coordinates':deletion_coordinates, - * 'deletion_sizes':deletion_sizes, + * 'all_deletion_coordinates':all_deletion_coordinates, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deletion_positions, __pyx_v_deletion_positions) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deletion_positions, __pyx_v_deletion_positions) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":250 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":252 * * 'deletion_positions':deletion_positions, * 'deletion_coordinates':deletion_coordinates, # <<<<<<<<<<<<<< + * 'all_deletion_coordinates':all_deletion_coordinates, * 'deletion_sizes':deletion_sizes, - * 'deletion_n':deletion_n, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deletion_coordinates, __pyx_v_deletion_coordinates) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deletion_coordinates, __pyx_v_deletion_coordinates) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":251 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":253 * 'deletion_positions':deletion_positions, * 'deletion_coordinates':deletion_coordinates, + * 'all_deletion_coordinates':all_deletion_coordinates, # <<<<<<<<<<<<<< + * 'deletion_sizes':deletion_sizes, + * 'deletion_n':deletion_n, + */ + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_deletion_coordinates, __pyx_v_all_deletion_coordinates) < 0) __PYX_ERR(0, 243, __pyx_L1_error) + + /* "CRISPResso2/CRISPRessoCOREResources.pyx":254 + * 'deletion_coordinates':deletion_coordinates, + * 'all_deletion_coordinates':all_deletion_coordinates, * 'deletion_sizes':deletion_sizes, # <<<<<<<<<<<<<< * 'deletion_n':deletion_n, * */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deletion_sizes, __pyx_v_deletion_sizes) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deletion_sizes, __pyx_v_deletion_sizes) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":252 - * 'deletion_coordinates':deletion_coordinates, + /* "CRISPResso2/CRISPRessoCOREResources.pyx":255 + * 'all_deletion_coordinates':all_deletion_coordinates, * 'deletion_sizes':deletion_sizes, * 'deletion_n':deletion_n, # <<<<<<<<<<<<<< * * 'all_substitution_positions':all_substitution_positions, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deletion_n, __pyx_v_deletion_n) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deletion_n, __pyx_v_deletion_n) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":254 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":257 * 'deletion_n':deletion_n, * * 'all_substitution_positions':all_substitution_positions, # <<<<<<<<<<<<<< * 'substitution_positions':substitution_positions, * 'all_substitution_values':np.array(all_substitution_values), */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_substitution_positions, __pyx_v_all_substitution_positions) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_substitution_positions, __pyx_v_all_substitution_positions) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":355 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":258 * * 'all_substitution_positions':all_substitution_positions, * 'substitution_positions':substitution_positions, # <<<<<<<<<<<<<< * 'all_substitution_values':np.array(all_substitution_values), * 'substitution_values':np.array(substitution_values), */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_substitution_positions, __pyx_v_substitution_positions) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_substitution_positions, __pyx_v_substitution_positions) < 0) __PYX_ERR(0, 243, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":256 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":259 * 'all_substitution_positions':all_substitution_positions, * 'substitution_positions':substitution_positions, * 'all_substitution_values':np.array(all_substitution_values), # <<<<<<<<<<<<<< * 'substitution_values':np.array(substitution_values), * 'substitution_n':substitution_n, */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -8189,23 +8259,23 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_all_substitution_values}; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 356, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_substitution_values, __pyx_t_9) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_all_substitution_values, __pyx_t_9) < 0) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":257 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":260 * 'substitution_positions':substitution_positions, * 'all_substitution_values':np.array(all_substitution_values), * 'substitution_values':np.array(substitution_values), # <<<<<<<<<<<<<< * 'substitution_n':substitution_n, * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -8226,37 +8296,37 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_substitution_values}; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 357, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_substitution_values, __pyx_t_9) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_substitution_values, __pyx_t_9) < 0) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":258 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":261 * 'all_substitution_values':np.array(all_substitution_values), * 'substitution_values':np.array(substitution_values), * 'substitution_n':substitution_n, # <<<<<<<<<<<<<< * * 'ref_positions':ref_positions, */ - __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_substitution_n); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_substitution_n); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_substitution_n, __pyx_t_9) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_substitution_n, __pyx_t_9) < 0) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":260 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":263 * 'substitution_n':substitution_n, * * 'ref_positions':ref_positions, # <<<<<<<<<<<<<< * } * return retDict */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ref_positions, __pyx_v_ref_positions) < 0) __PYX_ERR(0, 341, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ref_positions, __pyx_v_ref_positions) < 0) __PYX_ERR(0, 243, __pyx_L1_error) __pyx_v_retDict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":262 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":265 * 'ref_positions':ref_positions, * } * return retDict # <<<<<<<<<<<<<< @@ -8296,6 +8366,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s __Pyx_XDECREF(__pyx_v_all_deletion_positions); __Pyx_XDECREF(__pyx_v_deletion_positions); __Pyx_XDECREF(__pyx_v_deletion_coordinates); + __Pyx_XDECREF(__pyx_v_all_deletion_coordinates); __Pyx_XDECREF(__pyx_v_deletion_sizes); __Pyx_XDECREF(__pyx_v_all_insertion_positions); __Pyx_XDECREF(__pyx_v_all_insertion_left_positions); @@ -8315,7 +8386,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_2find_indels_s return __pyx_r; } -/* "CRISPResso2/CRISPRessoCOREResources.pyx":365 +/* "CRISPResso2/CRISPRessoCOREResources.pyx":268 * * * def calculate_homology(a, b): # <<<<<<<<<<<<<< @@ -8379,7 +8450,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 268, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -8387,14 +8458,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 268, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("calculate_homology", 1, 2, 2, 1); __PYX_ERR(0, 365, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("calculate_homology", 1, 2, 2, 1); __PYX_ERR(0, 268, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "calculate_homology") < 0)) __PYX_ERR(0, 365, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "calculate_homology") < 0)) __PYX_ERR(0, 268, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -8407,7 +8478,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("calculate_homology", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 265, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("calculate_homology", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 268, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8453,27 +8524,27 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_4calculate_hom int __pyx_clineno = 0; __Pyx_RefNannySetupContext("calculate_homology", 1); - /* "CRISPResso2/CRISPRessoCOREResources.pyx":366 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":269 * * def calculate_homology(a, b): * cdef char *al = a # <<<<<<<<<<<<<< * cdef char *bl = b * cdef size_t l = strlen(al) */ - __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_a); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_a); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error) __pyx_v_al = __pyx_t_1; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":367 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":270 * def calculate_homology(a, b): * cdef char *al = a * cdef char *bl = b # <<<<<<<<<<<<<< * cdef size_t l = strlen(al) * cdef float score = 0.0 */ - __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 270, __pyx_L1_error) __pyx_v_bl = __pyx_t_1; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":368 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":271 * cdef char *al = a * cdef char *bl = b * cdef size_t l = strlen(al) # <<<<<<<<<<<<<< @@ -8482,7 +8553,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_4calculate_hom */ __pyx_v_l = strlen(__pyx_v_al); - /* "CRISPResso2/CRISPRessoCOREResources.pyx":369 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":272 * cdef char *bl = b * cdef size_t l = strlen(al) * cdef float score = 0.0 # <<<<<<<<<<<<<< @@ -8491,7 +8562,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_4calculate_hom */ __pyx_v_score = 0.0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":371 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":274 * cdef float score = 0.0 * * for i in range(l): # <<<<<<<<<<<<<< @@ -8503,7 +8574,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_4calculate_hom for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":372 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":275 * * for i in range(l): * if al[i] == bl[i]: # <<<<<<<<<<<<<< @@ -8513,7 +8584,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_4calculate_hom __pyx_t_5 = ((__pyx_v_al[__pyx_v_i]) == (__pyx_v_bl[__pyx_v_i])); if (__pyx_t_5) { - /* "CRISPResso2/CRISPRessoCOREResources.pyx":373 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":276 * for i in range(l): * if al[i] == bl[i]: * score+=1 # <<<<<<<<<<<<<< @@ -8521,7 +8592,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_4calculate_hom */ __pyx_v_score = (__pyx_v_score + 1.0); - /* "CRISPResso2/CRISPRessoCOREResources.pyx":372 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":275 * * for i in range(l): * if al[i] == bl[i]: # <<<<<<<<<<<<<< @@ -8531,7 +8602,7 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_4calculate_hom } } - /* "CRISPResso2/CRISPRessoCOREResources.pyx":374 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":277 * if al[i] == bl[i]: * score+=1 * return score/l # <<<<<<<<<<<<<< @@ -8539,15 +8610,15 @@ static PyObject *__pyx_pf_11CRISPResso2_23CRISPRessoCOREResources_4calculate_hom __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_l == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 374, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_6 = PyFloat_FromDouble((__pyx_v_score / ((float)__pyx_v_l))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_score / ((float)__pyx_v_l))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":365 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":268 * * * def calculate_homology(a, b): # <<<<<<<<<<<<<< @@ -8788,22 +8859,22 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * @cython.nonecheck(False) * @cython.wraparound(False) */ - __pyx_tuple__16 = PyTuple_Pack(33, __pyx_n_s_read_seq_al, __pyx_n_s_ref_seq_al, __pyx_n_s_include_indx, __pyx_n_s_sub_seq, __pyx_n_s_st, __pyx_n_s_en, __pyx_n_s_idx_c, __pyx_n_s_idx, __pyx_n_s_ref_positions, __pyx_n_s_all_substitution_positions, __pyx_n_s_substitution_positions, __pyx_n_s_all_substitution_values, __pyx_n_s_substitution_values, __pyx_n_s_nucSet, __pyx_n_s_c, __pyx_n_s_substitution_n, __pyx_n_s_all_deletion_positions, __pyx_n_s_deletion_positions, __pyx_n_s_deletion_coordinates, __pyx_n_s_deletion_sizes, __pyx_n_s_all_insertion_positions, __pyx_n_s_all_insertion_left_positions, __pyx_n_s_insertion_positions, __pyx_n_s_insertion_coordinates, __pyx_n_s_insertion_sizes, __pyx_n_s_include_indx_set, __pyx_n_s_p, __pyx_n_s_ref_st, __pyx_n_s_ref_en, __pyx_n_s_inc_del_pos, __pyx_n_s_deletion_n, __pyx_n_s_insertion_n, __pyx_n_s_retDict); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 238, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__16); - __Pyx_GIVEREF(__pyx_tuple__16); - __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 33, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_CRISPResso2_CRISPRessoCOREResour_2, __pyx_n_s_find_indels_substitutions_legacy, 238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(34, __pyx_n_s_read_seq_al, __pyx_n_s_ref_seq_al, __pyx_n_s_include_indx, __pyx_n_s_sub_seq, __pyx_n_s_st, __pyx_n_s_en, __pyx_n_s_idx_c, __pyx_n_s_idx, __pyx_n_s_ref_positions, __pyx_n_s_all_substitution_positions, __pyx_n_s_substitution_positions, __pyx_n_s_all_substitution_values, __pyx_n_s_substitution_values, __pyx_n_s_nucSet, __pyx_n_s_c, __pyx_n_s_substitution_n, __pyx_n_s_all_deletion_positions, __pyx_n_s_deletion_positions, __pyx_n_s_deletion_coordinates, __pyx_n_s_all_deletion_coordinates, __pyx_n_s_deletion_sizes, __pyx_n_s_all_insertion_positions, __pyx_n_s_all_insertion_left_positions, __pyx_n_s_insertion_positions, __pyx_n_s_insertion_coordinates, __pyx_n_s_insertion_sizes, __pyx_n_s_include_indx_set, __pyx_n_s_p, __pyx_n_s_ref_st, __pyx_n_s_ref_en, __pyx_n_s_inc_del_pos, __pyx_n_s_deletion_n, __pyx_n_s_insertion_n, __pyx_n_s_retDict); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 34, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_CRISPResso2_CRISPRessoCOREResour, __pyx_n_s_find_indels_substitutions_legacy, 138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 138, __pyx_L1_error) - /* "CRISPResso2/CRISPRessoCOREResources.pyx":365 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":268 * * * def calculate_homology(a, b): # <<<<<<<<<<<<<< * cdef char *al = a * cdef char *bl = b */ - __pyx_tuple__18 = PyTuple_Pack(7, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_al, __pyx_n_s_bl, __pyx_n_s_l, __pyx_n_s_score, __pyx_n_s_i); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 365, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__18); - __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_CRISPResso2_CRISPRessoCOREResour_2, __pyx_n_s_calculate_homology, 365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(7, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_al, __pyx_n_s_bl, __pyx_n_s_l, __pyx_n_s_score, __pyx_n_s_i); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_CRISPResso2_CRISPRessoCOREResour, __pyx_n_s_calculate_homology, 268, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -8900,33 +8971,33 @@ static int __Pyx_modinit_type_import_code(void) { /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_9(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_10(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyTypeObject), #else - sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyHeapTypeObject), + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyHeapTypeObject), #endif - __Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_9); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 202, __pyx_L1_error) - __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_9); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 225, __pyx_L1_error) - __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_9); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 229, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_9); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 238, __pyx_L1_error) - __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 809, __pyx_L1_error) - __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 811, __pyx_L1_error) - __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 813, __pyx_L1_error) - __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 815, __pyx_L1_error) - __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 817, __pyx_L1_error) - __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 819, __pyx_L1_error) - __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 821, __pyx_L1_error) - __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 823, __pyx_L1_error) - __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 825, __pyx_L1_error) - __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_9); if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 827, __pyx_L1_error) - __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_9(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_9(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_9); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 866, __pyx_L1_error) + __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 202, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 225, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 229, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 238, __pyx_L1_error) + __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 809, __pyx_L1_error) + __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 811, __pyx_L1_error) + __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 813, __pyx_L1_error) + __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 815, __pyx_L1_error) + __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 817, __pyx_L1_error) + __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 819, __pyx_L1_error) + __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 821, __pyx_L1_error) + __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 823, __pyx_L1_error) + __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 825, __pyx_L1_error) + __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 827, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -9296,16 +9367,16 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_indels_substitutions_legacy, __pyx_t_2) < 0) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "CRISPResso2/CRISPRessoCOREResources.pyx":365 + /* "CRISPResso2/CRISPRessoCOREResources.pyx":268 * * * def calculate_homology(a, b): # <<<<<<<<<<<<<< * cdef char *al = a * cdef char *bl = b */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11CRISPResso2_23CRISPRessoCOREResources_5calculate_homology, 0, __pyx_n_s_calculate_homology, NULL, __pyx_n_s_CRISPResso2_CRISPRessoCOREResour, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11CRISPResso2_23CRISPRessoCOREResources_5calculate_homology, 0, __pyx_n_s_calculate_homology, NULL, __pyx_n_s_CRISPResso2_CRISPRessoCOREResour_2, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculate_homology, __pyx_t_2) < 0) __PYX_ERR(0, 365, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculate_homology, __pyx_t_2) < 0) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "CRISPResso2/CRISPRessoCOREResources.pyx":1 @@ -10960,10 +11031,10 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { } /* TypeImport */ -#ifndef __PYX_HAVE_RT_ImportType_3_0_9 -#define __PYX_HAVE_RT_ImportType_3_0_9 -static PyTypeObject *__Pyx_ImportType_3_0_9(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_9 check_size) +#ifndef __PYX_HAVE_RT_ImportType_3_0_10 +#define __PYX_HAVE_RT_ImportType_3_0_10 +static PyTypeObject *__Pyx_ImportType_3_0_10(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_10 check_size) { PyObject *result = 0; char warning[200]; @@ -11017,7 +11088,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_9(PyObject *module, const char *module module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_9 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_10 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -11025,7 +11096,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_9(PyObject *module, const char *module module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_9 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_10 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", diff --git a/CRISPResso2/CRISPRessoCOREResources.pyx b/CRISPResso2/CRISPRessoCOREResources.pyx index 4b6a22f1..8a9d9fec 100644 --- a/CRISPResso2/CRISPRessoCOREResources.pyx +++ b/CRISPResso2/CRISPRessoCOREResources.pyx @@ -250,6 +250,7 @@ def find_indels_substitutions_legacy(read_seq_al, ref_seq_al, _include_indx): all_deletion_positions=[] deletion_positions=[] deletion_coordinates=[] + all_deletion_coordinates=[] deletion_sizes=[] all_insertion_positions=[] @@ -268,6 +269,7 @@ def find_indels_substitutions_legacy(read_seq_al, ref_seq_al, _include_indx): if en < len(ref_positions): ref_en = ref_positions[en] all_deletion_positions.extend(range(ref_st,ref_en)) + all_deletion_coordinates.append((ref_st,ref_en)) inc_del_pos = include_indx_set.intersection(range(ref_st,ref_en)) if(len(inc_del_pos)>0): deletion_positions.extend(range(ref_st,ref_en)) @@ -308,6 +310,7 @@ def find_indels_substitutions_legacy(read_seq_al, ref_seq_al, _include_indx): 'deletion_positions':deletion_positions, 'deletion_coordinates':deletion_coordinates, + 'all_deletion_coordinates':all_deletion_coordinates, 'deletion_sizes':deletion_sizes, 'deletion_n':deletion_n, diff --git a/tests/unit_tests/test_CRISPRessoCOREResources.py b/tests/unit_tests/test_CRISPRessoCOREResources.py index 17b6f801..e479a0a5 100644 --- a/tests/unit_tests/test_CRISPRessoCOREResources.py +++ b/tests/unit_tests/test_CRISPRessoCOREResources.py @@ -31,6 +31,7 @@ def test_find_indels_substitutions(): assert payload['substitution_n'] == 0 assert payload['deletion_n'] == 3 assert payload['all_deletion_positions'] == [18, 19, 20] + assert payload['all_deletion_coordinates'] == [(18, 21)] assert payload['deletion_positions'] == [18, 19, 20] assert payload['deletion_coordinates'] == [(18, 21)] @@ -90,6 +91,7 @@ def test_find_indels_substitutions(): 'insertion_sizes': [12], 'insertion_n': 12, 'all_deletion_positions': [101, 116, 117, 132, 133, 134, 135, 136], + 'all_deletion_coordinates': [(101, 102), (116, 118), (132, 137)], 'deletion_positions': [], 'deletion_coordinates': [], 'deletion_sizes': [], @@ -106,6 +108,7 @@ def test_find_indels_substitutions(): assert payload['insertion_sizes'] == correct_payload['insertion_sizes'] assert payload['insertion_n'] == correct_payload['insertion_n'] assert payload['all_deletion_positions'] == correct_payload['all_deletion_positions'] + assert payload['all_deletion_coordinates'] == correct_payload['all_deletion_coordinates'] assert payload['deletion_positions'] == correct_payload['deletion_positions'] assert payload['deletion_sizes'] == correct_payload['deletion_sizes'] assert payload['deletion_n'] == correct_payload['deletion_n'] @@ -129,6 +132,7 @@ def test_find_indels_substitutions(): 'insertion_sizes': [54], 'insertion_n': 54, 'all_deletion_positions': [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], + 'all_deletion_coordinates': [(191, 222)], 'deletion_positions': [], 'deletion_coordinates': [], 'deletion_sizes': [], @@ -145,6 +149,48 @@ def test_find_indels_substitutions(): assert payload['insertion_sizes'] == correct_payload['insertion_sizes'] assert payload['insertion_n'] == correct_payload['insertion_n'] assert payload['all_deletion_positions'] == correct_payload['all_deletion_positions'] + assert payload['all_deletion_coordinates'] == correct_payload['all_deletion_coordinates'] + assert payload['deletion_positions'] == correct_payload['deletion_positions'] + assert payload['deletion_sizes'] == correct_payload['deletion_sizes'] + assert payload['deletion_n'] == correct_payload['deletion_n'] + assert payload['all_substitution_positions'] == correct_payload['all_substitution_positions'] + assert payload['substitution_positions'] == correct_payload['substitution_positions'] + assert payload['substitution_n'] == correct_payload['substitution_n'] + assert payload['ref_positions'] == correct_payload['ref_positions'] + + +def test_find_indels_substitutions_legacy(): + payload = CRISPRessoCOREResources.find_indels_substitutions_legacy( + 'TAATCGGATGTTCCAATCAGTACGCAGAGAGTCGCCGTCTCCAAGGTGAAAGCGGAAGTAGGGCCTTCGCGCACCTCATGGAATCCCTTCTGCAAGAGGGCGGCTTTGGGCGGGGTC-CAGTTCCGGGATTA--GCGAACTTAGAGCAC-----ACGTCTGAACTCCAGTCACCGATGTATATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAAACTTACTCTCACTTAACTCTTGCTTCCCTCCTGACGCCGATG', + '----CGGATGTTCCAATCAGTACGCAGAGAGTCGCCGTCTCCAAGGTGAAAGCGGAAGTAGGGCCTTCGCGCACCTCATGGAATCCCTTCTGCAGC------------ACCTGGATCGCTTTTCCGAGCTTCTGGCGGTCTCA-AGCACTACCTACGTCAGCACCTGGGACCCCGCCAC------CGTGCGCCGGGC----CTTGCAGTGGGCGCGCTACCTGCGCCACATCCATCGG--CGCTTTGGTCGG-----', + [91, 92], + ) + correct_payload = { + 'all_insertion_positions': [91, 92, 126, 127, 161, 162, 173, 174, 210, 211], + 'all_insertion_left_positions': [91, 126, 161, 173, 210], + 'insertion_positions': [91, 92], + 'insertion_coordinates': [(91, 92)], + 'insertion_sizes': [12], + 'insertion_n': 12, + 'all_deletion_positions': [101, 116, 117, 132, 133, 134, 135, 136], + 'all_deletion_coordinates': [(101, 102), (116, 118), (132, 137)], + 'deletion_positions': [], + 'deletion_coordinates': [], + 'deletion_sizes': [], + 'deletion_n': 0.0, + 'all_substitution_positions': [90, 91, 92, 93, 95, 98, 103, 104, 110, 112, 115, 121, 122, 125, 142, 144, 147, 148, 149, 150, 152, 154, 158, 159, 160, 161, 165, 166, 171, 172, 173, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 191, 192, 195, 196, 197, 198, 200, 201, 203, 205, 206, 208, 210, 212, 215, 216, 217, 219, 222], + 'substitution_positions': [91, 92], + 'substitution_n': 2, + 'ref_positions': [-1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 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, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 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, 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, 153, 154, 155, 156, 157, 158, 159, 160, 161, -162, -162, -162, -162, -162, -162, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, -174, -174, -174, -174, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, -211, -211, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, -223, -223, -223, -223, -223], + } + assert payload['all_insertion_positions'] == correct_payload['all_insertion_positions'] + assert payload['all_insertion_left_positions'] == correct_payload['all_insertion_left_positions'] + assert payload['insertion_positions'] == correct_payload['insertion_positions'] + assert payload['insertion_coordinates'] == correct_payload['insertion_coordinates'] + assert payload['insertion_sizes'] == correct_payload['insertion_sizes'] + assert payload['insertion_n'] == correct_payload['insertion_n'] + assert payload['all_deletion_positions'] == correct_payload['all_deletion_positions'] + assert payload['all_deletion_coordinates'] == correct_payload['all_deletion_coordinates'] assert payload['deletion_positions'] == correct_payload['deletion_positions'] assert payload['deletion_sizes'] == correct_payload['deletion_sizes'] assert payload['deletion_n'] == correct_payload['deletion_n']