vg
tools for working with variation graphs
Classes | Namespaces | Typedefs | Functions
snarls.hpp File Reference
#include <iostream>
#include <cstdint>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <fstream>
#include <deque>
#include <vg/io/protobuf_emitter.hpp>
#include <vg/io/protobuf_iterator.hpp>
#include "vg.hpp"
#include "handle.hpp"
#include <vg/vg.pb.h>
#include "hash_map.hpp"
#include "cactus.hpp"

Classes

class  vg::SnarlFinder
 
class  vg::HandleGraphSnarlFinder
 
struct  vg::ChainIterator
 
class  vg::NetGraph
 
class  vg::SnarlManager
 
struct  vg::SnarlManager::SnarlRecord
 
struct  std::hash< const vg::Snarl >
 hash function for Snarls More...
 

Namespaces

 vg
 
 std
 Hash functor to hash NodeSides using std::hash.
 

Typedefs

using vg::Chain = vector< pair< const Snarl *, bool > >
 

Functions

bool vg::start_backward (const Chain &chain)
 
bool vg::end_backward (const Chain &chain)
 
Visit vg::get_start_of (const Chain &chain)
 
Visit vg::get_end_of (const Chain &chain)
 
ChainIterator vg::chain_begin (const Chain &chain)
 
ChainIterator vg::chain_end (const Chain &chain)
 
ChainIterator vg::chain_rbegin (const Chain &chain)
 
ChainIterator vg::chain_rend (const Chain &chain)
 
ChainIterator vg::chain_rcbegin (const Chain &chain)
 
ChainIterator vg::chain_rcend (const Chain &chain)
 
ChainIterator vg::chain_begin_from (const Chain &chain, const Snarl *start_snarl, bool snarl_orientation)
 
ChainIterator vg::chain_end_from (const Chain &chain, const Snarl *start_snarl, bool snarl_orientation)
 
NodeTraversal vg::to_node_traversal (const Visit &visit, const VG &graph)
 
NodeTraversal vg::to_rev_node_traversal (const Visit &visit, const VG &graph)
 
NodeSide vg::to_left_side (const Visit &visit)
 Converts a Visit to a node or snarl into a NodeSide for its left side. More...
 
NodeSide vg::to_right_side (const Visit &visit)
 Converts a Visit to a node or snarl into a NodeSide for its right side. More...
 
Visit vg::to_visit (const NodeTraversal &node_traversal)
 Converts a NodeTraversal to a Visit. More...
 
Visit vg::to_visit (const Mapping &mapping, bool make_full_node_match=false)
 
Visit vg::to_visit (id_t node_id, bool is_reverse)
 Make a Visit from a node ID and an orientation. More...
 
Visit vg::to_visit (const Snarl &snarl)
 Make a Visit from a snarl to traverse. More...
 
Visit vg::to_visit (const handlegraph::HandleGraph &graph, const handle_t &handle)
 Make a Visit from a handle in a HandleGraph. More...
 
Visit vg::reverse (const Visit &visit)
 Get the reversed version of a visit. More...
 
Visit vg::to_rev_visit (const NodeTraversal &node_traversal)
 Converts a NodeTraversal to a Visit in the opposite orientation. More...
 
Mapping vg::to_mapping (const Visit &visit, std::function< size_t(id_t)> node_length)
 
Mapping vg::to_mapping (const Visit &visit, const HandleGraph &vg)
 
Alignment vg::to_alignment (const SnarlTraversal &trav, const HandleGraph &graph)
 Convert a snarl traversal into an alignment. More...
 
void vg::transfer_boundary_info (const Snarl &from, Snarl &to)
 Copies the boundary Visits from one Snarl into another. More...
 
edge_t vg::to_edge (const handlegraph::HandleGraph &graph, const Visit &v1, const Visit &v2)
 Make an edge_t from a pair of visits. More...
 
bool vg::operator== (const Visit &a, const Visit &b)
 
bool vg::operator!= (const Visit &a, const Visit &b)
 
bool vg::operator< (const Visit &a, const Visit &b)
 
ostream & vg::operator<< (ostream &out, const Visit &visit)
 
bool vg::operator== (const SnarlTraversal &a, const SnarlTraversal &b)
 
bool vg::operator!= (const SnarlTraversal &a, const SnarlTraversal &b)
 
bool vg::operator< (const SnarlTraversal &a, const SnarlTraversal &b)
 
bool vg::operator== (const Snarl &a, const Snarl &b)
 
bool vg::operator!= (const Snarl &a, const Snarl &b)
 
bool vg::operator< (const Snarl &a, const Snarl &b)
 
ostream & vg::operator<< (ostream &out, const Snarl &snarl)
 
NodeTraversal vg::to_node_traversal (const Visit &visit, VG &graph)
 
NodeTraversal vg::to_rev_node_traversal (const Visit &visit, VG &graph)
 

Detailed Description

Contains object to own Snarls and keep track of their tree relationships as well as utility functions that interact with snarls.