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"
|
void | reset () |
|
std::string | _chr |
|
std::ostringstream | _ostr |
|
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).
multovl::io::BedLinewriter::BedLinewriter |
( |
const std::string & |
chrom | ) |
|
|
inlineexplicit |
Sets up a BedLinewriter object.
- Parameters
-
chrom | the chromosome containing the regions to be stringified |
prefix | the chromosome prefix, "chr" by default |
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
-
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::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
-
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: