Changeset 3698


Ignore:
Timestamp:
Sep 25, 2017, 6:37:50 AM (5 months ago)
Author:
peter
Message:

merge release 0.14.4 into trunk

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/NEWS

    r3688 r3698  
    1414
    1515yat 0.14.x series from http://dev.thep.lu.se/yat/svn/branches/0.14-stable
     16
     17version 0.14.4 (released 25 September 2017)
     18  - BamWriteIterator default constructor is now implemented (bug #894)
     19  - Fixed bug that InBamFile::n_mapped(tid) and
     20    InBamFile::n_unmapped(tid) threw when tid contained no reads (#895)
     21  - utility::basename("") now returns "." (bug #893)
     22
     23  A complete list of closed tickets can be found here [[br]]
     24  http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.14.4
    1625
    1726version 0.14.3 (released 22 March 2017)
  • trunk/m4/version.m4

    r3636 r3698  
    8585# yat-0.14.2 11:2:0
    8686# yat-0.14.3 11:3:0
     87# yat-0.14.4 11:4:0
    8788#
    8889# *Accidently, the libtool number was not updated for yat 0.5
  • trunk/test/bam.cc

    r3682 r3698  
    395395                                                                << in.n_no_coordinate() << " expected: 0\n";
    396396        }
     397        // test that idxstats works also when tid is empty (no reads, bug #895)
     398        try {
     399                if (in.n_mapped(0)!=0) {
     400                        suite.add(false);
     401                        suite.err() << "error: InBamFile::n_mapped: "
     402                                                                        << in.n_mapped(0) << " expected: 0\n";
     403                }
     404                if (in.n_unmapped(0)!=0) {
     405                        suite.add(false);
     406                        suite.err() << "error: InBamFile::n_unmapped: "
     407                                                                        << in.n_unmapped(0) << " expected: 0\n";
     408                }
     409        }
     410        catch (utility::runtime_error& e) {
     411                suite.add(false);
     412                suite.err() << "error: exception: " << e.what() << "\n";
     413        }
    397414
    398415        BamRead bam;
  • trunk/test/bam_iterator.cc

    r3210 r3698  
    11// $Id$
    22//
    3 // Copyright (C) 2012, 2013, 2014 Peter Johansson
     3// Copyright (C) 2012, 2013, 2014, 2017 Peter Johansson
    44//
    55// This program is free software; you can redistribute it and/or modify
     
    110110        std::string outname("bam_iterator.bam");
    111111        OutBamFile out(outname, in.header());
     112        BamWriteIterator default_constructed;
     113        test::avoid_compiler_warning(default_constructed);
    112114        BamWriteIterator bam_out(out);
    113115        std::copy(BamReadIterator(in), BamReadIterator(), bam_out);
  • trunk/test/utility.cc

    r3661 r3698  
    688688        path.push_back(".");
    689689        path.push_back("..");
     690        path.push_back("");
    690691        std::vector<std::string> dir;
    691692        dir.push_back("/usr");
     
    693694        dir.push_back(".");
    694695        dir.push_back("/");
     696        dir.push_back(".");
    695697        dir.push_back(".");
    696698        dir.push_back(".");
     
    718720        path.push_back(".");
    719721        path.push_back("..");
     722        path.push_back("");
    720723        std::vector<std::string> file;
    721724        file.push_back("lib");
     
    725728        file.push_back(".");
    726729        file.push_back("..");
     730        file.push_back(".");
    727731        assert(file.size()==path.size());
    728732        using utility::basename;
  • trunk/yat/omic/BamFile.cc

    r3693 r3698  
    126126                uint64_t unmapped;
    127127#if YAT_HAVE_HTSLIB
    128                 if (hts_idx_get_stat(index(), tid, &mapped, &unmapped)) {
     128                if (tid >= header().n_targets())
    129129                        throw utility::runtime_error("InBamFile::get_idx_stat");
    130                 }
     130                hts_idx_get_stat(index(), tid, &mapped, &unmapped);
    131131#else
    132132                index(); // ensure index_ is loaded
  • trunk/yat/omic/BamWriteIterator.cc

    r3114 r3698  
    33
    44/*
    5         Copyright (C) 2012, 2013 Peter Johansson
     5        Copyright (C) 2012, 2013, 2017 Peter Johansson
    66
    77        This file is part of the yat library, http://dev.thep.lu.se/yat
     
    5353
    5454
     55        BamWriteIterator::BamWriteIterator(void)
     56        {}
     57
     58
    5559        BamWriteIterator::BamWriteIterator(OutBamFile& out)
    5660                : boost::function_output_iterator<BamWriter>(BamWriter(out))
  • trunk/yat/omic/BamWriteIterator.h

    r3147 r3698  
    55
    66/*
    7         Copyright (C) 2012, 2013 Peter Johansson
     7        Copyright (C) 2012, 2013, 2017 Peter Johansson
    88
    99        This file is part of the yat library, http://dev.thep.lu.se/yat
     
    9292
    9393                         result is not dereferencable
     94
     95                         \since Function was not implemented prior 0.14.4
    9496                 */
    9597                BamWriteIterator(void);
  • trunk/yat/utility/utility.cc

    r3682 r3698  
    4343        std::string basename(const std::string& path)
    4444        {
     45                if (path.empty())
     46                        return ".";
    4547                if (path.size()==1)
    4648                        return path;
     
    98100        std::string dirname(const std::string& path)
    99101        {
    100                 if (path.size()==1) {
     102                if (path.size()<=1) {
    101103                        if (path=="/")
    102104                                return path;
Note: See TracChangeset for help on using the changeset viewer.