vg
tools for working with variation graphs
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
vg::MinimizerIndexParameters Struct Reference

Minimizer index construction parameters. More...

#include <gbwtgraph_helper.hpp>

Public Types

enum  PayloadType { PAYLOAD_NONE, PAYLOAD_ZIPCODES, PAYLOAD_ZIPCODES_WITH_PATHS }
 

Public Member Functions

MinimizerIndexParametersminimizers (size_t k, size_t w)
 Sets minimizer parameters. More...
 
MinimizerIndexParameterssyncmers (size_t k, size_t s)
 Sets syncmer parameters. More...
 
MinimizerIndexParameterswith_paths (bool paths_in_payload=true)
 Includes path information in the payload. More...
 
MinimizerIndexParametersweighted (bool use_weighted_minimizers, size_t threshold=DEFAULT_THRESHOLD, size_t iterations=DEFAULT_ITERATIONS)
 Sets weighted minimizer parameters. More...
 
MinimizerIndexParameterskmer_counting (bool space_efficient_counting=false, size_t hash_table_width=0)
 Sets k-mer counting parameters. More...
 
MinimizerIndexParametersverbose (bool progress=true)
 Sets progress printing. More...
 
std::string validate () const
 Returns an error message if the parameters are invalid. More...
 

Static Public Member Functions

static std::string payload_str (PayloadType type)
 

Public Attributes

size_t k = gbwtgraph::DefaultMinimizerIndex::key_type::KMER_LENGTH
 k-mer length. More...
 
size_t w_or_s = gbwtgraph::DefaultMinimizerIndex::key_type::WINDOW_LENGTH
 Window length (with minimizers) or s-mer length (with syncmers). More...
 
bool use_syncmers = false
 Whether to use syncmers instead of minimizers. More...
 
bool paths_in_payload = false
 
bool use_weighted_minimizers = false
 Whether to use weighted minimizers (cannot be used with syncmers). More...
 
size_t threshold = DEFAULT_THRESHOLD
 Downweight kmers with more than this many hits. More...
 
size_t iterations = DEFAULT_ITERATIONS
 Number of iterations for weighted minimizer calculation. More...
 
bool space_efficient_counting = false
 Whether to use the space-efficient k-mer counting algorithm with weighted minimizers. More...
 
size_t hash_table_width = 0
 Initial hash table width (in bits) for kmer counting (0 = guess). More...
 
bool progress = false
 Print progress information during construction. More...
 

Static Public Attributes

constexpr static size_t DEFAULT_THRESHOLD = 500
 Default for threshold. Should be the same as Giraffe hard hit cap. More...
 
constexpr static size_t DEFAULT_ITERATIONS = 3
 Default for iterations. More...
 
constexpr static size_t MAX_ITERATIONS = gbwtgraph::MinimizerHeader::FLAG_WEIGHT_MASK >> gbwtgraph::MinimizerHeader::FLAG_WEIGHT_OFFSET
 Maximum allowed value for iterations. More...
 
constexpr static size_t HASH_TABLE_MIN_WIDTH = 10
 Lower bound for hash_table_width. More...
 
constexpr static size_t HASH_TABLE_MAX_WIDTH = 36
 Upper bound for hash_table_width. More...
 
constexpr static size_t ZIPCODE_PAYLOAD_SIZE = sizeof(ZipCode::payload_type) / sizeof(gbwtgraph::KmerEncoding::code_type)
 Number of words used for a zipcode payload. More...
 
const static std::string PAYLOAD_KEY = "payload"
 Tag used to indicate the payload type in the minimizer index. More...
 

Detailed Description

Minimizer index construction parameters.

Member Enumeration Documentation

◆ PayloadType

Enumerator
PAYLOAD_NONE 

No payload.

PAYLOAD_ZIPCODES 

Zipcode payload.

PAYLOAD_ZIPCODES_WITH_PATHS 

Zipcode payload with path information.

Member Function Documentation

◆ kmer_counting()

MinimizerIndexParameters& vg::MinimizerIndexParameters::kmer_counting ( bool  space_efficient_counting = false,
size_t  hash_table_width = 0 
)
inline

Sets k-mer counting parameters.

◆ minimizers()

MinimizerIndexParameters& vg::MinimizerIndexParameters::minimizers ( size_t  k,
size_t  w 
)
inline

Sets minimizer parameters.

◆ payload_str()

std::string vg::MinimizerIndexParameters::payload_str ( PayloadType  type)
static

Returns a string representation of the payload type. This will be used as a tag value in the minimizer index.

◆ syncmers()

MinimizerIndexParameters& vg::MinimizerIndexParameters::syncmers ( size_t  k,
size_t  s 
)
inline

Sets syncmer parameters.

◆ validate()

std::string vg::MinimizerIndexParameters::validate ( ) const

Returns an error message if the parameters are invalid.

◆ verbose()

MinimizerIndexParameters& vg::MinimizerIndexParameters::verbose ( bool  progress = true)
inline

Sets progress printing.

◆ weighted()

MinimizerIndexParameters& vg::MinimizerIndexParameters::weighted ( bool  use_weighted_minimizers,
size_t  threshold = DEFAULT_THRESHOLD,
size_t  iterations = DEFAULT_ITERATIONS 
)
inline

Sets weighted minimizer parameters.

◆ with_paths()

MinimizerIndexParameters& vg::MinimizerIndexParameters::with_paths ( bool  paths_in_payload = true)
inline

Includes path information in the payload.

Member Data Documentation

◆ DEFAULT_ITERATIONS

constexpr size_t vg::MinimizerIndexParameters::DEFAULT_ITERATIONS = 3
staticconstexpr

Default for iterations.

◆ DEFAULT_THRESHOLD

constexpr size_t vg::MinimizerIndexParameters::DEFAULT_THRESHOLD = 500
staticconstexpr

Default for threshold. Should be the same as Giraffe hard hit cap.

◆ HASH_TABLE_MAX_WIDTH

constexpr size_t vg::MinimizerIndexParameters::HASH_TABLE_MAX_WIDTH = 36
staticconstexpr

Upper bound for hash_table_width.

◆ HASH_TABLE_MIN_WIDTH

constexpr size_t vg::MinimizerIndexParameters::HASH_TABLE_MIN_WIDTH = 10
staticconstexpr

Lower bound for hash_table_width.

◆ hash_table_width

size_t vg::MinimizerIndexParameters::hash_table_width = 0

Initial hash table width (in bits) for kmer counting (0 = guess).

◆ iterations

size_t vg::MinimizerIndexParameters::iterations = DEFAULT_ITERATIONS

Number of iterations for weighted minimizer calculation.

◆ k

size_t vg::MinimizerIndexParameters::k = gbwtgraph::DefaultMinimizerIndex::key_type::KMER_LENGTH

k-mer length.

◆ MAX_ITERATIONS

constexpr size_t vg::MinimizerIndexParameters::MAX_ITERATIONS = gbwtgraph::MinimizerHeader::FLAG_WEIGHT_MASK >> gbwtgraph::MinimizerHeader::FLAG_WEIGHT_OFFSET
staticconstexpr

Maximum allowed value for iterations.

◆ paths_in_payload

bool vg::MinimizerIndexParameters::paths_in_payload = false

Whether to include path information in the payload (for recombination-aware mapping). Ignored if there is no zipcode payload.

◆ PAYLOAD_KEY

const std::string vg::MinimizerIndexParameters::PAYLOAD_KEY = "payload"
static

Tag used to indicate the payload type in the minimizer index.

◆ progress

bool vg::MinimizerIndexParameters::progress = false

Print progress information during construction.

◆ space_efficient_counting

bool vg::MinimizerIndexParameters::space_efficient_counting = false

Whether to use the space-efficient k-mer counting algorithm with weighted minimizers.

◆ threshold

size_t vg::MinimizerIndexParameters::threshold = DEFAULT_THRESHOLD

Downweight kmers with more than this many hits.

◆ use_syncmers

bool vg::MinimizerIndexParameters::use_syncmers = false

Whether to use syncmers instead of minimizers.

◆ use_weighted_minimizers

bool vg::MinimizerIndexParameters::use_weighted_minimizers = false

Whether to use weighted minimizers (cannot be used with syncmers).

◆ w_or_s

size_t vg::MinimizerIndexParameters::w_or_s = gbwtgraph::DefaultMinimizerIndex::key_type::WINDOW_LENGTH

Window length (with minimizers) or s-mer length (with syncmers).

◆ ZIPCODE_PAYLOAD_SIZE

constexpr size_t vg::MinimizerIndexParameters::ZIPCODE_PAYLOAD_SIZE = sizeof(ZipCode::payload_type) / sizeof(gbwtgraph::KmerEncoding::code_type)
staticconstexpr

Number of words used for a zipcode payload.


The documentation for this struct was generated from the following files: