vg
tools for working with variation graphs
Classes | Enumerations | Functions
prune_main.cpp File Reference
#include "../phase_unfolder.hpp"
#include <vg/io/vpkg.hpp>
#include "subcommand.hpp"
#include "xg.hpp"
#include "../algorithms/prune.hpp"
#include "../io/save_handle_graph.hpp"
#include <gbwt/gbwt.h>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <getopt.h>
#include <omp.h>

Classes

struct  PruningParameters
 

Enumerations

enum  PruningMode { mode_prune, mode_restore, mode_unfold }
 

Functions

std::string mode_name (PruningMode mode)
 
std::string short_mode_name (PruningMode mode)
 
template<class ValueType >
void print_defaults (const std::map< PruningMode, ValueType > &defaults)
 
void help_prune (char **argv)
 
int main_prune (int argc, char **argv)
 

Detailed Description

Defines the "vg prune" subcommand, which prunes the complex regions of the graph for GCSA2 indexing.

By default, pruning removes the nodes touched by paths of length –kmer-length crossing more than –edge-max non-trivial edges. Graph regions shorter than –subgraph_min are also removed. Pruning also removes all embedded paths.

For very complex graphs, there is an option to remove high-degree nodes before pruning. Otherwise enumerating the k bp paths would take too long.

With –restore-paths, the nodes and edges on non-alt paths are added back after pruning.

With –unfold-paths, pruning unfolds the non-alt paths and GBWT threads in the complex regions. If –mapping is specified, the mapping from duplicate node identifiers to the original identifiers is stored in a file. This file can be used for building a GCSA2 index that maps to the original graph.

Enumeration Type Documentation

◆ PruningMode

Enumerator
mode_prune 
mode_restore 
mode_unfold 

Function Documentation

◆ help_prune()

void help_prune ( char **  argv)

◆ main_prune()

int main_prune ( int  argc,
char **  argv 
)

◆ mode_name()

std::string mode_name ( PruningMode  mode)

◆ print_defaults()

template<class ValueType >
void print_defaults ( const std::map< PruningMode, ValueType > &  defaults)

◆ short_mode_name()

std::string short_mode_name ( PruningMode  mode)