eXpress “1.5”

Parser Class Reference

The Parser class is an abstract class for implementing a SAMParser or BAMParser. More...

#include <mapparser.h>

Inheritance diagram for Parser:
BAMParser SAMParser

List of all members.

Public Member Functions

virtual ~Parser ()
 Dummy destructor.
virtual const std::string header () const =0
 An accessor for the SAM header string.
const TransIndex & targ_index () const
 An accessor for the target name to index map.
const TransIndex & targ_lengths () const
 An accessor for the target-to-length map.
virtual bool next_fragment (Fragment &f)=0
 A member function that loads all mappings of the next fragment into the given Fragment object.
virtual void reset ()=0
 A member function that resets the parser and rewinds to the beginning of the input.

Protected Attributes

TransIndex _targ_index
 The private target-to-index map.
TransIndex _targ_lengths
 The private target-to-length map.
ReadHit_read_buff
 A private pointer to the current/last read mapping being parsed.

Detailed Description

The Parser class is an abstract class for implementing a SAMParser or BAMParser.

It fills Fragment objects by parsing an input file in SAM/BAM format.

Author:
Adam Roberts
Date:
2011 Artistic License 2.0

Definition at line 39 of file mapparser.h.


Member Function Documentation

virtual const std::string Parser::header ( ) const [pure virtual]

An accessor for the SAM header string.

Returns:
The SAM header string.

Implemented in BAMParser, and SAMParser.

virtual bool Parser::next_fragment ( Fragment f) [pure virtual]

A member function that loads all mappings of the next fragment into the given Fragment object.

Parameters:
fthe empty Fragment to add mappings to.
Returns:
True iff more reads remain in the SAM/BAM file/stream.

Implemented in BAMParser, and SAMParser.

const TransIndex& Parser::targ_index ( ) const [inline]

An accessor for the target name to index map.

Returns a reference that does not outlive this.

Returns:
Reference to the target-to-index map.

Definition at line 69 of file mapparser.h.

const TransIndex& Parser::targ_lengths ( ) const [inline]

An accessor for the target-to-length map.

Returns a reference that does not outlive this.

Returns:
Reference to the target-to-length map.

Definition at line 75 of file mapparser.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables