vg
tools for working with variation graphs
Classes | Namespaces | Functions
multipath_alignment.hpp File Reference
#include <stdio.h>
#include <vector>
#include <list>
#include <unordered_map>
#include <algorithm>
#include <vg/vg.pb.h>
#include "path.hpp"
#include "alignment.hpp"
#include "utility.hpp"
#include "handle.hpp"
#include "annotation.hpp"

Classes

class  vg::connection_t
 
class  vg::subpath_t
 
class  vg::multipath_alignment_t
 

Namespaces

 haplo
 
 vg
 

Functions

string vg::debug_string (const connection_t &connection)
 
string vg::debug_string (const subpath_t &subpath)
 
string vg::debug_string (const multipath_alignment_t &multipath_aln)
 
void vg::topologically_order_subpaths (multipath_alignment_t &multipath_aln)
 Put subpaths in topological order (assumed to be true for other algorithms) More...
 
void vg::identify_start_subpaths (multipath_alignment_t &multipath_aln)
 
void vg::clear_alignment (multipath_alignment_t &multipath_aln)
 Clear all of the field associated with the alignment. More...
 
void vg::optimal_alignment (const multipath_alignment_t &multipath_aln, Alignment &aln_out, bool subpath_global)
 
int32_t vg::optimal_alignment_score (const multipath_alignment_t &multipath_aln, bool subpath_global)
 
int32_t vg::worst_alignment_score (const multipath_alignment_t &multipath_aln)
 
vector< Alignmentvg::optimal_alignments (const multipath_alignment_t &multipath_aln, size_t count)
 
vector< Alignmentvg::optimal_alignments_with_disjoint_subpaths (const multipath_alignment_t &multipath_aln, size_t count)
 
vector< Alignmentvg::haplotype_consistent_alignments (const multipath_alignment_t &multipath_aln, const haplo::ScoreProvider &score_provider, size_t soft_count, size_t hard_count, bool optimal_first)
 
pair< int64_t, int64_t > vg::aligned_interval (const multipath_alignment_t &multipath_aln)
 The indexes on the read sequence of the portion of the read that is aligned outside of soft clips. More...
 
void vg::rev_comp_multipath_alignment (const multipath_alignment_t &multipath_aln, const function< int64_t(int64_t)> &node_length, multipath_alignment_t &rev_comp_out)
 
void vg::rev_comp_multipath_alignment_in_place (multipath_alignment_t *multipath_aln, const function< int64_t(int64_t)> &node_length)
 
void vg::convert_Us_to_Ts (multipath_alignment_t &multipath_aln)
 Replaces all U's in the sequence and the aligned Paths with T's. More...
 
void vg::convert_Ts_to_Us (multipath_alignment_t &multipath_aln)
 Replaces all T's in the sequence and the aligned Paths with U's. More...
 
void vg::to_proto_multipath_alignment (const multipath_alignment_t &multipath_aln, MultipathAlignment &proto_multipath_aln_out)
 Convert an STL-based multipath_alignment_t to a protobuf MultipathAlignment. More...
 
void vg::from_proto_multipath_alignment (const MultipathAlignment &proto_multipath_aln, multipath_alignment_t &multipath_aln_out)
 Convert a protobuf MultipathAlignment to an STL-based multipath_alignment_t. More...
 
void vg::to_multipath_alignment (const Alignment &aln, multipath_alignment_t &multipath_aln_out)
 
void vg::transfer_read_metadata (const Alignment &from, multipath_alignment_t &to)
 
void vg::transfer_read_metadata (const multipath_alignment_t &from, Alignment &to)
 
void vg::transfer_read_metadata (const multipath_alignment_t &from, multipath_alignment_t &to)
 
void vg::transfer_read_metadata (const Alignment &from, Alignment &to)
 
void vg::transfer_read_metadata (const MultipathAlignment &from, multipath_alignment_t &to)
 
void vg::transfer_read_metadata (const multipath_alignment_t &from, MultipathAlignment &to)
 
void vg::transfer_proto_metadata (const Alignment &from, MultipathAlignment &to)
 
void vg::transfer_proto_metadata (const MultipathAlignment &from, Alignment &to)
 
void vg::merge_non_branching_subpaths (multipath_alignment_t &multipath_aln, const unordered_set< size_t > *prohibited_merges)
 
void vg::remove_empty_alignment_sections (multipath_alignment_t &multipath_aln)
 
void vg::remove_low_scoring_sections (multipath_alignment_t &multipath_aln, int32_t max_score_diff)
 
size_t vg::num_connected_components (const multipath_alignment_t &multipath_aln)
 Returns the number of connected components in the multipath alignment. More...
 
vector< vector< int64_t > > vg::connected_components (const multipath_alignment_t &multipath_aln)
 
void vg::extract_sub_multipath_alignment (const multipath_alignment_t &multipath_aln, const vector< int64_t > &subpath_indexes, multipath_alignment_t &sub_multipath_aln)
 
void vg::append_multipath_alignment (multipath_alignment_t &multipath_aln, const multipath_alignment_t &to_append)
 Add the subpaths of one multipath alignment onto another. More...
 
bool vg::contains_connection (const multipath_alignment_t &multipath_aln)
 Returns true if any subpath has a connection adjacency. More...
 
vector< tuple< int64_t, int64_t, int64_t, int64_t > > vg::search_multipath_alignment (const multipath_alignment_t &multipath_aln, const pos_t &graph_pos, int64_t seq_pos)
 
pair< tuple< int64_t, int64_t, int64_t >, vector< tuple< int64_t, int64_t, int64_t, int64_t > > > vg::trace_path (const multipath_alignment_t &multipath_aln, const Path &path, int64_t subpath_idx, int64_t mapping_idx, int64_t edit_idx, int64_t base_idx, bool search_left, int64_t search_limit)
 
bool vg::contains_match (const multipath_alignment_t &multipath_aln, const pos_t &pos, int64_t read_pos, int64_t match_length)
 
vector< pair< int, char > > vg::cigar_against_path (const multipath_alignment_t &multipath_aln, const string &path_name, bool rev, int64_t path_pos, const PathPositionHandleGraph &graph, int64_t min_splice_length)
 
bool vg::validate_multipath_alignment (const multipath_alignment_t &multipath_aln, const HandleGraph &handle_graph)
 
void vg::view_multipath_alignment (ostream &out, const multipath_alignment_t &multipath_aln, const HandleGraph &handle_graph)
 Send a formatted string representation of the multipath_alignment_t into the ostream. More...
 
void vg::view_multipath_alignment_as_dot (ostream &out, const multipath_alignment_t &multipath_aln, bool show_graph=false)
 Converts a multipath_alignment_t to a GraphViz Dot representation, output to the given ostream. More...
 
string vg::make_shuffle_seed (const multipath_alignment_t &aln)
 Define seed generation for shuffling multipath alignments. More...
 

Detailed Description

utility functions for the multipath_alignment_t object