multovl  1.3
Multiple overlaps of genomic regions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
multovl::io::BamReader Class Reference

#include "bamio.hh"

Inheritance diagram for multovl::io::BamReader:
multovl::io::TrackReader

Public Member Functions

 BamReader (const std::string &infname)
 
virtual std::string read_into (std::string &chrom, Region &reg)
 
- Public Member Functions inherited from multovl::io::TrackReader
 TrackReader ()
 default init
 
const Errorserrors () const
 
virtual void add_error (const std::string &msg)
 

Detailed Description

BamReader objects encapsulate an input file from which they can read into a Region object, one by one. BamReader-s are init-ed with a file name, the ctor opens the file for writing and the dtor closes it, RAII-style. Clients should instantiate a BamReader, then invoke its read_into() method, and use the resulting Region immediately for building up a MultiOverlap object.

Constructor & Destructor Documentation

multovl::io::BamReader::BamReader ( const std::string &  infname)
explicit

Init a BamReader object to read from a BAM-formatted binary file.

Parameters
infnamethe input file name.

Member Function Documentation

virtual std::string multovl::io::BamReader::read_into ( std::string &  chrom,
Region reg 
)
virtual

Attempts to read from the wrapped input stream into a region. Reads the stream internally record-by-record.

Parameters
chromstring to store the chromosome name for /reg/
regthe region this method tries to read into.
Returns
message containing information about how the parsing went. "" if all is OK, "EOF" if the internal stream was exhausted, or some error message.

Implements multovl::io::TrackReader.


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