kaori
A C++ library for barcode extraction and matching
Loading...
Searching...
No Matches
kaori::FastqReader< Pointer_ > Class Template Reference

Stream reads from a FASTQ file. More...

#include <FastqReader.hpp>

Public Member Functions

 FastqReader (Pointer_ p)
 
bool operator() ()
 
const std::vector< char > & get_sequence () const
 
const std::vector< char > & get_name () const
 

Detailed Description

template<typename Pointer_>
class kaori::FastqReader< Pointer_ >

Stream reads from a FASTQ file.

Pretty much what it says on the tin. Multi-line sequence and quality strings are supported. The name of each read is only considered up to the first whitespace.

Template Parameters
Pointer_Pointer to a class that serves as a source of input bytes. The pointed-to class should satisfy the byteme::Reader interface; it may also be a concrete byteme::Reader subclass to enable devirtualization. Either a smart or raw pointer may be supplied depending on how the caller wants to manage the lifetime of the pointed-to object.

Constructor & Destructor Documentation

◆ FastqReader()

template<typename Pointer_ >
kaori::FastqReader< Pointer_ >::FastqReader ( Pointer_ p)
inline
Parameters
pPointer to a text stream.

Member Function Documentation

◆ get_name()

template<typename Pointer_ >
const std::vector< char > & kaori::FastqReader< Pointer_ >::get_name ( ) const
inline
Returns
Vector containing the name for the current read. Note that the name is considered to end at the first whitespace on the line. This should only be called if load() returns true.

◆ get_sequence()

template<typename Pointer_ >
const std::vector< char > & kaori::FastqReader< Pointer_ >::get_sequence ( ) const
inline
Returns
Vector containing the sequence for the current read. This should only be called if load() returns true.

◆ operator()()

template<typename Pointer_ >
bool kaori::FastqReader< Pointer_ >::operator() ( )
inline

Extract details for the next read in the file.

Returns
Whether or not a record was successfully extracted. If true, get_sequence() and get_name() may be used. If false, the end of the file was reached.

The documentation for this class was generated from the following file: