Changeset 2986


Ignore:
Timestamp:
Feb 18, 2013, 9:07:44 AM (10 years ago)
Author:
Peter
Message:

merge 0.10-stable branch into trunk

Location:
trunk
Files:
15 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/configure.ac

    r2981 r2986  
    298298                              [Define to 1 if libbam is available])],
    299299    [YAT_MSG_ERROR([Library 'libbam' was not found])])
     300  # check if global variable bam_nt16_rev_table is available
     301  YAT_BAM_NT16_REV_TABLE
    300302  AC_PATH_PROG([SAMTOOLS], [samtools], [false])
    301303  AC_ARG_VAR([SAMTOOLS], [Tools for alignment in the SAM format])
     
    320322
    321323AC_DEFINE([HAVE_INLINE], [1], [Define if inline is available on system])
     324# default is same as --disable-debug
    322325AC_ARG_ENABLE([debug],
    323   [AS_HELP_STRING([--enable-debug],[turn on debug options and code])])
     326  [AS_HELP_STRING([--enable-debug],[turn on debug options and code])],
     327        [], [enable_debug=no])
    324328
    325329# If neither --enable-assert nor --disable-assert, set enable_assert
  • trunk/m4/yat_check_libbam.m4

    r2943 r2986  
    11## $Id$
    22#
    3 # serial 1 (yat 0.10)
     3# serial 2 (yat 0.10.2)
    44#
    55#
    6 #   Copyright (C) 2012 Peter Johansson
     6#   Copyright (C) 2012, 2013 Peter Johansson
    77#
    88#   This file is part of the yat library, http://dev.thep.lu.se/yat
     
    7878LIBS=$save_LIBS
    7979]) # YAT_LINK_BAM_IFELSE
     80
     81# YAT_BAM_NT16_REV_TABLE
     82# ====================================================================
     83# Check if global variable bam_nt16_rev_table is available in
     84# -lbam. If found call AC_DEFINE(HAVE_BAM_NT16_REV_TABLE).
     85AC_DEFUN([YAT_BAM_NT16_REV_TABLE],
     86[
     87AC_MSG_CHECKING([for bam_nt16_rev_table])
     88AC_LINK_IFELSE([AC_LANG_PROGRAM(
     89                 [@%:@if HAVE_BAM_H
     90                  @%:@ include <bam.h>
     91                  @%:@elif HAVE_BAM_BAM_H
     92                  @%:@ include <bam/bam.h>
     93                  @%:@elif HAVE_SAMTOOLS_BAM_H
     94                  @%:@ include <samtools/bam.h>
     95                  @%:@endif
     96                 ],[
     97                  char c = bam_nt16_rev_table@<:@7@:>@;
     98                 ])
     99               ],[
     100                 AC_MSG_RESULT([yes])
     101                 AC_DEFINE([HAVE_BAM_NT16_REV_TABLE], [1],
     102                           [Define to 1 if libbam contains bam_nt16_rev_table])
     103               ],[
     104                 AC_MSG_RESULT([no])
     105               ])
     106]) # YAT_BAM_NT16_REV_TABLE
  • trunk/test/Makefile.am

    r2982 r2986  
    3737  test/averager3.test \
    3838  test/averager4.test \
     39  test/bam.test \
    3940  test/bam_pair_analyse.test \
    4041  test/bam_iterator.test \
  • trunk/test/bam_iterator.cc

    r2983 r2986  
    8282    if (lhs.pos() != rhs.pos())
    8383      return false;
     84    if (lhs.mtid() != rhs.mtid())
     85      return false;
     86    if (lhs.mpos() != rhs.mpos())
     87      return false;
    8488    if (lhs.core().bin != rhs.core().bin)
    8589      return false;
  • trunk/yat/classifier/InputRanker.h

    r2966 r2986  
    77  Copyright (C) 2004 Peter Johansson
    88  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
     9  Copyright (C) 2013 Jari Häkkinen
    910
    1011  This file is part of the yat library, http://dev.thep.lu.se/yat
  • trunk/yat/classifier/KNN_ReciprocalDistance.h

    r2966 r2986  
    66/*
    77  Copyright (C) 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
     8  Copyright (C) 2013 Jari Häkkinen
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2223  along with yat. If not, see <http://www.gnu.org/licenses/>.
    2324*/
    24 
    2525
    2626#include <cstddef>
  • trunk/yat/classifier/KNN_ReciprocalRank.h

    r2966 r2986  
    66/*
    77  Copyright (C) 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
     8  Copyright (C) 2013 Jari Häkkinen
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
  • trunk/yat/classifier/KNN_Uniform.h

    r2966 r2986  
    66/*
    77  Copyright (C) 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
     8  Copyright (C) 2013 Jari Häkkinen
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2223  along with yat. If not, see <http://www.gnu.org/licenses/>.
    2324*/
    24 
    2525
    2626#include <cstddef>
  • trunk/yat/classifier/SVindex.h

    r2966 r2986  
    66/*
    77  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2013 Jari Häkkinen
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
  • trunk/yat/omic/BamRead.cc

    r2985 r2986  
    149149  std::string BamRead::sequence(void) const
    150150  {
    151     // FIXME bam_nt16_rev_table not available in old lbam
    152151    std::string result(sequence_length(), ' ');
     152#ifdef HAVE_BAM_NT16_REV_TABLE
    153153    for (size_t i=0; i<result.size(); ++i)
    154154      result[i] = bam_nt16_rev_table[sequence(i)];
     155#else
     156    std::string table = "=ACMGRSVTWYHKDBN";
     157    for (size_t i=0; i<result.size(); ++i)
     158      result[i] = table[sequence(i)];
     159#endif
    155160    return result;
    156161  }
     
    192197  }
    193198
     199
     200  int32_t BamRead::mtid(void) const
     201  {
     202    assert(bam_);
     203    return bam_->core.mtid;
     204  }
    194205
    195206
  • trunk/yat/omic/BamRead.h

    r2985 r2986  
    257257
    258258     \since New in yat 0.10
     259
     260     \relates BamRead
    259261   */
    260262  void swap(BamRead& lhs, BamRead& rhs);
     
    265267
    266268     \since New in yat 0.10
     269
     270     \relates BamRead
    267271   */
    268272  bool soft_clipped(const BamRead& bam);
     
    273277
    274278     \since New in yat 0.10
     279
     280     \relates BamRead
    275281   */
    276282  uint32_t left_soft_clipped(const BamRead& bam);
     
    281287
    282288     \since New in yat 0.10
     289
     290     \relates BamRead
    283291   */
    284292  uint32_t right_soft_clipped(const BamRead& bam);
     
    290298
    291299     \since New in yat 0.10
     300
     301     \relates BamRead
    292302   */
    293303  bool same_query_name(const BamRead& lhs, const BamRead& rhs);
  • trunk/yat/omic/BamReadIterator.h

    r2943 r2986  
    4141
    4242     Iterator is a single pass \input_iterator which means iterator
    43      can only be used read bam file. Also two BamReadIterator working
    44      on the same InBamFile are not independent, i.e., incrementing one
    45      iterator will also affect the other one.
     43     can only be used read bam file. If creating two iterators working
     44     on the same InBamFile, the iterators are not independent of each
     45     other. Incrementing one, the behaviour of the other is undefined.
    4646
    4747     Iterator can either be constructed to iterate over entire bam
  • trunk/yat/statistics/VectorFunction.h

    r2966 r2986  
    66/*
    77  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2013 Jari Häkkinen
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
  • trunk/yat/utility/Aligner.h

    r2966 r2986  
    66/*
    77  Copyright (C) 2012 Peter Johansson
     8  Copyright (C) 2013 Jari Häkkinen
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
Note: See TracChangeset for help on using the changeset viewer.