btllib

seq_reader.cpp

An example of reading a gzipped fastq file.

#include "../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;
}
btllib::SeqReader
Definition: seq_reader.hpp:43
btllib::SeqReader::Flag::SHORT_MODE
static const unsigned SHORT_MODE
Definition: seq_reader.hpp:57