|
vg
tools for working with variation graphs
|
#include <index_registry.hpp>
Public Member Functions | |
| IndexingPlan ()=default | |
| ~IndexingPlan ()=default | |
| string | output_filepath (const IndexName &identifier) const |
| Get the suffix with which to save the given index's files. More... | |
| string | output_filepath (const IndexName &identifier, size_t chunk, size_t num_chunks) const |
| const vector< RecipeName > & | get_steps () const |
| Ge the steps of the plan. More... | |
| bool | is_intermediate (const IndexName &identifier) const |
| const map< string, string > | get_scopes (const IndexName &identifier) const |
| const map< string, string > & | get_scopes (const IndexName &identifier) |
| int64_t | target_memory_usage () const |
| The memory limit, with a little slosh for prediction inaccuracy. More... | |
| int64_t | literal_target_memory_usage () const |
| The memory limit with no slosh. More... | |
| set< RecipeName > | dependents (const IndexName &identifier) const |
Protected Member Functions | |
| void | add_scope (const IndexName &identifier, const string &key, const string &value) |
Protected Attributes | |
| vector< RecipeName > | steps |
| set< IndexName > | targets |
| The indexes to create as outputs. More... | |
| map< IndexName, map< string, string > > | scopes |
| IndexRegistry * | registry |
Friends | |
| class | IndexRegistry |
A plan for producing indexes, which knows what should be saved and what should be ephemeral. Wants to be nested inside IndexRegistry, but you can't forward-declare a nested class.
|
default |
|
default |
|
protected |
Add a scope to the scopes the given index will be qualified with when generated, if not present already.
| set< RecipeName > vg::IndexingPlan::dependents | ( | const IndexName & | identifier | ) | const |
Returns the recipes in the plan that depend on this index, including the one in which it was created (if any).
| const map< string, string > & vg::IndexingPlan::get_scopes | ( | const IndexName & | identifier | ) |
Get the scopes that the given index will be qualified with when generated. Only works for indexes that will be generated by the plan, not for inputs.
| const map< string, string > vg::IndexingPlan::get_scopes | ( | const IndexName & | identifier | ) | const |
Get the scopes that the given index will be qualified with when generated. Only works for indexes that will be generated by the plan, not for inputs.
| const vector< RecipeName > & vg::IndexingPlan::get_steps | ( | ) | const |
Ge the steps of the plan.
| bool vg::IndexingPlan::is_intermediate | ( | const IndexName & | identifier | ) | const |
Returns true if the given index is to be intermediate under the given plan, and false if it is to be preserved.
| int64_t vg::IndexingPlan::literal_target_memory_usage | ( | ) | const |
The memory limit with no slosh.
| string vg::IndexingPlan::output_filepath | ( | const IndexName & | identifier | ) | const |
Get the suffix with which to save the given index's files.
| string vg::IndexingPlan::output_filepath | ( | const IndexName & | identifier, |
| size_t | chunk, | ||
| size_t | num_chunks | ||
| ) | const |
Get the suffix with which to save the given index's files.
The path will substitute scopes into any {wildcards} in the index's suffix, and scopes not used in the suffix will appear in the filename in key order.
The suffix used will be the first one for which all wildcards can be substituted.
| int64_t vg::IndexingPlan::target_memory_usage | ( | ) | const |
The memory limit, with a little slosh for prediction inaccuracy.
|
friend |
|
protected |
The registry that the plan is using. The registry must not move while the plan is in use. Can't be const because we need to get_work_dir() on it, which may create the work directory.
|
protected |
The scopes qualifying each index in the plan (for example, if an index applies only to a particular sample, it will be scoped to the sample name). Stored using an ordered map to ensure a consistent iteration order.
|
protected |
The steps to be invoked in the plan. May be empty before the plan is actually planned.
|
protected |
The indexes to create as outputs.
1.9.1