Object represents header of the VCF, offering methods to access and modify the tags.
More...
#include <vcfpp.h>
|
void | addINFO (const std::string &id, const std::string &number, const std::string &type, const std::string &description) |
| add INFO field to header More...
|
|
void | addFORMAT (const std::string &id, const std::string &number, const std::string &type, const std::string &description) |
| add FORMAT field to header More...
|
|
void | addFILTER (const std::string &id, const std::string &description) |
| add one FILTER line to header More...
|
|
void | addContig (const std::string &id) |
| add contig to header More...
|
|
void | addLine (const std::string &str) |
| add one line to header
|
|
void | addSample (const std::string &sample) const |
| add one sample name to header
|
|
std::string | asString () const |
| return header as a string
|
|
std::vector< std::string > | getSamples () const |
| return all samples in a string vector
|
|
std::vector< std::string > | getSeqnames () const |
| return all contig/chromosome names in a string vector
|
|
int | getFormatType (std::string tag) const |
| get the type of a given tag More...
|
|
void | removeContig (std::string tag) const |
| remove a contig tag from header
|
|
void | removeInfo (std::string tag) const |
| remove a INFO tag from header
|
|
void | removeFormat (std::string tag) const |
| remove a FORMAT tag from header
|
|
void | removeFilter (std::string tag) const |
| remove a FILTER tag from header
|
|
void | setSamples (const std::string &samples) const |
| explicitly set samples to be extracted More...
|
|
void | setVersion (const std::string &version) const |
| set the VCF version
|
|
int | nSamples () const |
| return the number of samples in the VCF
|
|
|
class | BcfRecord |
|
class | BcfReader |
|
class | BcfWriter |
|
std::ostream & | operator<< (std::ostream &out, const BcfHeader &h) |
| stream out the header
|
|
Object represents header of the VCF, offering methods to access and modify the tags.
- Note
- BcfHeader has 3 friends, BcfReader, BcfWriter and BcfRecord.
◆ addContig()
void vcfpp::BcfHeader::addContig |
( |
const std::string & |
id | ) |
|
|
inline |
add contig to header
- Parameters
-
id | contig or chromosome name |
◆ addFILTER()
void vcfpp::BcfHeader::addFILTER |
( |
const std::string & |
id, |
|
|
const std::string & |
description |
|
) |
| |
|
inline |
add one FILTER line to header
- Parameters
-
id | FILTER name |
description | Description of the FILTER |
◆ addFORMAT()
void vcfpp::BcfHeader::addFORMAT |
( |
const std::string & |
id, |
|
|
const std::string & |
number, |
|
|
const std::string & |
type, |
|
|
const std::string & |
description |
|
) |
| |
|
inline |
add FORMAT field to header
- Parameters
-
id | tag name in FORMAT field |
number | Number of elements |
type | Integer, Floast or String |
description | Description of the tag |
◆ addINFO()
void vcfpp::BcfHeader::addINFO |
( |
const std::string & |
id, |
|
|
const std::string & |
number, |
|
|
const std::string & |
type, |
|
|
const std::string & |
description |
|
) |
| |
|
inline |
add INFO field to header
- Parameters
-
id | tag name in INFO field |
number | Number of elements |
type | Integer, Floast or String |
description | Description of the tag |
◆ getFormatType()
int vcfpp::BcfHeader::getFormatType |
( |
std::string |
tag | ) |
const |
|
inline |
get the type of a given tag
- Parameters
-
- Returns
- 1: int; 2: float; 3: string; 0: error;
◆ setSamples()
void vcfpp::BcfHeader::setSamples |
( |
const std::string & |
samples | ) |
const |
|
inline |
explicitly set samples to be extracted
- Parameters
-
samples | samples to include or exclude as a comma-separated string |
The documentation for this class was generated from the following file: