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

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

merge release 0.10 into trunk

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