vg
tools for working with variation graphs
Namespaces | Typedefs | Functions
gbwtgraph_helper.cpp File Reference
#include "gbwtgraph_helper.hpp"
#include "gbwt_helper.hpp"
#include "gbzgraph.hpp"
#include <gbwtgraph/index.h>
#include <vg/io/alignment_io.hpp>

Namespaces

 vg
 

Typedefs

using vg::key_type = gbwtgraph::DefaultMinimizerIndex::key_type
 
using vg::code_type = gbwtgraph::KmerEncoding::code_type
 
using vg::payload_t = ZipCode::payload_type
 

Functions

gbwtgraph::GFAParsingParameters vg::get_best_gbwtgraph_gfa_parsing_parameters ()
 
void vg::load_gbwtgraph (gbwtgraph::GBWTGraph &graph, const std::string &filename, bool show_progress)
 
void vg::load_gbz (gbwtgraph::GBZ &gbz, const std::string &filename, bool show_progress=false)
 Load GBZ from the file. More...
 
void vg::load_gbz (gbwt::GBWT &index, gbwtgraph::GBWTGraph &graph, const std::string &filename, bool show_progress=false)
 Load GBWT and GBWTGraph from the GBZ file. More...
 
void vg::load_gbz (gbwtgraph::GBZ &gbz, const std::string &gbwt_name, const std::string &graph_name, bool show_progress=false)
 Load GBZ from separate GBWT / GBWTGraph files. More...
 
void vg::load_minimizer (gbwtgraph::DefaultMinimizerIndex &index, const std::string &filename, bool show_progress)
 
void vg::save_gbwtgraph (const gbwtgraph::GBWTGraph &graph, const std::string &filename, bool show_progress=false)
 Save GBWTGraph to the file. More...
 
void vg::save_gbz (const gbwtgraph::GBZ &gbz, const std::string &filename, bool show_progress=false)
 Save GBZ to the file. More...
 
void vg::save_gbz (const gbwt::GBWT &index, gbwtgraph::GBWTGraph &graph, const std::string &filename, bool show_progress)
 
void vg::save_gbz (const gbwtgraph::GBZ &gbz, const std::string &gbwt_name, const std::string &graph_name, bool show_progress=false)
 Save GBZ to separate GBWT / GBWTGraph files. More...
 
void vg::save_minimizer (const gbwtgraph::DefaultMinimizerIndex &index, const std::string &filename, bool show_progress=false)
 Save a minimizer index to the file. More...
 
GraphCompatibilityFlags vg::operator| (GraphCompatibilityFlags a, GraphCompatibilityFlags b)
 
GraphCompatibilityFlags & vg::operator|= (GraphCompatibilityFlags &a, GraphCompatibilityFlags b)
 
void vg::require_compatible_graphs_impl (const gbwtgraph::GraphName &first_name, const std::string &first_decription, const gbwtgraph::GraphName &second_name, const std::string &second_description, GraphCompatibilityFlags flags)
 Implementation of require_compatible_graphs(). More...
 
void vg::require_compatible_reference (const std::string &gaf_filename, const HandleGraph *handle_graph, const gbwtgraph::GBZ *gbz, bool strict)
 
size_t vg::trailing_zeros (size_t value)
 
size_t vg::estimate_hash_table_size (const gbwtgraph::GBZ &gbz, bool progress)
 
std::vector< key_type > vg::find_frequent_kmers (const gbwtgraph::GBZ &gbz, const MinimizerIndexParameters &params)
 
void vg::cache_payloads (const gbwtgraph::GBZ &gbz, const SnarlDistanceIndex &distance_index, hash_map< nid_t, payload_t > &node_id_to_payload, ZipCodeCollection *oversized_zipcodes, bool progress)
 
gbwtgraph::DefaultMinimizerIndex vg::build_minimizer_index (const gbwtgraph::GBZ &gbz, const SnarlDistanceIndex *distance_index, ZipCodeCollection *oversized_zipcodes, const MinimizerIndexParameters &params)
 
void vg::require_payload (const gbwtgraph::DefaultMinimizerIndex &index, MinimizerIndexParameters::PayloadType expected_payload)
 
void vg::require_payload (const gbwtgraph::DefaultMinimizerIndex &index, const std::vector< MinimizerIndexParameters::PayloadType > &expected_payloads)
 
bool vg::has_payload (const gbwtgraph::DefaultMinimizerIndex &index, MinimizerIndexParameters::PayloadType payload)
 
bool vg::has_payload (const gbwtgraph::DefaultMinimizerIndex &index, const std::vector< MinimizerIndexParameters::PayloadType > &payloads)
 
unordered_map< string, vector< nid_t > > vg::load_translation_map (const gbwtgraph::GBWTGraph &graph)
 Return a mapping of the original segment ids to a list of chopped node ids. More...
 
unordered_map< nid_t, pair< string, size_t > > vg::load_translation_back_map (const gbwtgraph::GBWTGraph &graph)
 Return a backwards mapping of chopped node to original segment position (id,offset pair) More...
 
std::string vg::to_string_gbwtgraph (handle_t handle)
 Returns a string representation of a GBWTGraph handle. More...
 
std::string vg::to_string_gbwtgraph (gbwt::node_type node)
 Returns a string representation of a GBWTGraph node. More...