#include <yat/omic/VcfFile.h>
◆ VcfFile()
theplu::yat::omic::VcfFile::VcfFile |
( |
const std::string & |
fn | ) |
|
|
explicit |
Opens file named fn.
- See also
- open
◆ good()
bool theplu::yat::omic::VcfFile::good |
( |
void |
| ) |
const |
A file is good when it's open and until reading an entry failed.
- Returns
- true if file is still good
◆ header() [1/2]
VcfHeader& theplu::yat::omic::VcfFile::header |
( |
void |
| ) |
|
- Returns
- reference to header
Note that modifying the referenced object does not modify the underlying file.
- Note
- If file is not open, behaviour is undefined.
◆ header() [2/2]
const VcfHeader& theplu::yat::omic::VcfFile::header |
( |
void |
| ) |
const |
- Returns
- reference to header
- Note
- If file is not open, behaviour is undefined.
◆ is_open()
bool theplu::yat::omic::VcfFile::is_open |
( |
void |
| ) |
const |
- Returns
- true if file is open
◆ open()
void theplu::yat::omic::VcfFile::open |
( |
const std::string & |
fn | ) |
|
open file named fn
Open file fn, unless fn is "-", in which case stdin
is used. The function tries to detect whether file is compressed (gzipped) or not by looking at the first byte which is 0x1f for gzipped files.
Function opens a VcfHeader and if the first bit does not conform with the format of a VCF header, an excpetion is thrown.
- Note
- If file already is open behaviour is undefined.
◆ read()
bool theplu::yat::omic::VcfFile::read |
( |
VCF & |
vcf | ) |
|
Read one VCF entry from file and assign to vcf. If there is no more entry to read, the state of the file is switched to bad and false
is returned.
- Returns
- true if successful
The documentation for this class was generated from the following file: