vg
tools for working with variation graphs
Public Member Functions | Public Attributes | List of all members
vg::algorithms::GFAzPathDecoder Struct Reference

Public Member Functions

size_t node_count () const
 
void expand_rule (uint32_t rule_id, bool reverse, uint32_t max_id, vector< NodeId > &out) const
 
vector< NodeId > decode_sequence_at_index (size_t index, int delta_round) const
 
void for_each_rgfa_visit (int64_t max_rgfa_rank, const function< void(nid_t, int64_t, size_t, const string &, int64_t)> &callback) const
 

Public Attributes

vector< size_t > node_lengths
 
vector< OptionalFieldColumn > segment_optional_fields
 
std::pair< vector< int32_t >, vector< int32_t > > rules
 
vector< int32_t > paths_flat
 
vector< int32_t > walks_flat
 
SequenceOffsets path_offsets
 
SequenceOffsets walk_offsets
 
SequenceOffsets original_path_offsets
 
SequenceOffsets original_walk_offsets
 
vector< string > path_names
 
vector< string > walk_sample_ids
 
vector< uint32_t > walk_hap_indices
 
vector< string > walk_seq_ids
 
vector< int64_t > walk_seq_starts
 
vector< int64_t > walk_seq_ends
 
uint32_t min_rule_id = 0
 

Detailed Description

Class which manages decoding GFAz path information.

Contains information needed to generate the rGFA visits (which includes node length information and tags), and information used to store and decode the path compression rules.

Also used to hold that information during the main decode process. TODO: Split that responsibility out?

Member Function Documentation

◆ decode_sequence_at_index()

vector< NodeId > vg::algorithms::GFAzPathDecoder::decode_sequence_at_index ( size_t  index,
int  delta_round 
) const

Decode a sequence of visited node IDs.

◆ expand_rule()

void vg::algorithms::GFAzPathDecoder::expand_rule ( uint32_t  rule_id,
bool  reverse,
uint32_t  max_id,
vector< NodeId > &  out 
) const

Expand a rule for encoded visited node IDs.

◆ for_each_rgfa_visit()

void vg::algorithms::GFAzPathDecoder::for_each_rgfa_visit ( int64_t  max_rgfa_rank,
const function< void(nid_t, int64_t, size_t, const string &, int64_t)> &  callback 
) const

Call the callback with rGFA path visits, in order along each path, for rGFA paths a the given rank and below.

This represents a visit along an rGFA path, so they can be sorted by offset.

This represents an rGFA path.

Rank of the rGFA path, or -1 for unset.

◆ node_count()

size_t vg::algorithms::GFAzPathDecoder::node_count ( ) const
inline

Get the number of nodes in the graph.

Member Data Documentation

◆ min_rule_id

uint32_t vg::algorithms::GFAzPathDecoder::min_rule_id = 0

◆ node_lengths

vector<size_t> vg::algorithms::GFAzPathDecoder::node_lengths

Holds the length of each graph node, by 1-based ID. TODO: This wastes space at index 0.

◆ original_path_offsets

SequenceOffsets vg::algorithms::GFAzPathDecoder::original_path_offsets

◆ original_walk_offsets

SequenceOffsets vg::algorithms::GFAzPathDecoder::original_walk_offsets

◆ path_names

vector<string> vg::algorithms::GFAzPathDecoder::path_names

◆ path_offsets

SequenceOffsets vg::algorithms::GFAzPathDecoder::path_offsets

◆ paths_flat

vector<int32_t> vg::algorithms::GFAzPathDecoder::paths_flat

◆ rules

std::pair<vector<int32_t>, vector<int32_t> > vg::algorithms::GFAzPathDecoder::rules

◆ segment_optional_fields

vector<OptionalFieldColumn> vg::algorithms::GFAzPathDecoder::segment_optional_fields

◆ walk_hap_indices

vector<uint32_t> vg::algorithms::GFAzPathDecoder::walk_hap_indices

◆ walk_offsets

SequenceOffsets vg::algorithms::GFAzPathDecoder::walk_offsets

◆ walk_sample_ids

vector<string> vg::algorithms::GFAzPathDecoder::walk_sample_ids

◆ walk_seq_ends

vector<int64_t> vg::algorithms::GFAzPathDecoder::walk_seq_ends

◆ walk_seq_ids

vector<string> vg::algorithms::GFAzPathDecoder::walk_seq_ids

◆ walk_seq_starts

vector<int64_t> vg::algorithms::GFAzPathDecoder::walk_seq_starts

◆ walks_flat

vector<int32_t> vg::algorithms::GFAzPathDecoder::walks_flat

The documentation for this struct was generated from the following file: