#include <genesis/population/format/hts_file.hpp>
Wrap an ::htsFile
struct.
This thin wrapper simply applies RAII to the htslib struct.
Definition at line 56 of file hts_file.hpp.
Public Member Functions | |
HtsFile ()=default | |
Create an empty instance, with no file attached. More... | |
HtsFile (HtsFile &&other) | |
HtsFile (HtsFile const &)=delete | |
HtsFile (std::string const &file_name, std::string const &mode="r") | |
Create an instance that opens a file. More... | |
~HtsFile () | |
::htsFile * | data () |
std::string const & | file_name () const |
std::string | format_description () const |
Return a human-readable description of the file format. More... | |
std::string | format_extension () const |
Return the file format extension. More... | |
HtsFile & | operator= (HtsFile &&other) |
HtsFile & | operator= (HtsFile const &)=delete |
|
default |
Create an empty instance, with no file attached.
|
explicit |
Create an instance that opens a file.
For the mode
param, see the ::hts_open()
documentation of htslib. By default, we open for read-only access.
Definition at line 49 of file hts_file.cpp.
~HtsFile | ( | ) |
Definition at line 62 of file hts_file.cpp.
Definition at line 69 of file hts_file.cpp.
|
inline |
Definition at line 97 of file hts_file.hpp.
|
inline |
Definition at line 92 of file hts_file.hpp.
std::string format_description | ( | ) | const |
Return a human-readable description of the file format.
See the ::hts_format_description()
documentation of htslib for details.
Definition at line 95 of file hts_file.cpp.
std::string format_extension | ( | ) | const |
Return the file format extension.
See the ::hts_format_file_extension()
documentation of htslib for details.
Definition at line 104 of file hts_file.cpp.
Definition at line 79 of file hts_file.cpp.