36#include <unordered_map>
41namespace BayesicSpace {
61 [[gnu::warn_unused_result]] uint64_t
countSetBits(
const std::vector<uint8_t> &inVec);
87 [[gnu::warn_unused_result]] uint32_t
murMurHashMixer(
const std::array<uint32_t, SIZE_OF_SIZET> &key,
const uint32_t &seed);
106 [[gnu::warn_unused_result]] uint32_t
murMurHash(
const std::array<uint32_t, SIZE_OF_SIZET> &key,
const uint32_t &seed);
116 [[gnu::warn_unused_result]] uint32_t
murMurHash(
const std::vector<size_t> &key,
const uint32_t &seed);
126 [[gnu::warn_unused_result]] uint32_t
murMurHash(
const std::vector<uint32_t> &key,
const uint32_t &seed);
162 [[gnu::warn_unused_result]] std::vector<size_t>
makeChunkSizes(
const size_t &nElements,
const size_t &nChunks);
182 [[gnu::warn_unused_result]] std::pair<HashGroupItPairCount, HashGroupItPairCount>
225 [[gnu::warn_unused_result]] std::vector<std::string>
getLocusNames(
const std::string &bimFileName);
234 void parseCL(
int &argc,
char **argv, std::unordered_map<std::string, std::string> &cli);
244 void extractCLinfo(
const std::unordered_map<std::string, std::string> &parsedCLI, std::unordered_map<std::string, int> &intVariables,
245 std::unordered_map<std::string, float> &floatVariables, std::unordered_map<std::string, std::string> &stringVariables);
Summarize variant tables by hashing.
Number of items and their size.
Definition gvarHash.hpp:68
Hash group vector iterator and element number.
Definition gvarHash.hpp:142
Window location and extent.
Definition gvarHash.hpp:57
void binarizeMacLocus(const std::vector< int > &macLocus, const LocationWithLength &binLocusWindow, std::vector< uint8_t > &binLocus)
Convert a locus from a vector of minor allele counts.
std::pair< HashGroupItPairCount, HashGroupItPairCount > makeGroupRanges(const std::vector< HashGroup > &groupVector, const HashGroupItPairCount &startHGPC, const size_t &chunkSize)
Delimit a chunk of indexes.
uint32_t murMurHash(const std::array< uint32_t, SIZE_OF_SIZET > &key, const uint32_t &seed)
MurMurHash of an index value.
std::vector< std::pair< size_t, size_t > > makeThreadRanges(const CountAndSize &threadPoolSizes)
Build thread ranges.
void binarizeBedLocus(const LocationWithLength &bedLocusWindow, const std::vector< char > &bedLocus, const size_t &nIndividuals, const LocationWithLength &binLocusWindow, std::vector< uint8_t > &binLocus)
Convert a locus from .bed to binary format.
constexpr size_t N_BED_TEST_BYTES
Number of test bytes in a .bed file.
Definition vashFunctions.hpp:45
constexpr size_t SIZE_OF_SIZET
Number of 32-bit values in size_t
Definition vashFunctions.hpp:43
uint32_t murMurHashFinalizer(const uint32_t &inputHash)
MurMurHash finalizer.
size_t getAvailableRAM()
Get available RAM.
std::vector< std::pair< RowColIdx, RowColIdx > > makeChunkRanges(const LocationWithLength &startAndChunkSize, const size_t nChunks)
Build chunk ranges.
void parseCL(int &argc, char **argv, std::unordered_map< std::string, std::string > &cli)
Command line parser.
void extractCLinfo(const std::unordered_map< std::string, std::string > &parsedCLI, std::unordered_map< std::string, int > &intVariables, std::unordered_map< std::string, float > &floatVariables, std::unordered_map< std::string, std::string > &stringVariables)
Extract parameters from parsed command line interface flags.
std::vector< size_t > makeChunkSizes(const size_t &nElements, const size_t &nChunks)
Build chunk sizes.
std::vector< std::string > getLocusNames(const std::string &bimFileName)
Extract locus names.
uint32_t murMurHashMixer(const std::array< uint32_t, SIZE_OF_SIZET > &key, const uint32_t &seed)
MurMurHash mixer module of an index value.
void testBedMagicBytes(const std::array< char, N_BED_TEST_BYTES > &bytesToTest)
Test .bed magic bytes.
uint16_t countSetBits(uint16_t inVal)
Count set bits in a 16-bit word.