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

Linereader for BED-formatted lines. The BedLinereader class parses columns 1 to 6 of the BED format specification, except Column 5 (score) which is skipped, and ignores the optional columns 7 to 12 (http://genome.ucsc.edu/FAQ/FAQformat.html#format1). More...

#include "linereader.hh"

Inheritance diagram for multovl::io::BedLinereader:
multovl::io::Linereader multovl::io::GffLinereader

Public Member Functions

 BedLinereader ()
 Sets up a BedLinereader object.
 
virtual bool read_into (Region &region) const
 
- Public Member Functions inherited from multovl::io::Linereader
 Linereader (const std::string &commentchars="#")
 
Status parse (const std::string &line)
 
Status status () const
 
const std::string & comment () const
 
size_t fieldcnt () const
 
const std::string & error_msg () const
 
const std::string & chrom () const
 
unsigned int first () const
 
unsigned int last () const
 
char strand () const
 
const std::string & name () const
 

Protected Member Functions

virtual void reset ()
 
virtual void parse_data (const std::string &line)
 Parse a /line/ assuming it contains BED-formatted data.
 
- Protected Member Functions inherited from multovl::io::Linereader
void set_statusflag (Status flag)
 

Additional Inherited Members

- Public Types inherited from multovl::io::Linereader
enum  Status {
  CLEAN = 0, ERROR = 1, EMPTY = 2, COMMENT = 4,
  DATA = 8
}
 Symbolic constants to signify the result of a parsing operation. More...
 
- Static Protected Member Functions inherited from multovl::io::Linereader
static bool empty_white (const std::string &str)
 Returns /true/ if /str/ is empty or contains whitespace characters only.
 
static unsigned int str_to_uint (std::string &str) throw (Exception)
 
- Protected Attributes inherited from multovl::io::Linereader
Status _status
 the status after parsing
 
size_t _fieldcnt
 how many column fields have been seen
 
std::string _comment
 store a comment line
 
std::string _err
 stores parsing error messages
 
std::string _chrom
 
std::string _name
 
unsigned int _first
 
unsigned int _last
 
char _strand
 

Detailed Description

Linereader for BED-formatted lines. The BedLinereader class parses columns 1 to 6 of the BED format specification, except Column 5 (score) which is skipped, and ignores the optional columns 7 to 12 (http://genome.ucsc.edu/FAQ/FAQformat.html#format1).

Member Function Documentation

virtual bool multovl::io::BedLinereader::read_into ( Region region) const
virtual

Updates the contents of a region with what has been parsed from a BED-formatted line. Does nothing if the calling object is not in the DATA state.

Implements multovl::io::Linereader.

virtual void multovl::io::BedLinereader::reset ( )
protectedvirtual

Prepares the calling object for parsing by resetting all fields. This method must be invoked by the parse(...) method.

Reimplemented from multovl::io::Linereader.


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