Abstract base class that writes a VCF record. More...
#include <VcfRecordSource.hpp>
Public Member Functions | |
| void | writeRecord (std::ostream &out, const cgatools::reference::CrrFile &crr, size_t sampleCount) const |
| Write the VCF record to out. | |
| virtual cgatools::reference::Location | getLocation () const =0 |
| Get 0-based location of first base of VCF record. | |
| virtual void | writeId (std::ostream &out) const |
| Write ID field of VCF record. | |
| virtual void | writeRef (std::ostream &out) const =0 |
| Write REF field of VCF record. | |
| virtual void | writeAlt (std::ostream &out) const =0 |
| Write ALT field of VCF record. | |
| virtual void | writeQual (std::ostream &out) const |
| Write QUAL field of VCF record. | |
| virtual void | writeFilter (std::ostream &out) const |
| Write FILTER field of VCF record. | |
| virtual void | writeInfo (std::ostream &out) const =0 |
| Write INFO field of VCF record. | |
| virtual void | writeFormat (std::ostream &out) const =0 |
| Write FORMAT field of VCF record. | |
| virtual void | writeSample (std::ostream &out, size_t idxGenome) const =0 |
| Write per-sample field of VCF record, for the given genome. | |
Static Public Member Functions | |
| static std::string | getVcfChromosomeName (size_t chromosomeId, const cgatools::reference::CrrFile &crr) |
| Get the chromosome name for the given chromosome ID, as written in a VCF record. | |
Abstract base class that writes a VCF record.
Classes derived from this include SmallVariantsVcfRecordWriter, etc.
| virtual cgatools::reference::Location cgatools::conv::VcfRecordWriter::getLocation | ( | ) | const [pure virtual] |
Get 0-based location of first base of VCF record.
The value output to the VCF file is at Location.offset+1.
Implemented in cgatools::copynumber::CnvFileVcfRecordWriter, cgatools::junctions::JunctionVcfRecordWriter, cgatools::mobileelement::MeiFileVcfRecordWriter, and cgatools::variants::VariantFileVcfRecordWriter.
| static std::string cgatools::conv::VcfRecordWriter::getVcfChromosomeName | ( | size_t | chromosomeId, | |
| const cgatools::reference::CrrFile & | crr | |||
| ) | [static] |
Get the chromosome name for the given chromosome ID, as written in a VCF record.
I.e. no "chr" prefix.
| void cgatools::conv::VcfRecordWriter::writeRecord | ( | std::ostream & | out, | |
| const cgatools::reference::CrrFile & | crr, | |||
| size_t | sampleCount | |||
| ) | const |
Write the VCF record to out.
Not overridable in sub-classes, but this just calls all the per-column write() functions, which are overridable in sub-classes.
| virtual void cgatools::conv::VcfRecordWriter::writeSample | ( | std::ostream & | out, | |
| size_t | idxGenome | |||
| ) | const [pure virtual] |
Write per-sample field of VCF record, for the given genome.
Genomes are numbered starting with 0 for the first genome.
Implemented in cgatools::copynumber::CnvFileVcfRecordWriter, cgatools::junctions::JunctionVcfRecordWriter, cgatools::mobileelement::MeiFileVcfRecordWriter, and cgatools::variants::VariantFileVcfRecordWriter.
1.6.2