Changeset 3439


Ignore:
Timestamp:
Nov 20, 2015, 6:41:52 AM (6 years ago)
Author:
Peter
Message:

merge release 0.13 into trunk

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/NEWS

    r3419 r3439  
    1010yat 0.13.x series from http://dev.thep.lu.se/yat/svn/branches/0.13-stable
    1111
    12 version 0.13 (released NOT YET)
     12version 0.13 (released 20 November 2015)
     13  - added support for htslib (see ticket #794)
     14      - macro `YAT_HAVE_LIBBAM` is #defined if linking against either libbam
     15        or libhts. Use #if defined YAT_HAVE_LIBBAM && !defined
     16        (YAT_HAVE_HTSLIB) to check that building against libbam.
     17      - macro `YAT_BAM_HEADER` is only #defined when building against libbam
    1318  - utility::get separates types in map and passed key (ticket #799)
    1419  - utility::Range is deprecated (ticket #786)
    1520  - AveragerWeighted::n(void) now return 0, when object is empty (ticket #802)
    16   - added support for htslib (see ticket #794)
    1721  - Container2DIterator is now tagged with
    1822    boost::random_access_traversal_tag (see ticket #803, r3393)
  • trunk/README

    r3417 r3439  
    113113compiler with `./configure CPPFLAGS=-I<include dir>` when header files
    114114are found in directory `<include dir>`. Configure detects whether
    115 header files are from htslib or old samtools and looks for either libhts or libbam accordingly. If library is installed outside linker's search path, in `<lib
    116 dir>`, you can run `./configure LDFLAGS=-L<lib dir>`. You can build
    117 yat without bam support by running `./configure --without-samtools`.
    118 
    119 The samtools program is needed for some tests realted to bam
     115header files are from htslib or old samtools and looks for either
     116libhts or libbam accordingly. If library is installed outside linker's
     117search path, in `<libdir>`, you can run `./configure LDFLAGS=-L<lib
     118dir>`. You can build yat without bam support by running `./configure
     119--without-samtools`.
     120
     121The samtools program is needed for some tests related to bam
    120122functionality. If samtools is not found by configure, these tests will
    121123be skipped. If you have samtools available outside PATH, you can help
     
    186188Copyright (C) 2004 Jari Häkkinen
    187189Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    188 Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Peter Johansson
     190Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Peter Johansson
    189191
    190192This file is part of yat library, http://dev.thep.lu.se/yat
  • trunk/configure.ac

    r3417 r3439  
    371371  ], [$LIBZ $user_LIBS], [$LIBZ], [YAT_STATIC_LIBS])
    372372
    373   # Check if htslib is available. If no check if samtools API is available
     373  # Check if htslib is available. If not, check if samtools API is available
    374374  YAT_CHECK_HTS([
    375375    AC_MSG_CHECKING([htslib])
  • trunk/test/Suite.cc

    r3417 r3439  
    4646    if (require_bam) {
    4747#ifndef YAT_HAVE_LIBBAM
    48       out() << "no libbam\n";
     48      out() << "no bam support\n";
    4949      exit (EXIT_SKIP);
    5050#endif
  • trunk/test/Suite.h

    r3322 r3439  
    66/*
    77  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2009, 2010, 2011, 2013, 2014 Peter Johansson
     8  Copyright (C) 2009, 2010, 2011, 2013, 2014, 2015 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2424*/
    2525
     26// ensure that config.h always is included first
     27#ifndef YAT_VERSION
     28#error header 'config.h' not included
     29#endif
     30
     31#include <yat/utility/config_public.h>
     32
    2633#define YAT_TEST_PROLOGUE "\n=== " << __func__ << " ===\n"
    2734
     
    3037
    3138// SKIP_BAM_TEST is defined if we should skip bam tests
    32 #ifndef HAVE_LIBBAM
    33 #define SKIP_BAM_TEST
    34 #endif
    35 #ifndef HAVE_SAMTOOLS
     39#if !defined (YAT_HAVE_LIBBAM) || !defined (HAVE_SAMTOOLS_EXECUTABLE)
    3640#define SKIP_BAM_TEST
    3741#endif
  • trunk/test/pileup.cc

    r3417 r3439  
    2323
    2424#include "Suite.h"
     25
     26#include <yat/utility/config_public.h>
    2527
    2628#ifdef YAT_HAVE_LIBBAM
     
    5052
    5153
    52 #ifdef YAT_HAVE_LIBBAM
    5354char seq_nt16(size_t x)
    5455{
     
    5960#else
    6061  std::string table = "=ACMGRSVTWYHKDBN";
    61   return table[c];
     62  return table[x];
    6263#endif
    6364}
    6465
     66#ifdef YAT_HAVE_LIBBAM
    6567void test1(test::Suite& suite, const std::string& fn)
    6668{
  • trunk/test/roc.cc

    r3114 r3439  
    33/*
    44  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    5   Copyright (C) 2011, 2012, 2013 Peter Johansson
     5  Copyright (C) 2011, 2012, 2013, 2015 Peter Johansson
    66
    77  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    230230    suite.err() << "error: expected p-value>0.5\n  found: "
    231231                << roc.p_right() << "\n";
     232  }
     233  if (roc.p_value() > 1.0) {
     234    suite.err() << "error: expected p-value <= 1\n    found: "
     235                << roc.p_value() << "\n";
     236    suite.add(false);
    232237  }
    233238}
  • trunk/yat/omic/config_bam.h

    r3417 r3439  
    4949#ifndef YAT_SAM_HEADER
    5050#error This file requires samtools header files and cannot be used when \
    51 yat was configured with switch '--without-samtools'.
     51yat was configured with switch '--without-htslib'.
    5252#endif
    5353
  • trunk/yat/statistics/ROC.cc

    r3023 r3439  
    44  Copyright (C) 2004, 2005 Peter Johansson
    55  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    6   Copyright (C) 2011, 2012, 2013 Peter Johansson
     6  Copyright (C) 2011, 2012, 2013, 2015 Peter Johansson
    77
    88  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    228228      return std::min(p, 1.0);
    229229    }
    230     return 2*get_p_approx(area());
     230    return 2*get_p_approx(std::max(area(), 1-area()));
    231231  }
    232232
  • trunk/yat/statistics/ROC.h

    r3023 r3439  
    77  Copyright (C) 2004 Peter Johansson
    88  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    9   Copyright (C) 2011, 2012, 2013 Peter Johansson
     9  Copyright (C) 2011, 2012, 2013, 2015 Peter Johansson
    1010
    1111  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    9696
    9797       Threshold deciding whether p-value is computed using exact
    98        method or a Gaussian approximation. If both number of positive
    99        samples, n_pos(void), and number of negative samples,
     98       method or a Gaussian approximation. If either number of positive
     99       samples, n_pos(void), or number of negative samples,
    100100       n_neg(void), are smaller than minimum_size the exact method is
    101101       used.
  • trunk/yat/utility/config_public.h.in

    r3417 r3439  
    4444#undef YAT_HAVE_HTS_H
    4545
    46 /// Define to 1 if yat is build with bam support
     46/// Define to 1 if yat is built with bam support
    4747#undef YAT_HAVE_LIBBAM
    4848
Note: See TracChangeset for help on using the changeset viewer.