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::BedLinewriter Class Reference

Linewriter for BED-formatted lines. The BedLinewriter writes columns 1 to 6 of the BED format specification, (http://genome.ucsc.edu/FAQ/FAQformat.html#format1). More...

#include "linewriter.hh"

Inheritance diagram for multovl::io::BedLinewriter:
multovl::io::Linewriter

Public Member Functions

 BedLinewriter (const std::string &chrom)
 
virtual std::string write (const Region &reg)
 
virtual std::string write (const MultiRegion &reg)
 
- Public Member Functions inherited from multovl::io::Linewriter
 Linewriter (const std::string &chrom)
 

Additional Inherited Members

- Protected Member Functions inherited from multovl::io::Linewriter
void reset ()
 
- Protected Attributes inherited from multovl::io::Linewriter
std::string _chr
 
std::ostringstream _ostr
 

Detailed Description

Linewriter for BED-formatted lines. The BedLinewriter writes columns 1 to 6 of the BED format specification, (http://genome.ucsc.edu/FAQ/FAQformat.html#format1).

Constructor & Destructor Documentation

multovl::io::BedLinewriter::BedLinewriter ( const std::string &  chrom)
inlineexplicit

Sets up a BedLinewriter object.

Parameters
chromthe chromosome containing the regions to be stringified
prefixthe chromosome prefix, "chr" by default

Member Function Documentation

virtual std::string multovl::io::BedLinewriter::write ( const Region reg)
virtual

Writes a Region to a string (no newline) in BED format and returns it. The name of the region is written into the 4th column ("name"), the 5th column ("score") will be 0.

Parameters
regionthe region to be stringified
Returns
the stringified region or the empty string if something went wrong

Implements multovl::io::Linewriter.

virtual std::string multovl::io::BedLinewriter::write ( const MultiRegion reg)
virtual

Writes a MultiRegion to a string (no newline) in BED format and returns it. The ancestor string is written into the 4th column ("name"), the multiplicity into the 5th column ("score").

Parameters
regionthe region to be stringified
Returns
the stringified region or the empty string if something went wrong

Implements multovl::io::Linewriter.


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