vg
tools for working with variation graphs
Enumerations | Functions | Variables
convert_main.cpp File Reference
#include "subcommand.hpp"
#include "../vg.hpp"
#include "../utility.hpp"
#include "xg.hpp"
#include "../algorithms/gfa_to_handle.hpp"
#include "../algorithms/find_gbwtgraph.hpp"
#include "../io/save_handle_graph.hpp"
#include "../gfa.hpp"
#include "../gbwt_helper.hpp"
#include "../gbwtgraph_helper.hpp"
#include <vg/io/stream.hpp>
#include <vg/io/vpkg.hpp>
#include <vg/io/alignment_emitter.hpp>
#include "bdsg/packed_graph.hpp"
#include "bdsg/hash_graph.hpp"
#include <gbwtgraph/gbz.h>
#include <gbwtgraph/gfa.h>
#include <unistd.h>
#include <getopt.h>

Enumerations

enum  input_type {
  input_handlegraph, input_gam, input_gaf, input_gfa,
  input_gbwtgraph
}
 
enum  algorithm_type { algorithm_auto, algorithm_vg, algorithm_gbwtgraph }
 

Functions

void help_convert (char **argv)
 
void no_multiple_inputs (input_type input)
 
void graph_to_xg_adjusting_paths (const PathHandleGraph *input, xg::XG *output, const std::unordered_set< std::string > &ref_samples, bool drop_haplotypes)
 
void add_and_adjust_paths (const PathHandleGraph *input, MutablePathHandleGraph *output, const std::unordered_set< std::string > &ref_samples, bool drop_haplotypes)
 
int main_convert (int argc, char **argv)
 
std::unordered_map< std::string, std::unordered_set< int64_t > > check_duplicate_path_names (const PathHandleGraph *input, const std::unordered_set< std::string > &ref_samples)
 

Variables

const input_type INPUT_DEFAULT = input_handlegraph
 
const algorithm_type ALGORITHM_DEFAULT = algorithm_auto
 

Enumeration Type Documentation

◆ algorithm_type

Enumerator
algorithm_auto 
algorithm_vg 
algorithm_gbwtgraph 

◆ input_type

enum input_type
Enumerator
input_handlegraph 
input_gam 
input_gaf 
input_gfa 
input_gbwtgraph 

Function Documentation

◆ add_and_adjust_paths()

void add_and_adjust_paths ( const PathHandleGraph input,
MutablePathHandleGraph output,
const std::unordered_set< std::string > &  ref_samples,
bool  drop_haplotypes 
)

◆ check_duplicate_path_names()

std::unordered_map<std::string, std::unordered_set<int64_t> > check_duplicate_path_names ( const PathHandleGraph input,
const std::unordered_set< std::string > &  ref_samples 
)

Check to make sure the haplotype paths with sample names in the given set have no more than one phase block per sample/haplotype/contig combination. Also return a map from sample name to set of observed haplotype numbers (so we can include them in reference-sense paths only if needed).

◆ graph_to_xg_adjusting_paths()

void graph_to_xg_adjusting_paths ( const PathHandleGraph input,
xg::XG output,
const std::unordered_set< std::string > &  ref_samples,
bool  drop_haplotypes 
)

◆ help_convert()

void help_convert ( char **  argv)

◆ main_convert()

int main_convert ( int  argc,
char **  argv 
)

◆ no_multiple_inputs()

void no_multiple_inputs ( input_type  input)

Variable Documentation

◆ ALGORITHM_DEFAULT

const algorithm_type ALGORITHM_DEFAULT = algorithm_auto

◆ INPUT_DEFAULT

const input_type INPUT_DEFAULT = input_handlegraph