vg
tools for working with variation graphs
Classes | Namespaces | Enumerations | Functions
gbwtgraph_helper.hpp File Reference
#include <gbwtgraph/gfa.h>
#include <gbwtgraph/gbz.h>
#include <gbwtgraph/minimizer.h>
#include "position.hpp"
#include "snarl_distance_index.hpp"
#include "zip_code.hpp"
#include <vector>
#include <unordered_map>

Classes

struct  vg::MinimizerIndexParameters
 Minimizer index construction parameters. More...
 

Namespaces

 vg
 

Enumerations

enum  vg::GraphCompatibilityFlags { vg::GRAPH_COMPATIBILITY_DEFAULT = 0x00, vg::GRAPH_COMPATIBILITY_STRICT = 0x01, vg::GRAPH_COMPATIBILITY_SUBGRAPH = 0x02 }
 

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 (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_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_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...
 
template<class T1 , class T2 >
void vg::require_compatible_graphs (const T1 &first, const std::string &first_decription, const T2 &second, const std::string &second_description, GraphCompatibilityFlags flags=GRAPH_COMPATIBILITY_DEFAULT)
 
void vg::require_compatible_reference (const std::string &gaf_filename, const HandleGraph *handle_graph, const gbwtgraph::GBZ *gbz, bool strict)
 
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...
 
handle_t vg::empty_gbwtgraph_handle ()
 Returns an empty GBWTGraph handle corresponding to the GBWT endmarker. 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...
 

Detailed Description

Utility classes and functions for working with GBWTGraph.