vg
tools for working with variation graphs
Classes | Namespaces | Functions
multipath_alignment.cpp File Reference
#include "multipath_alignment.hpp"
#include "haplotypes.hpp"
#include <structures/immutable_list.hpp>
#include <structures/min_max_heap.hpp>
#include <type_traits>

Classes

struct  vg::MultipathProblem
 

Namespaces

 vg
 

Functions

vector< size_t > vg::subpath_topological_order (const multipath_alignment_t &multipath_aln, bool do_index)
 Return either the vector of topological order by index or the vector of indexes within the topological order. More...
 
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::remove_empty_alignment_sections (multipath_alignment_t &multipath_aln)
 
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...
 
tuple< MultipathProblem, int64_t, int32_t > vg::run_multipath_dp (const multipath_alignment_t &multipath_aln, bool subpath_global=false, bool forward=true)
 
template<typename TracebackIterator >
void vg::populate_path_from_traceback (const multipath_alignment_t &multipath_aln, const MultipathProblem &problem, TracebackIterator traceback_start, TracebackIterator traceback_end, Path *output)
 
int32_t vg::optimal_alignment_internal (const multipath_alignment_t &multipath_aln, Alignment *aln_out, bool subpath_global)
 
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)
 
void vg::remove_low_scoring_sections (multipath_alignment_t &multipath_aln, int32_t max_score_diff)
 
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_subpath (const subpath_t &subpath, const function< int64_t(int64_t)> &node_length, subpath_t &rev_comp_out)
 
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_multipath_alignment_char (multipath_alignment_t &multipath_aln, char from, char to)
 
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...
 
template<class ProtoAlignment >
void vg::transfer_from_proto_annotation (const ProtoAlignment &from, multipath_alignment_t &to)
 
template<class ProtoAlignment >
void vg::transfer_to_proto_annotation (const multipath_alignment_t &from, ProtoAlignment &to)
 
template<class ProtoAlignment1 , class ProtoAlignment2 >
void vg::transfer_between_proto_annotation (const ProtoAlignment1 &from, ProtoAlignment2 &to)
 
template<class Alignment1 , class Alignment2 >
void vg::transfer_uniform_metadata (const Alignment1 &from, Alignment2 &to)
 
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 MultipathAlignment &from, multipath_alignment_t &to)
 
void vg::transfer_read_metadata (const multipath_alignment_t &from, MultipathAlignment &to)
 
void vg::transfer_read_metadata (const multipath_alignment_t &from, multipath_alignment_t &to)
 
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 Alignment &from, Alignment &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::connected_comps_do (const multipath_alignment_t &multipath_aln, function< void(void)> &on_new_component, function< void(size_t)> &on_new_node)
 
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::debug_string (const connection_t &connection)
 
string vg::debug_string (const subpath_t &subpath)
 
string vg::debug_string (const multipath_alignment_t &multipath_aln)