Changeset 3840


Ignore:
Timestamp:
Aug 13, 2019, 2:56:44 AM (2 months ago)
Author:
Peter
Message:

merge release yat-0.16.2 into trunk

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/NEWS

    r3832 r3840  
    1212
    1313yat 0.16.x series from http://dev.thep.lu.se/yat/svn/branches/0.16-stable
     14
     15version 0.16.2 (released 13 August 2019)
     16  - utility::Aligner::Cigar::begin(void) and ::end(void) are now
     17    implemented (see bug #929)
     18  - Fixed bug in GFF2 parser when attribute field had space after a
     19    semicolon (bug #928)
     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.16.2
    1423
    1524version 0.16.1 (released 6 August 2019)
  • trunk/m4/version.m4

    r3832 r3840  
    9090# yat-0.16   13:0:0
    9191# yat-0.16.1 13:1:0
     92# yat-0.16.2 13:2:0
    9293#
    9394# *Accidently, the libtool number was not updated for yat 0.5
  • trunk/test/cigar.cc

    r3213 r3840  
    22
    33/*
    4   Copyright (C) 2014 Peter Johansson
     4  Copyright (C) 2014, 2019 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    7777    suite.err() << "error: incorrect string\n";
    7878  }
     79  for (utility::Aligner::Cigar::const_iterator c=cig.begin();c!=cig.end();++c){
     80    std::string str(BAM_CIGAR_STR);
     81    assert(*c < str.size());
     82    suite.out() << str[*c];
     83  }
     84  suite.out() << "\n";
    7985
    8086  if (!suite.add(cig.length()==17))
  • trunk/test/data/small.gff2

    r2482 r3840  
    22#Chr  Source  Type  Pos_Start Pos_End Score Strand  Phase Attributes
    33chr3  yat SNP 904531  904531  0.000015  . . genotype "T or C";reference "C"
    4 chr3  yat SNP 969190  969190  0.062500  . . genotype "T";reference "C"
     4chr3  yat SNP 969190  969190  0.062500  . . genotype "T"; reference "C"
  • trunk/test/gff.cc

    r2881 r3840  
    22
    33/*
    4   Copyright (C) 2011, 2012 Peter Johansson
     4  Copyright (C) 2011, 2012, 2019 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2626#include "yat/omic/GFF2.h"
    2727#include "yat/omic/GFF3.h"
     28
     29#include "yat/utility/Exception.h"
    2830
    2931#include <cassert>
     
    119121                << "'; expected: 'T'\n";
    120122  }
     123  try {
     124    if (gff.attribute("reference")!="C") {
     125      suite.add(false);
     126      suite.err() << "error: incorrect genotype: '" << gff.attribute("genotype")
     127                  << "'; expected: 'T'\n";
     128    }
     129  }
     130  catch (utility::runtime_error& e) {
     131    suite.add(false);
     132    suite.err() << "unexpected exception thrown: what: " << e.what() << "\n";
     133  }
    121134  is.close();
    122135}
  • trunk/yat/omic/GFF2.cc

    r2919 r3840  
    22
    33/*
    4   Copyright (C) 2011, 2012 Peter Johansson
     4  Copyright (C) 2011, 2012, 2019 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2424#include "GFF2.h"
    2525
     26#include <cassert>
    2627#include <string>
    2728#include <map>
     
    3435                           const std::string& str) const
    3536  {
    36     size_t i = str.find(' ');
    37     std::string key = str.substr(0,i);
    38     ++i;
     37    size_t offset = str.find_first_not_of(' ');
     38    size_t i = str.find_first_of(' ', offset);
     39    assert(i >= offset);
     40    std::string key = str.substr(offset, i-offset);
     41    // trim spaces
     42    i = str.find_first_not_of(' ', i+1);
    3943    // trim off embracing '"'
    4044    if (str[i]=='"')
    4145      ++i;
    42     size_t n = str.size() - i;
    43     if (str[str.size()-1]=='"')
     46    // skip trailing spaces
     47    size_t n = str.find_last_not_of(' ');
     48    // skip training '"'
     49    if (str[n] == '"')
    4450      --n;
    45     m[key] = str.substr(i,n);
     51    // str[n] now points to last char we want to include
     52    m[key] = str.substr(i,n-i+1);
    4653  }
    4754
  • trunk/yat/utility/Aligner.cc

    r3462 r3840  
    22
    33/*
    4   Copyright (C) 2012, 2014, 2016 Peter Johansson
     4  Copyright (C) 2012, 2014, 2016, 2019 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    158158  // ================ Cigar =======================
    159159
     160  Aligner::Cigar::const_iterator Aligner::Cigar::begin(void) const
     161  {
     162    return const_iterator(cigar_.begin());
     163  }
     164
     165
    160166  void Aligner::Cigar::clear(void)
    161167  {
    162168    cigar_.clear();
     169  }
     170
     171
     172  Aligner::Cigar::const_iterator Aligner::Cigar::end(void) const
     173  {
     174    return const_iterator(cigar_.end());
    163175  }
    164176
  • trunk/yat/utility/Aligner.h

    r3462 r3840  
    77  Copyright (C) 2012 Peter Johansson
    88  Copyright (C) 2013 Jari Häkkinen, Peter Johansson
    9   Copyright (C) 2014, 2016 Peter Johansson
     9  Copyright (C) 2014, 2016, 2019 Peter Johansson
    1010
    1111  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    190190
    191191         \since New in yat 0.13
     192
     193         \note was not implemented prior 0.16.2
    192194       */
    193195      const_iterator begin(void) const;
     
    202204
    203205         \since New in yat 0.13
     206
     207         \note was not implemented prior 0.16.2
    204208       */
    205209      const_iterator end(void) const;
Note: See TracChangeset for help on using the changeset viewer.