btllib
Main Page
Namespaces
Classes
Files
Examples
All
Classes
Namespaces
Functions
Variables
seq_reader.cpp
An example of reading a gzipped fastq file.
#include "btllib/seq_reader.hpp"
#include <iostream>
int
main()
{
for
(
const
auto
& record :
btllib::SeqReader
(
"my_reads.fq.gz"
,
btllib::SeqReader::Flag::SHORT_MODE
)) {
std::cout << record.seq <<
'\n'
<< record.qual <<
'\n'
;
}
/*
* In Python, this would be:
*
* with btllib.SeqReader("my_reads.fq.gz", btllib.SeqReaderFlag.SHORT_MODE) as
reader: for record in reader: print(record.seq, record.qual)
*
*/
return
0;
}
Generated by
1.8.5