vcfpp
|
Stream out variants to compressed/uncompressed VCF/BCF file or stdout. More...
#include <vcfpp.h>
Public Member Functions | |
BcfWriter () | |
Construct an empty BcfWriter. | |
BcfWriter (const std::string &fname, std::string version="VCF4.1") | |
Open VCF/BCF file for writing. The format is infered from file's suffix. More... | |
BcfWriter (const std::string &fname, const BcfHeader &h) | |
Open VCF/BCF file for writing. The format is infered from file's suffix. More... | |
BcfWriter (const std::string &fname, const std::string &version, const std::string &mode) | |
Open VCF/BCF file for writing using given mode. More... | |
BcfWriter (const std::string &fname, const BcfHeader &h, const std::string &mode) | |
Open VCF/BCF file for writing using given mode. More... | |
void | open (const std::string &fname) |
Open VCF/BCF file for writing. The format is infered from file's suffix. More... | |
void | open (const std::string &fname, const std::string &mode) |
Open VCF/BCF file for writing using given mode. More... | |
void | close () |
close the BcfWriter object. | |
void | initalHeader (std::string version="VCF4.1") |
initial a VCF header using the internal template given a specific version. VCF4.1 is the default | |
void | initalHeader (const BcfHeader &h) |
initial a VCF header by pointing to header of another VCF | |
void | copyHeader (const std::string &vcffile, std::string samples="-") |
copy header of given VCF and restrict on samples. if samples=="", FORMAT removed and only sites left | |
void | writeLine (const std::string &vcfline) |
copy a string to a vcf line | |
bool | writeHeader () |
streams out the header | |
bool | writeRecord (BcfRecord &v) |
streams out the given variant of BcfRecord type | |
Public Attributes | |
BcfHeader | header |
header object initialized by initalHeader | |
Stream out variants to compressed/uncompressed VCF/BCF file or stdout.
|
inline |
Open VCF/BCF file for writing. The format is infered from file's suffix.
fname | The file name or "-" for stdin/stdout. For indexed files |
version | The output header is constructed with the internal template given a specific version |
|
inline |
Open VCF/BCF file for writing. The format is infered from file's suffix.
fname | The file name or "-" for stdin/stdout. For indexed files |
h | The output header is pointing to the given BcfHeader object |
|
inline |
Open VCF/BCF file for writing using given mode.
fname | The file name or "-" for stdin/stdout. For indexed files |
version | The output header is constructed with the internal template given a specific version |
mode | Mode matching [w]b .. compressed BCF [w]bu .. uncompressed BCF [w]z .. compressed VCF [w] .. uncompressed VCF |
|
inline |
Open VCF/BCF file for writing using given mode.
fname | The file name or "-" for stdin/stdout. For indexed files |
h | The output header is pointing to the given BcfHeader object |
mode | Mode matching [w]b .. compressed BCF [w]bu .. uncompressed BCF [w]z .. compressed VCF [w] .. uncompressed VCF |
|
inline |
Open VCF/BCF file for writing. The format is infered from file's suffix.
fname | The file name or "-" for stdin/stdout. For indexed files |
|
inline |
Open VCF/BCF file for writing using given mode.
fname | The file name or "-" for stdin/stdout. For indexed files |
mode | Mode matching [w]b .. compressed BCF [w]bu .. uncompressed BCF [w]z .. compressed VCF [w] .. uncompressed VCF |