Changeset 2470


Ignore:
Timestamp:
Apr 12, 2011, 5:21:45 AM (10 years ago)
Author:
Peter
Message:

merge patch release 0.7.2 into trunk

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/NEWS

    r2463 r2470  
    1313
    1414yat 0.7.x series from http://dev.thep.lu.se/yat/svn/branches/0.7-stable
     15
     16version 0.7.2 (released 12 April 2011)
     17  - omic::Codon("ATG").amino_acid() now return 'M' (bug #664)
     18  - median now works on empty ranges (bug #660)
     19  - fixed bug percentiler sometimes zero weight elements (r2466)
     20
     21  A complete list of closed tickets can be found here [[br]]
     22  http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.7.2
     23
    1524
    1625version 0.7.1 (released 13 January 2011)
  • trunk/bootstrap

    r2121 r2470  
    77# Copyright (C) 2006 Jari Häkkinen
    88# Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    9 # Copyright (C) 2009 Peter Johansson
     9# Copyright (C) 2009, 2011 Peter Johansson
    1010#
    1111# This file is part of the yat library, http://dev.thep.lu.se/yat
     
    3737    shift;
    3838done
     39cmd="autoreconf --install --symlink --force";
    3940if test "x$verbose" = "xno"; then
    40     exec >& /dev/null
     41    exec > /dev/null
     42else
     43    cmd="$cmd --verbose"
    4144fi
    42 cmd="autoreconf --install --symlink --force --verbose";
    4345echo "$me: running: $cmd";
    4446exec $cmd;
  • trunk/m4/version.m4

    r2431 r2470  
    3232# DEV_BUILD - When rolling a tarball we set this to `false'. In
    3333# repository value remains `true'.
    34 m4_define([DEV_BUILD], [true])
     34m4_define([DEV_BUILD], [false])
    3535
    3636# Library versioning (current:revision:age)
     
    6767# yat-0.7.0  4:0:0
    6868# yat-0.7.1  4:1:0
     69# yat-0.7.2  4:2:0
    6970#
    7071# *Accidently, the libtool number was not updated for yat 0.5
  • trunk/test/codon.cc

    r2370 r2470  
    22
    33/*
    4   Copyright (C) 2010 Peter Johansson
     4  Copyright (C) 2010, 2011 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    5353    suite.err() << "error: expected end() to return false\n";
    5454
     55  if (!suite.add(Codon("ATG").amino_acid()=='M'))
     56    suite.err() << "error: Codon(\"ATG\").amino_acid() returns: `"
     57                << Codon("ATG").amino_acid() << "'\n";
     58
     59  if (!suite.add(Codon("ATG").start()))
     60    suite.err() << "error: Codon(\"ATG\").start() returns: false\n";
     61
    5562  return suite.return_value();
    5663}
  • trunk/test/statistics.cc

    r2370 r2470  
    66  Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
    77  Copyright (C) 2007, 2008, 2009 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2010 Peter Johansson
     8  Copyright (C) 2010, 2011 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    4646void test_mad(test::Suite&);
    4747
     48void test_median_empty(test::Suite&);
    4849void test_percentiler(test::Suite&);
    4950void test_percentiler_nan(test::Suite&);
     
    124125           
    125126  }
     127  test_median_empty(suite);
    126128  return suite.return_value();
    127129}
     
    150152            boost::random_access_iterator_archetype<utility::DataWeight>());
    151153  }
     154}
     155
     156
     157// test for ticket #660
     158void test_median_empty(test::Suite& suite)
     159{
     160  std::vector<double> x;
     161  double m = 0;
     162  m = statistics::median(x.begin(), x.end(), true);
    152163}
    153164
     
    260271                     RandomAccessIterator2 last2)
    261272{
    262   for (double p=0; p<100; p+=10) {
     273  for (double p=0; p<=100; p+=10) {
    263274    double correct=statistics::percentile2(first1, last1, p);
    264275    test_percentiler(suite, first2, last2, p, correct);
  • trunk/yat/omic/Codon.cc

    r2369 r2470  
    22
    33/*
    4   Copyright (C) 2010 Peter Johansson
     4  Copyright (C) 2010, 2011 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    138138    add_to_map('I', "ATT,ATC,ATA");
    139139    add_to_map('V', "GTT,GTC,GTA,GTG");
    140     add_to_map('\0',"ATG"); // start
    141140    add_to_map('*',"TAA,TGA,TAG"); //  stop
    142141  }
     
    145144  bool Codon::start(void) const
    146145  {
    147     return iter_->second=='\0';
     146    return iter_->second=='M';
    148147  }
    149148
  • trunk/yat/statistics/Percentiler.h

    r2263 r2470  
    66/*
    77  Copyright (C) 2008, 2009 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2010 Peter Johansson
     8  Copyright (C) 2010, 2011 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    3434#include <algorithm>
    3535#include <cmath>
     36#include <limits>
    3637#include <numeric>
    3738#include <stdexcept>
     
    99100      BOOST_CONCEPT_ASSERT((boost::RandomAccessIterator<RandomAccessIterator>));
    100101      BOOST_CONCEPT_ASSERT((utility::DataIteratorConcept<RandomAccessIterator>));
     102      if (first==last)
     103        return std::numeric_limits<double>::quiet_NaN();
    101104      return calculate(first, last, sorted_,
    102105       typename utility::weighted_iterator_traits<RandomAccessIterator>::type());
     
    176179      std::vector<double>::const_iterator upper(accum_w.begin());
    177180      double margin=1e-10;
    178       while (*upper <= w_bound+margin && upper!=accum_w.end())
     181      while (upper!=accum_w.end() && *upper <= w_bound+margin)
    179182        ++upper;
    180       if (upper==accum_w.end())
     183      while (upper!=accum_w.begin() &&
     184             (upper==accum_w.end() ||
     185              trait.weight(first+(upper-accum_w.begin()))==0.0))
    181186        --upper;
    182187      std::vector<double>::const_iterator lower(upper);
Note: See TracChangeset for help on using the changeset viewer.