All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Methods | List of all members
nvbio::FASTA_reader Struct Reference

Detailed description

A non-incremental FASTA reader, which parses the reads atomically and provides them to the output handler one by one.

Definition at line 124 of file fasta.h.

#include <fasta.h>

Public Methods

 FASTA_reader (const char *filename, const uint32 buffer_size=64536u)
 ~FASTA_reader ()
bool valid () const
template<typename Writer >
uint32 read (const uint32 n_reads, Writer &writer)
uint8 get ()
void rewind ()

Constructor & Destructor Documentation

nvbio::FASTA_reader::FASTA_reader ( const char *  filename,
const uint32  buffer_size = 64536u 


Definition at line 136 of file fasta_inl.h.

nvbio::FASTA_reader::~FASTA_reader ( )


Definition at line 147 of file fasta_inl.h.

Member Function Documentation

uint8 nvbio::FASTA_reader::get ( )

get the next character, or 255 if EOF

Definition at line 241 of file fasta_inl.h.

template<typename Writer >
uint32 nvbio::FASTA_reader::read ( const uint32  n_reads,
Writer &  writer 

read a batch of bp reads

Template Parameters
Writeran output handler class, which must implement the following interface:
struct Writer
// called whenever a new read has been parsed
void push_back(
const char* id,
const uint32 read_length,
const uint8* read);

Definition at line 182 of file fasta_inl.h.

void nvbio::FASTA_reader::rewind ( )

rewind the file

Definition at line 156 of file fasta_inl.h.

bool nvbio::FASTA_reader::valid ( ) const

return whether the file is valid

Definition at line 136 of file fasta.h.

The documentation for this struct was generated from the following files: