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

Linewriter for GFF-formatted lines. The GffLinewriter class understands Versions 2 and 3 of the GFF format specification (http://www.sanger.ac.uk/resources/software/gff/spec.html). More...

#include "linewriter.hh"

Inheritance diagram for multovl::io::GffLinewriter:
multovl::io::Linewriter

Public Member Functions

 GffLinewriter (const std::string &source, unsigned int version, const std::string &chrom)
 
virtual std::string write (const Region &region)
 
virtual std::string write (const MultiRegion &region)
 
const std::string & source () const
 
unsigned int version () const
 
- 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 GFF-formatted lines. The GffLinewriter class understands Versions 2 and 3 of the GFF format specification (http://www.sanger.ac.uk/resources/software/gff/spec.html).

Constructor & Destructor Documentation

multovl::io::GffLinewriter::GffLinewriter ( const std::string &  source,
unsigned int  version,
const std::string &  chrom 
)

Init the GFF line writer

Parameters
sourcethis gets written in Column 2
versionGFF version (2 or 3, clamped silently)
chromthe chromosome containing the regions to be stringified
prefixthe chromosome prefix, "chr" by default

Member Function Documentation

virtual std::string multovl::io::GffLinewriter::write ( const Region region)
virtual

Writes a Region to a string (no newline) in GFF format and returns it. The score column will be '.', columns 8 and 9 (frame, attributes) are not printed at all.

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::GffLinewriter::write ( const MultiRegion region)
virtual

Writes a MultiRegion to a string (no newline) in GFF format and returns it. The score column will contain the multiplicity, frame will be '.', the ancestor strings are presented as the ANCESTORS attribute in column 9.

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: