vg
tools for working with variation graphs
|
#include <mutable_path_metadata.hpp>
Public Member Functions | |
virtual | ~MutablePathMetadata ()=default |
virtual path_handle_t | create_path (const PathSense &sense, const std::string &sample, const std::string &locus, const size_t &haplotype, const size_t &phase_block, const subrange_t &subrange, bool is_circular=false) |
Public Member Functions inherited from handlegraph::PathMetadata | |
virtual | ~PathMetadata ()=default |
virtual PathSense | get_sense (const path_handle_t &handle) const |
What is the given path meant to be representing? More... | |
virtual std::string | get_sample_name (const path_handle_t &handle) const |
virtual std::string | get_locus_name (const path_handle_t &handle) const |
virtual size_t | get_haplotype (const path_handle_t &handle) const |
virtual size_t | get_phase_block (const path_handle_t &handle) const |
virtual subrange_t | get_subrange (const path_handle_t &handle) const |
template<typename Iteratee > | |
bool | for_each_path_of_sense (const PathSense &sense, const Iteratee &iteratee) const |
template<typename Iteratee > | |
bool | for_each_path_of_sample (const std::string &sample, const Iteratee &iteratee) const |
template<typename Iteratee > | |
bool | for_each_path_matching (const std::unordered_set< PathSense > *senses, const std::unordered_set< std::string > *samples, const std::unordered_set< std::string > *loci, const Iteratee &iteratee) const |
template<typename Iteratee > | |
bool | for_each_path_matching (const std::unordered_set< PathSense > &senses, const std::unordered_set< std::string > &samples, const std::unordered_set< std::string > &loci, const Iteratee &iteratee) const |
template<typename Iteratee > | |
bool | for_each_step_of_sense (const handle_t &visited, const PathSense &sense, const Iteratee &iteratee) const |
Protected Member Functions | |
virtual path_handle_t | create_path_handle (const std::string &name, bool is_circular=false)=0 |
Protected Member Functions inherited from handlegraph::PathMetadata | |
virtual bool | for_each_path_matching_impl (const std::unordered_set< PathSense > *senses, const std::unordered_set< std::string > *samples, const std::unordered_set< std::string > *loci, const std::function< bool(const path_handle_t &)> &iteratee) const |
virtual bool | for_each_step_of_sense_impl (const handle_t &visited, const PathSense &sense, const std::function< bool(const step_handle_t &)> &iteratee) const |
virtual std::string | get_path_name (const path_handle_t &path_handle) const =0 |
Look up the name of a path from a handle to it. More... | |
virtual path_handle_t | get_path_handle_of_step (const step_handle_t &step_handle) const =0 |
Returns a handle to the path that an step is on. More... | |
virtual bool | for_each_path_handle_impl (const std::function< bool(const path_handle_t &)> &iteratee) const =0 |
virtual bool | for_each_step_on_handle_impl (const handle_t &handle, const std::function< bool(const step_handle_t &)> &iteratee) const =0 |
Additional Inherited Members | |
Static Public Member Functions inherited from handlegraph::PathMetadata | |
static PathSense | parse_sense (const std::string &path_name) |
static std::string | parse_sample_name (const std::string &path_name) |
static std::string | parse_locus_name (const std::string &path_name) |
static size_t | parse_haplotype (const std::string &path_name) |
static size_t | parse_phase_block (const std::string &path_name) |
static subrange_t | parse_subrange (const std::string &path_name) |
static void | parse_path_name (const std::string &path_name, PathSense &sense, std::string &sample, std::string &locus, size_t &haplotype, size_t &phase_block, subrange_t &subrange) |
Decompose a formatted path name into metadata. More... | |
static std::string | create_path_name (const PathSense &sense, const std::string &sample, const std::string &locus, const size_t &haplotype, const size_t &phase_block, const subrange_t &subrange) |
Static Public Attributes inherited from handlegraph::PathMetadata | |
static const std::string | NO_SAMPLE_NAME = "" |
static const std::string | NO_LOCUS_NAME = "" |
static const size_t | NO_HAPLOTYPE = std::numeric_limits<size_t>::max() |
static const size_t | NO_PHASE_BLOCK = std::numeric_limits<size_t>::max() |
static const subrange_t | NO_SUBRANGE {PathMetadata::NO_END_POSITION, PathMetadata::NO_END_POSITION} |
static const offset_t | NO_END_POSITION = std::numeric_limits<offset_t>::max() |
This is the interface for mutable embedded path and haplotype thread metadata (see PathMetadata).
Comes with a default implementation of this interface, based on a name-based create_path_handle() and special path name formatting.
|
virtualdefault |
|
virtual |
Add a path with the given metadata. Any item can be the corresponding unset sentinel (PathMetadata::NO_LOCUS_NAME, PathMetadata::NO_PHASE_BLOCK, etc.).
Implementations may refuse to store paths-or-threads of certain senses when relevant fields are unset.
Handles to other paths must remain valid.
|
protectedpure virtual |
Create a path with the given name. The caller must ensure that no path with the given name exists already, or the behavior is undefined. Returns a handle to the created empty path. Handles to other paths must remain valid.
Implemented in handlegraph::MutablePathHandleGraph.