Sample SNPs
Fast ordered sampling of rows from large text or binary files. Special cases for DNA variant files (.bed, VCF, HapMap, etc).
|
Read and write genetic variant files. More...
#include <fstream>
#include <string>
#include <vector>
#include <unordered_map>
#include <cstdint>
#include <limits>
#include "populations.hpp"
Go to the source code of this file.
Classes | |
class | sampFiles::VarFile |
Base variant file class. More... | |
class | sampFiles::GbinFile |
Generic binary file base class. More... | |
class | sampFiles::GbinFileI |
Binary file input class. More... | |
class | sampFiles::GbinFileO |
Generic binary file output class. More... | |
class | sampFiles::BedFile |
BED file base class. More... | |
class | sampFiles::BedFileI |
BED file input class. More... | |
class | sampFiles::BedFileO |
BED file output class. More... | |
class | sampFiles::GtxtFile |
Generic text file base class. More... | |
class | sampFiles::GtxtFileI |
Text file input class. More... | |
class | sampFiles::GtxtFileO |
Generic text file output class. More... | |
class | sampFiles::TpedFile |
TPED file base class. More... | |
class | sampFiles::TpedFileI |
TPED file input class. More... | |
class | sampFiles::TpedFileO |
TPED file output class. More... | |
class | sampFiles::VcfFile |
VCF file base class. More... | |
class | sampFiles::VcfFileI |
VCF file input class. More... | |
class | sampFiles::VcfFileO |
VCF file output class. More... | |
class | sampFiles::HmpFile |
Hapmap (HMP) file base class. More... | |
class | sampFiles::HmpFileI |
HMP file input class. More... | |
class | sampFiles::HmpFileO |
HMP file output class. More... | |
Variables | |
static const size_t | sampFiles::BUF_SIZE = 10485760 |
Buffer size. More... | |
const double | sampFiles::EPS = numeric_limits<double>::epsilon() |
Machine \(\epsilon\). | |
const double | sampFiles::PI = 3.14159265358979323846264338328 |
pi | |
Read and write genetic variant files.
Definitions and interface documentation for classes that read and write various genetic variant file formats.
Currently supported formats:
|
static |
Buffer size.
Size of the buffer for reading files text files. I use it in functions that count the number of lines, for example. The buffer size (10M) is optimized for a MacBook Pro with an SSD. Other systems may perform better with a different value (e.g., if you have a spinning drive and more RAM you may want to experiemtn with increasing it).