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"
|
| GffLinewriter (const std::string &source, unsigned int version, const std::string &chrom) |
|
virtual std::string | write (const Region ®ion) |
|
virtual std::string | write (const MultiRegion ®ion) |
|
const std::string & | source () const |
|
unsigned int | version () const |
|
| Linewriter (const std::string &chrom) |
|
|
void | reset () |
|
std::string | _chr |
|
std::ostringstream | _ostr |
|
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).
multovl::io::GffLinewriter::GffLinewriter |
( |
const std::string & |
source, |
|
|
unsigned int |
version, |
|
|
const std::string & |
chrom |
|
) |
| |
Init the GFF line writer
- Parameters
-
source | this gets written in Column 2 |
version | GFF version (2 or 3, clamped silently) |
chrom | the chromosome containing the regions to be stringified |
prefix | the chromosome prefix, "chr" by default |
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
-
region | the 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
-
region | the 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: