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

#include <gbwt_helper.hpp>

Public Types

enum  index_type { index_none, index_compressed, index_dynamic }
 

Public Member Functions

void use_compressed ()
 
void use_dynamic ()
 
void use (gbwt::GBWT &new_index)
 
void use (gbwt::DynamicGBWT &new_index)
 
void unbacked ()
 The GBWT is no longer backed by a file. More...
 
void serialize (const std::string &new_filename)
 Serialize the in-memory index to this file and start using it as the backing file. More...
 
void clear ()
 Clear the in-memory index. More...
 

Public Attributes

gbwt::GBWT compressed
 Compressed GBWT. More...
 
gbwt::DynamicGBWT dynamic
 Dynamic GBWT. More...
 
index_type in_use = index_none
 Which index is in use. More...
 
std::string filename
 The in-memory indexes are backed by this file. More...
 
bool show_progress = false
 Print progress information to stderr when loading/converting indexes. More...
 

Detailed Description

Helper class that stores either a GBWT or a DynamicGBWT and loads them from a file or converts between them when necessary.

Member Enumeration Documentation

◆ index_type

Enumerator
index_none 
index_compressed 
index_dynamic 

Member Function Documentation

◆ clear()

void vg::GBWTHandler::clear ( )

Clear the in-memory index.

◆ serialize()

void vg::GBWTHandler::serialize ( const std::string &  new_filename)

Serialize the in-memory index to this file and start using it as the backing file.

◆ unbacked()

void vg::GBWTHandler::unbacked ( )

The GBWT is no longer backed by a file.

◆ use() [1/2]

void vg::GBWTHandler::use ( gbwt::DynamicGBWT &  new_index)

Start using this dynamic GBWT. Clears the index used as the argument. The GBWT is not backed by a file.

◆ use() [2/2]

void vg::GBWTHandler::use ( gbwt::GBWT &  new_index)

Start using this compressed GBWT. Clears the index used as the argument. The GBWT is not backed by a file.

◆ use_compressed()

void vg::GBWTHandler::use_compressed ( )

Switch to a compressed GBWT, converting it from the dynamic GBWT or reading it from a file if necessary.

◆ use_dynamic()

void vg::GBWTHandler::use_dynamic ( )

Switch to a dynamic GBWT, converting it from the compressed GBWT or reading it from a file if necessary.

Member Data Documentation

◆ compressed

gbwt::GBWT vg::GBWTHandler::compressed

Compressed GBWT.

◆ dynamic

gbwt::DynamicGBWT vg::GBWTHandler::dynamic

Dynamic GBWT.

◆ filename

std::string vg::GBWTHandler::filename

The in-memory indexes are backed by this file.

◆ in_use

index_type vg::GBWTHandler::in_use = index_none

Which index is in use.

◆ show_progress

bool vg::GBWTHandler::show_progress = false

Print progress information to stderr when loading/converting indexes.


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