Last change
on this file since 2883 was
2883,
checked in by Peter, 10 years ago
|
New classes to wrap around functionality provided by samtools. refs #729
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.1 KB
|
Line | |
---|
1 | // $Id: BamWriteIterator.cc 2883 2012-12-03 12:48:51Z peter $ |
---|
2 | // |
---|
3 | // Copyright (C) 2012 Peter Johansson |
---|
4 | // |
---|
5 | // This program is free software; you can redistribute it and/or modify |
---|
6 | // it under the terms of the GNU General Public License as published by |
---|
7 | // the Free Software Foundation; either version 3 of the License, or |
---|
8 | // (at your option) any later version. |
---|
9 | // |
---|
10 | // This program is distributed in the hope that it will be useful, but |
---|
11 | // WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
13 | // General Public License for more details. |
---|
14 | // |
---|
15 | // You should have received a copy of the GNU General Public License |
---|
16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
17 | |
---|
18 | #include "BamWriteIterator.h" |
---|
19 | |
---|
20 | #include "BamFile.h" |
---|
21 | |
---|
22 | #include <sam.h> |
---|
23 | |
---|
24 | #include <cassert> |
---|
25 | |
---|
26 | namespace theplu { |
---|
27 | namespace yat { |
---|
28 | namespace omic { |
---|
29 | |
---|
30 | BamWriter::BamWriter(void) |
---|
31 | : out_(NULL) |
---|
32 | {} |
---|
33 | |
---|
34 | |
---|
35 | BamWriter::BamWriter(OutBamFile& o) |
---|
36 | : out_(&o) |
---|
37 | {} |
---|
38 | |
---|
39 | |
---|
40 | void BamWriter::operator()(const BamRead& b) const |
---|
41 | { |
---|
42 | assert(out_); |
---|
43 | out_->write(b); |
---|
44 | } |
---|
45 | |
---|
46 | |
---|
47 | BamWriteIterator::BamWriteIterator(OutBamFile& out) |
---|
48 | : boost::function_output_iterator<BamWriter>(BamWriter(out)) |
---|
49 | {} |
---|
50 | |
---|
51 | }}} |
---|
Note: See
TracBrowser
for help on using the repository browser.