718
672
#ifndef PYREX_WITHOUT_ASSERTIONS
719
673
if (unlikely(!(__pyx_v_window < 100))) {
720
674
PyErr_SetNone(PyExc_AssertionError);
721
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
675
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
725
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":36
679
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":32
726
680
* cdef int scores[100] # yuk - use malloc?
727
681
* assert window < 100
728
682
* len1 = len(seq1) # <<<<<<<<<<<<<<
729
683
* len2 = len(seq2)
732
__pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_seq1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
686
__pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_seq1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
733
687
__Pyx_GOTREF(__pyx_t_1);
734
__pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
688
__pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
735
689
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
736
690
__pyx_v_len1 = __pyx_t_2;
738
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":37
692
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":33
739
693
* assert window < 100
740
694
* len1 = len(seq1)
741
695
* len2 = len(seq2) # <<<<<<<<<<<<<<
745
__pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_seq2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
699
__pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_seq2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
746
700
__Pyx_GOTREF(__pyx_t_1);
747
__pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
701
__pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
748
702
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
749
703
__pyx_v_len2 = __pyx_t_2;
751
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":38
705
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":34
752
706
* len1 = len(seq1)
753
707
* len2 = len(seq2)
754
708
* result = [] # <<<<<<<<<<<<<<
756
* band = max(len1, len2)
710
* for i from 0 <= i < window:
758
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
712
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
759
713
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
760
714
__Pyx_DECREF(__pyx_v_result);
761
715
__pyx_v_result = ((PyObject *)__pyx_t_1);
718
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":35
721
* was_high = 0 # <<<<<<<<<<<<<<
722
* for i from 0 <= i < window:
725
__pyx_v_was_high = 0;
727
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":36
730
* for i from 0 <= i < window: # <<<<<<<<<<<<<<
734
__pyx_t_3 = __pyx_v_window;
735
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
737
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":37
739
* for i from 0 <= i < window:
740
* scores[i] = 0 # <<<<<<<<<<<<<<
742
* i_lo = cmax(0, 0-diagonal)
744
(__pyx_v_scores[__pyx_v_i]) = 0;
747
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":38
748
* for i from 0 <= i < window:
750
* score = 0 # <<<<<<<<<<<<<<
751
* i_lo = cmax(0, 0-diagonal)
752
* i_hi = cmin(len1, len2-diagonal)
764
756
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":39
767
* if band is None: # <<<<<<<<<<<<<<
768
* band = max(len1, len2)
769
* for diagonal in range(-1*min(len1, band), min(len2, band)+1):
759
* i_lo = cmax(0, 0-diagonal) # <<<<<<<<<<<<<<
760
* i_hi = cmin(len1, len2-diagonal)
771
__pyx_t_3 = (__pyx_v_band == Py_None);
763
__pyx_v_i_lo = __pyx_f_6cogent_5align_8_compare_cmax(0, (0 - __pyx_v_diagonal));
774
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":40
777
* band = max(len1, len2) # <<<<<<<<<<<<<<
778
* for diagonal in range(-1*min(len1, band), min(len2, band)+1):
779
* if PyErr_CheckSignals():
765
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":40
767
* i_lo = cmax(0, 0-diagonal)
768
* i_hi = cmin(len1, len2-diagonal) # <<<<<<<<<<<<<<
770
* for i from i_lo <= i < i_hi:
781
__pyx_t_1 = PyInt_FromLong(__pyx_v_len1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
782
__Pyx_GOTREF(__pyx_t_1);
783
__pyx_t_4 = PyInt_FromLong(__pyx_v_len2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
784
__Pyx_GOTREF(__pyx_t_4);
785
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
786
__Pyx_GOTREF(__pyx_t_5);
787
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
788
__Pyx_GIVEREF(__pyx_t_1);
789
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
790
__Pyx_GIVEREF(__pyx_t_4);
793
__pyx_t_4 = PyObject_Call(__pyx_builtin_max, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
794
__Pyx_GOTREF(__pyx_t_4);
795
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
796
__Pyx_DECREF(__pyx_v_band);
797
__pyx_v_band = __pyx_t_4;
772
__pyx_v_i_hi = __pyx_f_6cogent_5align_8_compare_cmin(__pyx_v_len1, (__pyx_v_len2 - __pyx_v_diagonal));
803
774
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":41
805
* band = max(len1, len2)
806
* for diagonal in range(-1*min(len1, band), min(len2, band)+1): # <<<<<<<<<<<<<<
807
* if PyErr_CheckSignals():
808
* raise PyErr_Occurred()
810
__pyx_t_4 = PyInt_FromLong(__pyx_v_len2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
811
__Pyx_GOTREF(__pyx_t_4);
812
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
813
__Pyx_GOTREF(__pyx_t_5);
814
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
815
__Pyx_GIVEREF(__pyx_t_4);
816
__Pyx_INCREF(__pyx_v_band);
817
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_band);
818
__Pyx_GIVEREF(__pyx_v_band);
820
__pyx_t_4 = PyObject_Call(__pyx_builtin_min, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
821
__Pyx_GOTREF(__pyx_t_4);
822
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
823
__pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
824
__Pyx_GOTREF(__pyx_t_5);
825
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
826
__pyx_t_6 = __Pyx_PyInt_AsLong(__pyx_t_5); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
827
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
828
__pyx_t_5 = PyInt_FromLong(__pyx_v_len1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
829
__Pyx_GOTREF(__pyx_t_5);
830
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
831
__Pyx_GOTREF(__pyx_t_4);
832
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
833
__Pyx_GIVEREF(__pyx_t_5);
834
__Pyx_INCREF(__pyx_v_band);
835
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_band);
836
__Pyx_GIVEREF(__pyx_v_band);
838
__pyx_t_5 = PyObject_Call(__pyx_builtin_min, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
839
__Pyx_GOTREF(__pyx_t_5);
840
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
841
__pyx_t_4 = PyNumber_Multiply(__pyx_int_neg_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
842
__Pyx_GOTREF(__pyx_t_4);
843
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
844
__pyx_t_7 = __Pyx_PyInt_AsLong(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
845
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
846
for (__pyx_t_8 = __pyx_t_7; __pyx_t_8 < __pyx_t_6; __pyx_t_8+=1) {
847
__pyx_v_diagonal = __pyx_t_8;
849
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":42
850
* band = max(len1, len2)
851
* for diagonal in range(-1*min(len1, band), min(len2, band)+1):
852
* if PyErr_CheckSignals(): # <<<<<<<<<<<<<<
853
* raise PyErr_Occurred()
856
__pyx_t_9 = PyErr_CheckSignals();
859
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":43
860
* for diagonal in range(-1*min(len1, band), min(len2, band)+1):
861
* if PyErr_CheckSignals():
862
* raise PyErr_Occurred() # <<<<<<<<<<<<<<
864
* end = -1 * (min_gap_length+1)
866
__pyx_t_4 = PyErr_Occurred(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
867
__Pyx_GOTREF(__pyx_t_4);
868
__Pyx_Raise(__pyx_t_4, 0, 0);
869
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
870
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
775
* i_lo = cmax(0, 0-diagonal)
776
* i_hi = cmin(len1, len2-diagonal)
777
* prior_end = 0 # <<<<<<<<<<<<<<
778
* for i from i_lo <= i < i_hi:
781
__pyx_v_prior_end = 0;
783
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":42
784
* i_hi = cmin(len1, len2-diagonal)
786
* for i from i_lo <= i < i_hi: # <<<<<<<<<<<<<<
790
__pyx_t_3 = __pyx_v_i_hi;
791
for (__pyx_v_i = __pyx_v_i_lo; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
793
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":43
795
* for i from i_lo <= i < i_hi:
796
* j = i + diagonal # <<<<<<<<<<<<<<
800
__pyx_v_j = (__pyx_v_i + __pyx_v_diagonal);
875
802
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":44
876
* if PyErr_CheckSignals():
877
* raise PyErr_Occurred()
878
* was_high = 0 # <<<<<<<<<<<<<<
879
* end = -1 * (min_gap_length+1)
880
* for i from 0 <= i < window:
803
* for i from i_lo <= i < i_hi:
805
* k = i % window # <<<<<<<<<<<<<<
807
* scores[k] = (seq1[i] == seq2[j])
882
__pyx_v_was_high = 0;
809
if (unlikely(__pyx_v_window == 0)) {
810
PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
811
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
813
__pyx_v_k = __Pyx_mod_int(__pyx_v_i, __pyx_v_window);
884
815
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":45
885
* raise PyErr_Occurred()
887
* end = -1 * (min_gap_length+1) # <<<<<<<<<<<<<<
888
* for i from 0 <= i < window:
818
* score -= scores[k] # <<<<<<<<<<<<<<
819
* scores[k] = (seq1[i] == seq2[j])
891
__pyx_t_4 = PyNumber_Add(__pyx_v_min_gap_length, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
892
__Pyx_GOTREF(__pyx_t_4);
893
__pyx_t_5 = PyNumber_Multiply(__pyx_int_neg_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
894
__Pyx_GOTREF(__pyx_t_5);
895
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
896
__pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
897
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
898
__pyx_v_end = __pyx_t_9;
822
__pyx_v_score -= (__pyx_v_scores[__pyx_v_k]);
900
824
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":46
902
* end = -1 * (min_gap_length+1)
903
* for i from 0 <= i < window: # <<<<<<<<<<<<<<
827
* scores[k] = (seq1[i] == seq2[j]) # <<<<<<<<<<<<<<
829
* if score >= threshold:
907
__pyx_t_9 = __pyx_v_window;
908
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {
831
(__pyx_v_scores[__pyx_v_k]) = ((__pyx_v_seq1[__pyx_v_i]) == (__pyx_v_seq2[__pyx_v_j]));
910
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":47
911
* end = -1 * (min_gap_length+1)
912
* for i from 0 <= i < window:
913
* scores[i] = 0 # <<<<<<<<<<<<<<
915
* i_lo = cmax(0, 0-diagonal)
833
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":47
835
* scores[k] = (seq1[i] == seq2[j])
836
* score += scores[k] # <<<<<<<<<<<<<<
837
* if score >= threshold:
917
(__pyx_v_scores[__pyx_v_i]) = 0;
840
__pyx_v_score += (__pyx_v_scores[__pyx_v_k]);
920
842
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":48
921
* for i from 0 <= i < window:
923
* score = 0 # <<<<<<<<<<<<<<
924
* i_lo = cmax(0, 0-diagonal)
925
* i_hi = cmin(len1, len2-diagonal)
929
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":49
932
* i_lo = cmax(0, 0-diagonal) # <<<<<<<<<<<<<<
933
* i_hi = cmin(len1, len2-diagonal)
936
__pyx_v_i_lo = __pyx_f_6cogent_5align_8_compare_cmax(0, (0 - __pyx_v_diagonal));
938
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":50
940
* i_lo = cmax(0, 0-diagonal)
941
* i_hi = cmin(len1, len2-diagonal) # <<<<<<<<<<<<<<
943
* if diagonal %100 == 0:
945
__pyx_v_i_hi = __pyx_f_6cogent_5align_8_compare_cmin(__pyx_v_len1, (__pyx_v_len2 - __pyx_v_diagonal));
947
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":51
948
* i_lo = cmax(0, 0-diagonal)
949
* i_hi = cmin(len1, len2-diagonal)
950
* if progress: # <<<<<<<<<<<<<<
951
* if diagonal %100 == 0:
952
* print diagonal, (i_lo, i_lo+diagonal), (i_hi, i_hi+diagonal), len(result)
954
__pyx_t_9 = __pyx_v_progress;
957
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":52
958
* i_hi = cmin(len1, len2-diagonal)
960
* if diagonal %100 == 0: # <<<<<<<<<<<<<<
961
* print diagonal, (i_lo, i_lo+diagonal), (i_hi, i_hi+diagonal), len(result)
962
* for i from i_lo <= i < i_hi:
964
__pyx_t_3 = (__Pyx_mod_long(__pyx_v_diagonal, 100) == 0);
967
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":53
969
* if diagonal %100 == 0:
970
* print diagonal, (i_lo, i_lo+diagonal), (i_hi, i_hi+diagonal), len(result) # <<<<<<<<<<<<<<
971
* for i from i_lo <= i < i_hi:
974
__pyx_t_5 = PyInt_FromLong(__pyx_v_diagonal); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
843
* scores[k] = (seq1[i] == seq2[j])
845
* if score >= threshold: # <<<<<<<<<<<<<<
847
* start = cmax(i_lo, i - window)
849
__pyx_t_4 = (__pyx_v_score >= __pyx_v_threshold);
852
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":49
854
* if score >= threshold:
855
* if not was_high: # <<<<<<<<<<<<<<
856
* start = cmax(i_lo, i - window)
857
* if min_gap_length and prior_end:
859
__pyx_t_4 = (!__pyx_v_was_high);
862
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":50
863
* if score >= threshold:
865
* start = cmax(i_lo, i - window) # <<<<<<<<<<<<<<
866
* if min_gap_length and prior_end:
867
* if start < prior_end + min_gap_length:
869
__pyx_v_start = __pyx_f_6cogent_5align_8_compare_cmax(__pyx_v_i_lo, (__pyx_v_i - __pyx_v_window));
871
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":51
873
* start = cmax(i_lo, i - window)
874
* if min_gap_length and prior_end: # <<<<<<<<<<<<<<
875
* if start < prior_end + min_gap_length:
876
* (start, jumped_end) = result.pop()
878
if (__pyx_v_min_gap_length) {
879
__pyx_t_4 = __pyx_v_prior_end;
881
__pyx_t_4 = __pyx_v_min_gap_length;
885
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":52
886
* start = cmax(i_lo, i - window)
887
* if min_gap_length and prior_end:
888
* if start < prior_end + min_gap_length: # <<<<<<<<<<<<<<
889
* (start, jumped_end) = result.pop()
892
__pyx_t_4 = (__pyx_v_start < (__pyx_v_prior_end + __pyx_v_min_gap_length));
895
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":53
896
* if min_gap_length and prior_end:
897
* if start < prior_end + min_gap_length:
898
* (start, jumped_end) = result.pop() # <<<<<<<<<<<<<<
902
__pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
903
__Pyx_GOTREF(__pyx_t_1);
904
if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
905
PyObject* tuple = __pyx_t_1;
906
__pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
907
__pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
908
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
909
__pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
910
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
911
__pyx_v_start = __pyx_t_7;
912
__Pyx_DECREF(__pyx_v_jumped_end);
913
__pyx_v_jumped_end = __pyx_t_6;
916
__pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
917
__Pyx_GOTREF(__pyx_t_8);
918
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
919
__pyx_t_5 = __Pyx_UnpackItem(__pyx_t_8, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
920
__Pyx_GOTREF(__pyx_t_5);
921
__pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
922
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
923
__pyx_t_6 = __Pyx_UnpackItem(__pyx_t_8, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
924
__Pyx_GOTREF(__pyx_t_6);
925
if (__Pyx_EndUnpack(__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
926
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
927
__pyx_v_start = __pyx_t_7;
928
__Pyx_DECREF(__pyx_v_jumped_end);
929
__pyx_v_jumped_end = __pyx_t_6;
939
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":54
940
* if start < prior_end + min_gap_length:
941
* (start, jumped_end) = result.pop()
942
* was_high = 1 # <<<<<<<<<<<<<<
946
__pyx_v_was_high = 1;
954
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":56
957
* if was_high: # <<<<<<<<<<<<<<
958
* result.append((start, i))
961
__pyx_t_7 = __pyx_v_was_high;
964
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":57
967
* result.append((start, i)) # <<<<<<<<<<<<<<
971
__pyx_t_1 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
972
__Pyx_GOTREF(__pyx_t_1);
973
__pyx_t_6 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
974
__Pyx_GOTREF(__pyx_t_6);
975
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
975
976
__Pyx_GOTREF(__pyx_t_5);
976
__pyx_t_4 = PyInt_FromLong(__pyx_v_i_lo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
977
__Pyx_GOTREF(__pyx_t_4);
978
__pyx_t_1 = PyInt_FromLong((__pyx_v_i_lo + __pyx_v_diagonal)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
979
__Pyx_GOTREF(__pyx_t_1);
980
__pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
981
__Pyx_GOTREF(__pyx_t_10);
982
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
983
__Pyx_GIVEREF(__pyx_t_4);
984
PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
985
__Pyx_GIVEREF(__pyx_t_1);
988
__pyx_t_1 = PyInt_FromLong(__pyx_v_i_hi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
989
__Pyx_GOTREF(__pyx_t_1);
990
__pyx_t_4 = PyInt_FromLong((__pyx_v_i_hi + __pyx_v_diagonal)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
991
__Pyx_GOTREF(__pyx_t_4);
992
__pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
993
__Pyx_GOTREF(__pyx_t_11);
994
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
995
__Pyx_GIVEREF(__pyx_t_1);
996
PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
997
__Pyx_GIVEREF(__pyx_t_4);
1000
__pyx_t_2 = PyObject_Length(__pyx_v_result); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1001
__pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1002
__Pyx_GOTREF(__pyx_t_4);
1003
__pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1004
__Pyx_GOTREF(__pyx_t_1);
1005
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
1006
__Pyx_GIVEREF(__pyx_t_5);
1007
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10);
1008
__Pyx_GIVEREF(__pyx_t_10);
1009
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_11);
1010
__Pyx_GIVEREF(__pyx_t_11);
1011
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
1012
__Pyx_GIVEREF(__pyx_t_4);
1017
if (__Pyx_Print(__pyx_t_1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1018
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1026
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":54
1027
* if diagonal %100 == 0:
1028
* print diagonal, (i_lo, i_lo+diagonal), (i_hi, i_hi+diagonal), len(result)
1029
* for i from i_lo <= i < i_hi: # <<<<<<<<<<<<<<
1033
__pyx_t_9 = __pyx_v_i_hi;
1034
for (__pyx_v_i = __pyx_v_i_lo; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {
1036
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":55
1037
* print diagonal, (i_lo, i_lo+diagonal), (i_hi, i_hi+diagonal), len(result)
1038
* for i from i_lo <= i < i_hi:
1039
* j = i + diagonal # <<<<<<<<<<<<<<
1041
* score -= scores[k]
1043
__pyx_v_j = (__pyx_v_i + __pyx_v_diagonal);
1045
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":56
1046
* for i from i_lo <= i < i_hi:
1048
* k = i % window # <<<<<<<<<<<<<<
1049
* score -= scores[k]
1050
* scores[k] = (seq1[i] == seq2[j])
1052
if (unlikely(__pyx_v_window == 0)) {
1053
PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
1054
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1056
__pyx_v_k = __Pyx_mod_int(__pyx_v_i, __pyx_v_window);
1058
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":57
1061
* score -= scores[k] # <<<<<<<<<<<<<<
1062
* scores[k] = (seq1[i] == seq2[j])
1063
* score += scores[k]
1065
__pyx_v_score -= (__pyx_v_scores[__pyx_v_k]);
1067
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":58
1069
* score -= scores[k]
1070
* scores[k] = (seq1[i] == seq2[j]) # <<<<<<<<<<<<<<
1071
* score += scores[k]
1072
* if score >= threshold:
1074
(__pyx_v_scores[__pyx_v_k]) = ((__pyx_v_seq1[__pyx_v_i]) == (__pyx_v_seq2[__pyx_v_j]));
1076
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":59
1077
* score -= scores[k]
1078
* scores[k] = (seq1[i] == seq2[j])
1079
* score += scores[k] # <<<<<<<<<<<<<<
1080
* if score >= threshold:
1083
__pyx_v_score += (__pyx_v_scores[__pyx_v_k]);
1085
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":60
1086
* scores[k] = (seq1[i] == seq2[j])
1087
* score += scores[k]
1088
* if score >= threshold: # <<<<<<<<<<<<<<
1090
* start = cmax(i_lo, i - window)
1092
__pyx_t_3 = (__pyx_v_score >= __pyx_v_threshold);
1095
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":61
1096
* score += scores[k]
1097
* if score >= threshold:
1098
* if not was_high: # <<<<<<<<<<<<<<
1099
* start = cmax(i_lo, i - window)
1102
__pyx_t_3 = (!__pyx_v_was_high);
1105
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":62
1106
* if score >= threshold:
1108
* start = cmax(i_lo, i - window) # <<<<<<<<<<<<<<
1112
__pyx_v_start = __pyx_f_6cogent_5align_8_compare_cmax(__pyx_v_i_lo, (__pyx_v_i - __pyx_v_window));
1114
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":63
1116
* start = cmax(i_lo, i - window)
1117
* was_high = 1 # <<<<<<<<<<<<<<
1121
__pyx_v_was_high = 1;
1129
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":65
1132
* if was_high: # <<<<<<<<<<<<<<
1133
* if start - end < min_gap_length:
1134
* ((start, forget1), (jumped_end, forget2)) = result.pop()
1136
__pyx_t_12 = __pyx_v_was_high;
1139
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":66
1142
* if start - end < min_gap_length: # <<<<<<<<<<<<<<
1143
* ((start, forget1), (jumped_end, forget2)) = result.pop()
1146
__pyx_t_1 = PyInt_FromLong((__pyx_v_start - __pyx_v_end)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1147
__Pyx_GOTREF(__pyx_t_1);
1148
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_min_gap_length, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1149
__Pyx_GOTREF(__pyx_t_4);
1150
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1151
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1152
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1155
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":67
1157
* if start - end < min_gap_length:
1158
* ((start, forget1), (jumped_end, forget2)) = result.pop() # <<<<<<<<<<<<<<
1160
* result.append(((start, start+diagonal), (end, end+diagonal)))
1162
__pyx_t_4 = __Pyx_PyObject_Pop(__pyx_v_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1163
__Pyx_GOTREF(__pyx_t_4);
1164
if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
1165
PyObject* tuple = __pyx_t_4;
1166
__pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
1167
__pyx_t_11 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_11);
1168
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1169
if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
1170
PyObject* tuple = __pyx_t_1;
1171
__pyx_t_10 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_10);
1172
__pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1173
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
1174
__pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
1175
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1176
__pyx_v_start = __pyx_t_12;
1177
__Pyx_DECREF(__pyx_v_forget1);
1178
__pyx_v_forget1 = __pyx_t_5;
1181
__pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1182
__Pyx_GOTREF(__pyx_t_13);
1183
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1184
__pyx_t_10 = __Pyx_UnpackItem(__pyx_t_13, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1185
__Pyx_GOTREF(__pyx_t_10);
1186
__pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1187
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
1188
__pyx_t_5 = __Pyx_UnpackItem(__pyx_t_13, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1189
__Pyx_GOTREF(__pyx_t_5);
1190
if (__Pyx_EndUnpack(__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1191
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
1192
__pyx_v_start = __pyx_t_12;
1193
__Pyx_DECREF(__pyx_v_forget1);
1194
__pyx_v_forget1 = __pyx_t_5;
1197
if (PyTuple_CheckExact(__pyx_t_11) && likely(PyTuple_GET_SIZE(__pyx_t_11) == 2)) {
1198
PyObject* tuple = __pyx_t_11;
1199
__pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
1200
__pyx_t_10 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_10);
1201
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
1202
__Pyx_DECREF(__pyx_v_jumped_end);
1203
__pyx_v_jumped_end = __pyx_t_5;
1205
__Pyx_DECREF(__pyx_v_forget2);
1206
__pyx_v_forget2 = __pyx_t_10;
1209
__pyx_t_13 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1210
__Pyx_GOTREF(__pyx_t_13);
1211
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
1212
__pyx_t_5 = __Pyx_UnpackItem(__pyx_t_13, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1213
__Pyx_GOTREF(__pyx_t_5);
1214
__pyx_t_10 = __Pyx_UnpackItem(__pyx_t_13, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1215
__Pyx_GOTREF(__pyx_t_10);
1216
if (__Pyx_EndUnpack(__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1217
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
1218
__Pyx_DECREF(__pyx_v_jumped_end);
1219
__pyx_v_jumped_end = __pyx_t_5;
1221
__Pyx_DECREF(__pyx_v_forget2);
1222
__pyx_v_forget2 = __pyx_t_10;
1226
__pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1227
__Pyx_GOTREF(__pyx_t_10);
1228
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1229
__pyx_t_1 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1230
__Pyx_GOTREF(__pyx_t_1);
1231
__pyx_t_11 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1232
__Pyx_GOTREF(__pyx_t_11);
1233
if (__Pyx_EndUnpack(__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1234
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
1235
if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
1236
PyObject* tuple = __pyx_t_1;
1237
__pyx_t_10 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_10);
1238
__pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1239
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
1240
__pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
1241
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1242
__pyx_v_start = __pyx_t_12;
1243
__Pyx_DECREF(__pyx_v_forget1);
1244
__pyx_v_forget1 = __pyx_t_5;
1247
__pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1248
__Pyx_GOTREF(__pyx_t_13);
1249
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1250
__pyx_t_10 = __Pyx_UnpackItem(__pyx_t_13, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1251
__Pyx_GOTREF(__pyx_t_10);
1252
__pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1253
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
1254
__pyx_t_5 = __Pyx_UnpackItem(__pyx_t_13, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1255
__Pyx_GOTREF(__pyx_t_5);
1256
if (__Pyx_EndUnpack(__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1257
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
1258
__pyx_v_start = __pyx_t_12;
1259
__Pyx_DECREF(__pyx_v_forget1);
1260
__pyx_v_forget1 = __pyx_t_5;
1263
if (PyTuple_CheckExact(__pyx_t_11) && likely(PyTuple_GET_SIZE(__pyx_t_11) == 2)) {
1264
PyObject* tuple = __pyx_t_11;
1265
__pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
1266
__pyx_t_10 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_10);
1267
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
1268
__Pyx_DECREF(__pyx_v_jumped_end);
1269
__pyx_v_jumped_end = __pyx_t_5;
1271
__Pyx_DECREF(__pyx_v_forget2);
1272
__pyx_v_forget2 = __pyx_t_10;
1275
__pyx_t_13 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1276
__Pyx_GOTREF(__pyx_t_13);
1277
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
1278
__pyx_t_5 = __Pyx_UnpackItem(__pyx_t_13, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1279
__Pyx_GOTREF(__pyx_t_5);
1280
__pyx_t_10 = __Pyx_UnpackItem(__pyx_t_13, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1281
__Pyx_GOTREF(__pyx_t_10);
1282
if (__Pyx_EndUnpack(__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1283
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
1284
__Pyx_DECREF(__pyx_v_jumped_end);
1285
__pyx_v_jumped_end = __pyx_t_5;
1287
__Pyx_DECREF(__pyx_v_forget2);
1288
__pyx_v_forget2 = __pyx_t_10;
1296
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":68
1297
* if start - end < min_gap_length:
1298
* ((start, forget1), (jumped_end, forget2)) = result.pop()
1299
* end = i - 1 # <<<<<<<<<<<<<<
1300
* result.append(((start, start+diagonal), (end, end+diagonal)))
1303
__pyx_v_end = (__pyx_v_i - 1);
1305
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":69
1306
* ((start, forget1), (jumped_end, forget2)) = result.pop()
1308
* result.append(((start, start+diagonal), (end, end+diagonal))) # <<<<<<<<<<<<<<
1312
__pyx_t_4 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1313
__Pyx_GOTREF(__pyx_t_4);
1314
__pyx_t_11 = PyInt_FromLong((__pyx_v_start + __pyx_v_diagonal)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1315
__Pyx_GOTREF(__pyx_t_11);
1316
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1317
__Pyx_GOTREF(__pyx_t_1);
1318
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
1319
__Pyx_GIVEREF(__pyx_t_4);
1320
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_11);
1321
__Pyx_GIVEREF(__pyx_t_11);
1324
__pyx_t_11 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1325
__Pyx_GOTREF(__pyx_t_11);
1326
__pyx_t_4 = PyInt_FromLong((__pyx_v_end + __pyx_v_diagonal)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1327
__Pyx_GOTREF(__pyx_t_4);
1328
__pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1329
__Pyx_GOTREF(__pyx_t_10);
1330
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
1331
__Pyx_GIVEREF(__pyx_t_11);
1332
PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4);
1333
__Pyx_GIVEREF(__pyx_t_4);
1336
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1337
__Pyx_GOTREF(__pyx_t_4);
1338
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
1339
__Pyx_GIVEREF(__pyx_t_1);
1340
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10);
1341
__Pyx_GIVEREF(__pyx_t_10);
1344
__pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1345
__Pyx_GOTREF(__pyx_t_10);
1346
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1347
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
1349
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":70
1351
* result.append(((start, start+diagonal), (end, end+diagonal)))
1352
* was_high = 0 # <<<<<<<<<<<<<<
1356
__pyx_v_was_high = 0;
1364
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":71
1365
* result.append(((start, start+diagonal), (end, end+diagonal)))
1367
* if was_high: # <<<<<<<<<<<<<<
1369
* result.append(((start, start+diagonal), (end, end+diagonal)))
1371
__pyx_t_9 = __pyx_v_was_high;
1374
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":72
1377
* end = i - 1 # <<<<<<<<<<<<<<
1378
* result.append(((start, start+diagonal), (end, end+diagonal)))
1381
__pyx_v_end = (__pyx_v_i - 1);
1383
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":73
1386
* result.append(((start, start+diagonal), (end, end+diagonal))) # <<<<<<<<<<<<<<
1389
__pyx_t_10 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1390
__Pyx_GOTREF(__pyx_t_10);
1391
__pyx_t_4 = PyInt_FromLong((__pyx_v_start + __pyx_v_diagonal)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1392
__Pyx_GOTREF(__pyx_t_4);
1393
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1394
__Pyx_GOTREF(__pyx_t_1);
1395
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
1396
__Pyx_GIVEREF(__pyx_t_10);
1397
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
1398
__Pyx_GIVEREF(__pyx_t_4);
1401
__pyx_t_4 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1402
__Pyx_GOTREF(__pyx_t_4);
1403
__pyx_t_10 = PyInt_FromLong((__pyx_v_end + __pyx_v_diagonal)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1404
__Pyx_GOTREF(__pyx_t_10);
1405
__pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1406
__Pyx_GOTREF(__pyx_t_11);
1407
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
1408
__Pyx_GIVEREF(__pyx_t_4);
1409
PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10);
1410
__Pyx_GIVEREF(__pyx_t_10);
1413
__pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1414
__Pyx_GOTREF(__pyx_t_10);
1415
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
1416
__Pyx_GIVEREF(__pyx_t_1);
1417
PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
1418
__Pyx_GIVEREF(__pyx_t_11);
1421
__pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1422
__Pyx_GOTREF(__pyx_t_11);
1423
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
1424
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
1430
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":74
1432
* result.append(((start, start+diagonal), (end, end+diagonal)))
977
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
978
__Pyx_GIVEREF(__pyx_t_1);
979
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
980
__Pyx_GIVEREF(__pyx_t_6);
983
__pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
984
__Pyx_GOTREF(__pyx_t_6);
985
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
986
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
988
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":58
990
* result.append((start, i))
991
* prior_end = i # <<<<<<<<<<<<<<
995
__pyx_v_prior_end = __pyx_v_i;
997
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":59
998
* result.append((start, i))
1000
* was_high = 0 # <<<<<<<<<<<<<<
1002
* result.append((start, i_hi))
1004
__pyx_v_was_high = 0;
1012
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":60
1015
* if was_high: # <<<<<<<<<<<<<<
1016
* result.append((start, i_hi))
1019
__pyx_t_3 = __pyx_v_was_high;
1022
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":61
1025
* result.append((start, i_hi)) # <<<<<<<<<<<<<<
1028
__pyx_t_6 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1029
__Pyx_GOTREF(__pyx_t_6);
1030
__pyx_t_5 = PyInt_FromLong(__pyx_v_i_hi); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1031
__Pyx_GOTREF(__pyx_t_5);
1032
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1033
__Pyx_GOTREF(__pyx_t_1);
1034
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
1035
__Pyx_GIVEREF(__pyx_t_6);
1036
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
1037
__Pyx_GIVEREF(__pyx_t_5);
1040
__pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1041
__Pyx_GOTREF(__pyx_t_5);
1042
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1043
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1048
/* "/Users/mcdonald/ResearchWork/pycogent/trunk/cogent/align/_compare.pyx":62
1050
* result.append((start, i_hi))
1433
1051
* return result # <<<<<<<<<<<<<<
1435
1053
__Pyx_XDECREF(__pyx_r);