vg
tools for working with variation graphs
|
Public Member Functions | |
SnarlRecord & | operator= (const Snarl &other) |
Allow assignment from a Snarl object, fluffing it up into a full SnarlRecord. More... | |
Public Attributes | |
vector< const Snarl * > | children |
deque< Chain > | child_chains |
This holds chains over the child snarls. More... | |
const Snarl * | parent = nullptr |
Chain * | parent_chain = nullptr |
This points to the chain we are in, or null if we are not in a chain. More... | |
size_t | parent_chain_index = 0 |
And this is what index we are at in the chain;. More... | |
![]() | |
SnarlType | type = 1 |
What type of snarl is this? More... | |
Visit | start = 2 |
Visits that connect the Snarl to the rest of the graph. More... | |
Visit | end = 3 |
Snarl | parent = 4 |
string | name = 5 |
Allows snarls to be named, e.g. by the hash of the VCF variant they come from. More... | |
bool | start_self_reachable = 6 |
bool | end_self_reachable = 7 |
bool | start_end_reachable = 8 |
Indicate whether the start of the Snarl is connected through to the end. More... | |
bool | directed_acyclic_net_graph = 9 |
Indicate whether the snarl's net graph is free of directed cycles. More... | |
To support the Snarl*-driven API, we use a struct that lays out a snarl followed by indexing metadata, one after the other in memory. We can just cast a Snarl* to a pointer to one of these to get access to all the metadata.
|
inline |
Allow assignment from a Snarl object, fluffing it up into a full SnarlRecord.
deque<Chain> vg::SnarlManager::SnarlRecord::child_chains |
This holds chains over the child snarls.
vector<const Snarl*> vg::SnarlManager::SnarlRecord::children |
This is a vector of pointers into the master snarl container at children. We know the pointers are to valid SnarlRecords. A SnarlRecord does not own its children.
const Snarl* vg::SnarlManager::SnarlRecord::parent = nullptr |
This points to the parent SnarlRecord (as a snarl), or null if we are a root snarl or have not been told of our parent yet.
Chain* vg::SnarlManager::SnarlRecord::parent_chain = nullptr |
This points to the chain we are in, or null if we are not in a chain.
size_t vg::SnarlManager::SnarlRecord::parent_chain_index = 0 |
And this is what index we are at in the chain;.