Sample SNPs
Fast ordered sampling of rows from large text or binary files. Special cases for DNA variant files (.bed, VCF, HapMap, etc).
|
BED file output class. More...
#include <varfiles.hpp>
Public Member Functions | |
BedFileO () | |
Default constructor. | |
BedFileO (const string &stubName) | |
File name constructor. More... | |
BedFileO (const BedFileO &in)=default | |
Copy constructor. | |
BedFileO & | operator= (const BedFileO &in)=default |
Copy assignment. | |
BedFileO (BedFileO &&in)=default | |
Move constructor. | |
BedFileO & | operator= (BedFileO &&in)=default |
Move assignment. | |
~BedFileO () | |
Destructor. | |
void | open () |
Open stream to write. | |
Public Member Functions inherited from sampFiles::BedFile | |
BedFile () | |
Default constructor. | |
BedFile (const string &stubName) | |
File name constructor. More... | |
BedFile (const BedFile &in)=default | |
Copy constructor. | |
BedFile & | operator= (const BedFile &in)=default |
Copy assignment. | |
BedFile (BedFile &&in)=default | |
Move constructor. | |
BedFile & | operator= (BedFile &&in)=default |
Move assignment. | |
~BedFile () | |
Destructor. | |
void | close () |
Close stream. | |
Public Member Functions inherited from sampFiles::GbinFile | |
GbinFile () | |
Default constructor. | |
GbinFile (const string &fileName, const size_t &nCols, const size_t &elemSize) | |
Constructor with file name. More... | |
GbinFile (const GbinFile &in)=default | |
Copy constructor. | |
GbinFile & | operator= (const GbinFile &in)=default |
Copy assignment. | |
GbinFile (GbinFile &&in)=default | |
Move constructor. | |
GbinFile & | operator= (GbinFile &&in)=default |
Move assignment. | |
~GbinFile () | |
Destructor. | |
Public Member Functions inherited from sampFiles::VarFile | |
VarFile (const VarFile &in)=default | |
Copy constructor. | |
VarFile & | operator= (const VarFile &in)=default |
Copy assignment. | |
VarFile (VarFile &&in)=default | |
Move constructor. | |
VarFile & | operator= (VarFile &&in)=default |
Move assignment. | |
~VarFile () | |
Destructor. | |
Friends | |
class | BedFileI |
Additional Inherited Members | |
Protected Member Functions inherited from sampFiles::VarFile | |
VarFile () | |
Default constructor (protected) | |
Protected Attributes inherited from sampFiles::BedFile | |
fstream | _famFile |
Corresponding .fam file stream. | |
fstream | _bimFile |
Corresponding .bim file stream. | |
string | _fileStub |
File name stub (minus the extension) | |
Protected Attributes inherited from sampFiles::GbinFile | |
string | _fileName |
File name. | |
size_t | _nCols |
Number of elements in a row. | |
size_t | _elemSize |
Size of each element in bytes. | |
Protected Attributes inherited from sampFiles::VarFile | |
fstream | _varFile |
Variant file stream. | |
Static Protected Attributes inherited from sampFiles::BedFile | |
static const vector< char > | _masks = {static_cast<char>(0x03), static_cast<char>(0x0C), static_cast<char>(0x30), static_cast<char>(0xC0)} |
Genotype bit masks. More... | |
static const unordered_map< char, string > | _tests |
Genotype bit tests. More... | |
BED file output class.
Writes to BED files and the auxiliary files that come with them (.fam and .bim) as necessary. Data are written in the SNP-major format.
|
inline |
File name constructor.
[in] | stubName | file name minus the extension |