|
vg
tools for working with variation graphs
|
#include <cluster.hpp>
Public Member Functions | |
| HitGraph (const vector< MaximalExactMatch > &mems, const Alignment &alignment, const GSSWAligner *aligner, size_t min_mem_length=1, bool track_components=false, const match_fanouts_t *fanouts=nullptr) | |
| Initializes nodes in the hit graph, but does not add edges. | |
| void | add_edge (size_t from, size_t to, int32_t weight, int64_t distance) |
| Add an edge. | |
| vector< cluster_t > | clusters (const Alignment &alignment, const GSSWAligner *aligner, int32_t max_qual_score, int32_t log_likelihood_approx_factor, size_t min_median_mem_coverage_for_split, double suboptimal_edge_pruning_factor, double cluster_multiplicity_diff) |
| Returns the top scoring connected components. | |
Public Attributes | |
| vector< HitNode > | nodes |
Private Member Functions | |
| void | connected_components (vector< vector< size_t > > &components_out) const |
| Identify weakly connected components in the graph. | |
| void | prune_low_scoring_edges (vector< vector< size_t > > &components, size_t component_idx, double score_factor) |
| void | perform_dp () |
| Perform dynamic programming and store scores in nodes. | |
| void | identify_sources_and_sinks (vector< size_t > &sources_out, vector< size_t > &sinks_out) const |
| Fills input vectors with indices of source and sink nodes. | |
| void | topological_order (vector< size_t > &order_out) const |
| Fills the input vector with the indices of a topological sort. | |
| void | component_topological_order (const vector< size_t > &component, vector< size_t > &order_out) const |
| Computes the topological order of. | |
| size_t | median_mem_coverage (const vector< size_t > &component, const Alignment &aln) const |
Private Attributes | |
| bool | track_components |
| Should we actively keep track of connected components? | |
| UnionFind | components |
| Keeps track of the connected components. | |
| vg::MEMClusterer::HitGraph::HitGraph | ( | const vector< MaximalExactMatch > & | mems, |
| const Alignment & | alignment, | ||
| const GSSWAligner * | aligner, | ||
| size_t | min_mem_length = 1, | ||
| bool | track_components = false, | ||
| const match_fanouts_t * | fanouts = nullptr ) |
Initializes nodes in the hit graph, but does not add edges.
| void vg::MEMClusterer::HitGraph::add_edge | ( | size_t | from, |
| size_t | to, | ||
| int32_t | weight, | ||
| int64_t | distance ) |
Add an edge.
| vector< MEMClusterer::cluster_t > vg::MEMClusterer::HitGraph::clusters | ( | const Alignment & | alignment, |
| const GSSWAligner * | aligner, | ||
| int32_t | max_qual_score, | ||
| int32_t | log_likelihood_approx_factor, | ||
| size_t | min_median_mem_coverage_for_split, | ||
| double | suboptimal_edge_pruning_factor, | ||
| double | cluster_multiplicity_diff ) |
Returns the top scoring connected components.
|
private |
Computes the topological order of.
|
private |
Identify weakly connected components in the graph.
|
private |
Fills input vectors with indices of source and sink nodes.
|
private |
Returns the median coverage of bases in the reads by bases in the cluster, attempts to remove apparent redundant sub-MEMs
|
private |
Perform dynamic programming and store scores in nodes.
|
private |
Prune edges that are not on any traceback that scores highly compared to the best score in the component, splits up the components (adding some to the end of the vector) if doing so splits a component
|
private |
Fills the input vector with the indices of a topological sort.
|
private |
Keeps track of the connected components.
| vector<HitNode> vg::MEMClusterer::HitGraph::nodes |
|
private |
Should we actively keep track of connected components?
1.17.0