vg
tools for working with variation graphs
Public Member Functions | Private Member Functions | Private Attributes | List of all members
vg::Homogenizer Class Reference

#include <homogenizer.hpp>

Public Member Functions

void homogenize (vg::VG *graph, PathPositionHandleGraph *path_graph, gcsa::GCSA *gcsa_index, gcsa::LCPArray *lcp_index, Paths p, int kmer_size)
 
void homogenize (vg::VG *graph, PathPositionHandleGraph *path_graph, gcsa::GCSA *gcsa_index, gcsa::LCPArray *lcp_index, vg::Index reads_index)
 

Private Member Functions

vector< vg::id_tfind_tips (vg::VG *graph)
 
vector< vg::id_tfind_non_ref_tips (vg::VG *graph)
 
int remap (vector< Alignment > reads, vg::VG graph)
 
void cut_tips (vg::VG *graph)
 
void cut_tips (vector< id_t > tip_ids, vg::VG *graph)
 
void cut_nonref_tips (vg::VG *graph)
 

Private Attributes

Translator translator
 

Member Function Documentation

◆ cut_nonref_tips()

void Homogenizer::cut_nonref_tips ( vg::VG graph)
private

Remove non-reference tips from the graph.

◆ cut_tips() [1/2]

void Homogenizer::cut_tips ( vector< id_t tip_ids,
vg::VG graph 
)
private

Remove specific nodes and their edges from the graph

◆ cut_tips() [2/2]

void Homogenizer::cut_tips ( vg::VG graph)
private

Remove all tips from the graph. WARNING: may cut head/tail nodes.

◆ find_non_ref_tips()

vector< vg::id_t > Homogenizer::find_non_ref_tips ( vg::VG graph)
private

Find non-ref tips

◆ find_tips()

vector< vg::id_t > Homogenizer::find_tips ( vg::VG graph)
private

Find tips (nodes with an indegree/outdegree of 0 in the graph

◆ homogenize() [1/2]

void Homogenizer::homogenize ( vg::VG graph,
PathPositionHandleGraph path_graph,
gcsa::GCSA *  gcsa_index,
gcsa::LCPArray *  lcp_index,
Paths  p,
int  kmer_size 
)

Locates tips in the graph and tries to generate a single edge / node to represent them. This edge is then added, the offending sequences are remapped, and the process is repeated until the graph becomes stable.

Reindex graph and reset mapper

◆ homogenize() [2/2]

void Homogenizer::homogenize ( vg::VG graph,
PathPositionHandleGraph path_graph,
gcsa::GCSA *  gcsa_index,
gcsa::LCPArray *  lcp_index,
vg::Index  reads_index 
)

Pattern for SV homogenization

  1. Locate SV-indicating reads with Sift. Save them in a gam file
  2. index that gam with index -d dbname -N
  3. Send those reads here - for each possible position Find reads supporting that position Generate candidate edges and nodes Remap reads locally (w/in some subgraph containing the SV) Score it somehow Check the reads again for SV signatures.

◆ remap()

int vg::Homogenizer::remap ( vector< Alignment reads,
vg::VG  graph 
)
private

remap a set of Alignments to the graph

Member Data Documentation

◆ translator

Translator vg::Homogenizer::translator
private

The documentation for this class was generated from the following files: