Changeset 2847


Ignore:
Timestamp:
Sep 22, 2012, 12:56:49 PM (11 years ago)
Author:
Peter
Message:

Fixes #724. Adding another test for NeedlemanWunsch?. Fix bug in NW
that score matrix was initialized with smallest positive double rather
than smallest negative value. Also fixed an index error in underlying
Aligner class causing the mess reported in #724.

Location:
branches/0.9-stable
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9-stable/test/Makefile.am

    r2846 r2847  
    3333check_SCRIPTS = test/common_defs.sh
    3434
    35 EXTRA_PROGRAMS = test/alignment.test test/averager.test \
     35EXTRA_PROGRAMS = test/alignment.test \
     36  test/alignment2.test \
     37  test/averager.test \
    3638  test/averager1.test \
    3739  test/averager3.test \
     
    6870
    6971# tests not passing through yet
    70 XFAIL_TESTS = test/alignment.test
     72XFAIL_TESTS =
    7173
    7274DISTRIBUTED_TESTS = \
  • branches/0.9-stable/yat/utility/Aligner.cc

    r2816 r2847  
    4848  double Aligner::needleman_wunsch(const Matrix& s)
    4949  {
    50     Matrix m(s.rows()+1,s.columns()+1, std::numeric_limits<double>::min());
     50    Matrix m(s.rows()+1,s.columns()+1, -std::numeric_limits<double>::max());
     51    m(0, 0) = 0.0;
    5152    // Init upper and left border of matrix
    5253    for (size_t i=1; i<m.rows(); i++)
     
    8586
    8687        if (cigar(i, j-1) == right) {
    87           if (x(i-1, j)-horizon_gap_ > x(i,j)) {
     88          if (x(i, j-1)-horizon_gap_ > x(i,j)) {
    8889            x(i,j) = x(i,j-1) - horizon_gap_;
    8990            cigar(i,j) = right;
Note: See TracChangeset for help on using the changeset viewer.