source: trunk/yat/omic/BamHeader.h @ 2993

Last change on this file since 2993 was 2993, checked in by Peter, 9 years ago

conform GPL header to same style as in other yat files

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#ifndef theplu_yat_omic_bam_header
2#define theplu_yat_omic_bam_header
3
4// $Id: BamHeader.h 2993 2013-03-03 07:38:22Z peter $
5
6/*
7  Copyright (C) 2012 Peter Johansson
8
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20
21  You should have received a copy of the GNU General Public License
22  along with this program. If not, see <http://www.gnu.org/licenses/>.
23*/
24
25#include "config_bam.h"
26
27#include YAT_BAM_HEADER
28
29namespace theplu {
30namespace yat {
31namespace omic {
32
33  /**
34     Wrapper around bam_header_t struct.
35
36     Class is typically created within InBamFile
37
38     \since New in yat 0.10
39   */
40  class BamHeader
41  {
42  public:
43    /**
44       \brief Default constructor
45     */
46    BamHeader(void);
47
48    /**
49       Name of chromosome with ID \a tid
50     */
51    const char* target_name(size_t tid) const;
52
53    /**
54       Length of chromosome with ID \a tid
55     */
56    uint32_t target_length(size_t tid) const;
57
58    /**
59       Number of chromosomes
60     */
61    int32_t n_targets(void) const;
62  private:
63    bam_header_t* header_;
64
65    friend class InBamFile;
66    friend class OutBamFile;
67    BamHeader(bam_header_t* h);
68
69    // using compiler generated copy and assignment
70    //BamHeader(const BamHeader&);
71    //BamHeader& operator=(const BamHeader& rhs);
72  };
73
74}}}
75#endif
Note: See TracBrowser for help on using the repository browser.