Changeset 3202


Ignore:
Timestamp:
May 3, 2014, 3:36:14 PM (7 years ago)
Author:
Peter
Message:

make Cigar work also without bam.h, refs #785. #define YAT_CIGAR_ etc if not available from bam.h

Location:
trunk/yat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/omic/BamRead.h

    r3168 r3202  
    2323*/
    2424
     25#include <yat/utility/config_public.h>
     26
     27// allow inclusion of config_bam.h so this file is available also without bam.h
     28#ifdef YAT_HAVE_LIBBAM
    2529#include "config_bam.h"
    26 
    2730#include YAT_BAM_HEADER
    2831#include YAT_SAM_HEADER
     32
     33#else
     34/// describe how CIGAR operation/length is packed into a 32-bit
     35#define BAM_CIGAR_SHIFT 4
     36/// operation is described in four lowest bits
     37#define BAM_CIGAR_MASK  ((1 << BAM_CIGAR_SHIFT) - 1)
     38/// \abstract CIGAR: M = match or mismatch
     39#define BAM_CMATCH      0
     40/// \abstract CIGAR: I = insertion to the reference
     41#define BAM_CINS        1
     42/// \abstract CIGAR: D = deletion from the reference
     43#define BAM_CDEL        2
     44/// \abstract CIGAR: N = skip on the reference (e.g. spliced alignment)
     45#define BAM_CREF_SKIP   3
     46/// \abstract CIGAR: S = clip on the read with clipped sequence
     47/// present in qseq
     48#define BAM_CSOFT_CLIP  4
     49/// \abstract CIGAR: H = clip on the read with clipped sequence trimmed off
     50#define BAM_CHARD_CLIP  5
     51/// \abstract CIGAR: P = padding
     52#define BAM_CPAD        6
     53/// \abstract CIGAR: equals = match
     54#define BAM_CEQUAL      7
     55/// \abstract CIGAR: X = mismatch
     56#define BAM_CDIFF       8
     57#define BAM_CBACK       9
     58#endif
    2959
    3060#include <functional>
     
    71101 */
    72102
     103#ifdef YAT_HAVE_LIBBAM
    73104namespace theplu {
    74105namespace yat {
     
    426457}}}
    427458#endif
     459#endif
  • trunk/yat/utility/Aligner.cc

    r3201 r3202  
    2323
    2424#include "Aligner.h"
    25 
    2625#include "Matrix.h"
    2726
    28 
    29 // FIXME fix this so it works also --without-samtools
    30 #include <yat/omic/config_bam.h>
    31 #include YAT_BAM_HEADER
    32 
    33 // FIXME we should include yat/omic/BamRead.h so we get #defines for
    34 // e.g. bam_cigar_op also if not included in bam.h
     27// to get BAM_CIGAR defines
     28#include <yat/omic/BamRead.h>
    3529
    3630#include <cassert>
    3731#include <limits>
    38 
    39 #include <iostream> // debug
    4032
    4133namespace theplu {
Note: See TracChangeset for help on using the changeset viewer.