bugfix: bwa-sw PE segfault in rare case
This commit is contained in:
parent
bf65b6463a
commit
64e353ce49
33
NEWS
33
NEWS
|
|
@ -1,3 +1,36 @@
|
||||||
|
Release 0.6.1 (25 November, 2011)
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Notable changes to BWA-short:
|
||||||
|
|
||||||
|
* Bugfix: duplicated alternative hits in the XA tag.
|
||||||
|
|
||||||
|
* Bugfix: when trimming enabled, bwa-aln trims 1bp less.
|
||||||
|
|
||||||
|
* Disabled the color-space alignment. 0.6.x is not working with SOLiD reads at
|
||||||
|
present.
|
||||||
|
|
||||||
|
Notable changes to BWA-SW:
|
||||||
|
|
||||||
|
* Bugfix: segfault due to excessive ambiguous bases.
|
||||||
|
|
||||||
|
* Bugfix: incorrect mate position in the SE mode.
|
||||||
|
|
||||||
|
* When macro _NO_SSE2 is in use, fall back to the standard Smith-Waterman
|
||||||
|
instead of SSE2-SW.
|
||||||
|
|
||||||
|
* Optionally mark split hits with lower alignment scores as secondary.
|
||||||
|
|
||||||
|
Changes to fastmap:
|
||||||
|
|
||||||
|
* Bugfix: infinite loop caused by ambiguous bases.
|
||||||
|
|
||||||
|
* Optionally output the query sequence.
|
||||||
|
|
||||||
|
(0.6.1: 25 November 2011, r103)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Release 0.5.10 and 0.6.0 (12 November, 2011)
|
Release 0.5.10 and 0.6.0 (12 November, 2011)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
||||||
6
bwape.c
6
bwape.c
|
|
@ -437,7 +437,7 @@ bwa_cigar_t *bwa_sw_core(bwtint_t l_pac, const ubyte_t *pacseq, int len, const u
|
||||||
bwa_cigar_t *cigar = 0;
|
bwa_cigar_t *cigar = 0;
|
||||||
ubyte_t *ref_seq;
|
ubyte_t *ref_seq;
|
||||||
bwtint_t k, x, y, l;
|
bwtint_t k, x, y, l;
|
||||||
int path_len, ret;
|
int path_len, ret, subo;
|
||||||
AlnParam ap = aln_param_bwa;
|
AlnParam ap = aln_param_bwa;
|
||||||
path_t *path, *p;
|
path_t *path, *p;
|
||||||
|
|
||||||
|
|
@ -454,8 +454,8 @@ bwa_cigar_t *bwa_sw_core(bwtint_t l_pac, const ubyte_t *pacseq, int len, const u
|
||||||
path = (path_t*)calloc(l+len, sizeof(path_t));
|
path = (path_t*)calloc(l+len, sizeof(path_t));
|
||||||
|
|
||||||
// do alignment
|
// do alignment
|
||||||
ret = aln_local_core(ref_seq, l, (ubyte_t*)seq, len, &ap, path, &path_len, 1, 0);
|
ret = aln_local_core(ref_seq, l, (ubyte_t*)seq, len, &ap, path, &path_len, 1, &subo);
|
||||||
if (ret < 0) {
|
if (ret < 0 || subo == ret) { // no hit or tandem hits
|
||||||
free(path); free(cigar); free(ref_seq); *n_cigar = 0;
|
free(path); free(cigar); free(ref_seq); *n_cigar = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ void bsw2_pair1(const bsw2opt_t *opt, int64_t l_pac, const uint8_t *pac, const b
|
||||||
}
|
}
|
||||||
if (beg < 1) beg = 1;
|
if (beg < 1) beg = 1;
|
||||||
if (end > l_pac) end = l_pac;
|
if (end > l_pac) end = l_pac;
|
||||||
|
if (end - beg < l_mseq) return;
|
||||||
// generate the sequence
|
// generate the sequence
|
||||||
seq = malloc(l_mseq + (end - beg));
|
seq = malloc(l_mseq + (end - beg));
|
||||||
ref = seq + l_mseq;
|
ref = seq + l_mseq;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue