Changeset 2845


Ignore:
Timestamp:
Sep 22, 2012, 11:21:17 AM (9 years ago)
Author:
Peter
Message:

Extend test for NeedlemanWunsch? and check alignment score between peaksets. refs #724

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.8-stable/test/alignment.cc

    r2370 r2845  
    9999  s >> peaksets;
    100100
     101  utility::Matrix nm_score(peaksets.size(), peaksets.size(), 0);
     102  utility::Matrix correct(nm_score);
    101103  for (size_t i=0; i<peaksets.size()-1; i++)
    102104    for (size_t j=i+1; j<peaksets.size(); j++) {
    103105      utility::Matrix dot_m;
    104106      std::vector<std::pair<size_t,size_t> > path;
    105       score(peaksets[i], peaksets[j], 1.0, dot_m, path);
     107      nm_score(i,j) = score(peaksets[i], peaksets[j], 1.0, dot_m, path);
     108      if (i==2 && j==3) {
     109        for (size_t r=0; r<dot_m.rows(); ++r)
     110          for (size_t c=0; c<dot_m.columns(); ++c)
     111            if (dot_m(r,c) > 1e-5)
     112              std::cerr << r << " " << c << " " << dot_m(r,c) << "\n";
     113      }
    106114    }
     115  correct(0,1) = 4.947983;
     116  correct(0,2) = 3.496081;
     117  correct(0,3) = 4.960331;
     118  correct(1,2) = 2.486868;
     119  correct(1,3) = 11.407001;
     120  correct(2,3) = 2.503420;
     121
     122  suite.add(suite.equal_range_fix(nm_score.begin(), nm_score.end(),
     123                                  correct.begin(), 1e-6));
    107124
    108125  std::string a("AGGUUGUCCGUGGUGAGUUCGCA");
Note: See TracChangeset for help on using the changeset viewer.