Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

prepare to ditch stdaln.{h,c}

  • Loading branch information...
commit 1a451df80082872890dd3a0904abb837be9c4f03 1 parent d35f33b
Heng Li authored March 04, 2013

Showing 1 changed file with 1 addition and 24 deletions. Show diff stats Hide diff stats

  1. 25  bwtsw2_pair.c
25  bwtsw2_pair.c
@@ -7,11 +7,7 @@
7 7
 #include "bwtsw2.h"
8 8
 #include "kstring.h"
9 9
 #include "utils.h"
10  
-#ifndef _NO_SSE2
11 10
 #include "ksw.h"
12  
-#else
13  
-#include "stdaln.h"
14  
-#endif
15 11
 
16 12
 #define MIN_RATIO     0.8
17 13
 #define OUTLIER_BOUND 2.0
@@ -126,8 +122,7 @@ void bsw2_pair1(const bsw2opt_t *opt, int64_t l_pac, const uint8_t *pac, const b
126 122
 		for (i = 0; i < l_mseq; ++i) // on the forward strand
127 123
 			seq[i] = nst_nt4_table[(int)mseq[i]];
128 124
 	}
129  
-#ifndef _NO_SSE2
130  
-	{ // FIXME!!! The following block has not been tested since the update of the ksw library
  125
+	{
131 126
 		int flag = KSW_XSUBO | KSW_XSTART | (l_mseq * g_mat[0] < 250? KSW_XBYTE : 0) | opt->t;
132 127
 		kswr_t aln;
133 128
 		aln = ksw_align(l_mseq, seq, end - beg, ref, 5, g_mat, opt->q, opt->r, flag, 0);
@@ -146,24 +141,6 @@ void bsw2_pair1(const bsw2opt_t *opt, int64_t l_pac, const uint8_t *pac, const b
146 141
 		printf("G=%d,G2=%d,beg=%d,end=%d,k=%lld,len=%d\n", a->G, a->G2, a->beg, a->end, a->k, a->len);
147 142
 		*/
148 143
 	}
149  
-#else
150  
-	{
151  
-		AlnParam ap;
152  
-		path_t path[2];
153  
-		int matrix[25];
154  
-		for (i = 0; i < 25; ++i) matrix[i] = g_mat[i];
155  
-		ap.gap_open = opt->q; ap.gap_ext = opt->r; ap.gap_end = opt->r;
156  
-		ap.matrix = matrix; ap.row = 5; ap.band_width = 50;
157  
-		a->G = aln_local_core(ref, end - beg, seq, l_mseq, &ap, path, 0, opt->t, &a->G2);
158  
-		if (a->G < opt->t) a->G = 0;
159  
-		if (a->G2 < opt->t) a->G2 = 0;
160  
-		if (a->G2) a->flag |= BSW2_FLAG_TANDEM;
161  
-		a->k = beg + path[0].i - 1;
162  
-		a->len = path[1].i - path[0].i + 1;
163  
-		a->beg = path[0].j - 1;
164  
-		a->end = path[1].j;
165  
-	}
166  
-#endif
167 144
 	if (a->is_rev) i = a->beg, a->beg = l_mseq - a->end, a->end = l_mseq - i;
168 145
 	free(seq);
169 146
 }

0 notes on commit 1a451df

Please sign in to comment.
Something went wrong with that request. Please try again.