vg
tools for working with variation graphs
Public Types | Public Member Functions | Public Attributes | List of all members
vg::Haplotypes::Subchain Struct Reference

Representation of a subchain. More...

#include <recombinator.hpp>

Public Types

enum  subchain_t : std::uint64_t { normal = 0, prefix = 1, suffix = 2, full_haplotype = 3 }
 Subchain types. More...
 
typedef gbwtgraph::Key64::value_type kmer_type
 An encoded kmer. More...
 

Public Member Functions

handle_t start_handle () const
 Returns the start node as a GBWTGraph handle. More...
 
handle_t end_handle () const
 Returns the end node as a GBWTGraph handle. More...
 
bool has_start () const
 Returns true if the subchain has a start node. More...
 
bool has_end () const
 Returns true if the subchain has an end node. More...
 
std::string to_string () const
 Returns a string representation of the type and the boundary nodes. More...
 
void simple_sds_serialize (std::ostream &out) const
 Serializes the object to a stream in the simple-sds format. More...
 
void simple_sds_load (std::istream &in)
 Loads the object from a stream in the simple-sds format. More...
 
size_t simple_sds_size () const
 Returns the size of the object in elements. More...
 

Public Attributes

subchain_t type
 The type of this subchain. More...
 
gbwt::node_type start
 Boundary nodes, or gbwt::ENDMARKER if not present. More...
 
gbwt::node_type end
 
std::vector< std::pair< kmer_type, size_t > > kmers
 
std::vector< sequence_typesequences
 Sequences as (GBWT sequence id, offset in the relevant node). More...
 
sdsl::bit_vector kmers_present
 

Detailed Description

Representation of a subchain.

Member Typedef Documentation

◆ kmer_type

typedef gbwtgraph::Key64::value_type vg::Haplotypes::Subchain::kmer_type

An encoded kmer.

Member Enumeration Documentation

◆ subchain_t

Subchain types.

Enumerator
normal 

Normal subchain with two boundary nodes.

prefix 

A prefix with only an end node.

suffix 

A suffix with only a start node.

full_haplotype 

A full haplotype with no boundary nodes.

Member Function Documentation

◆ end_handle()

handle_t vg::Haplotypes::Subchain::end_handle ( ) const
inline

Returns the end node as a GBWTGraph handle.

◆ has_end()

bool vg::Haplotypes::Subchain::has_end ( ) const
inline

Returns true if the subchain has an end node.

◆ has_start()

bool vg::Haplotypes::Subchain::has_start ( ) const
inline

Returns true if the subchain has a start node.

◆ simple_sds_load()

void vg::Haplotypes::Subchain::simple_sds_load ( std::istream &  in)

Loads the object from a stream in the simple-sds format.

◆ simple_sds_serialize()

void vg::Haplotypes::Subchain::simple_sds_serialize ( std::ostream &  out) const

Serializes the object to a stream in the simple-sds format.

◆ simple_sds_size()

size_t vg::Haplotypes::Subchain::simple_sds_size ( ) const

Returns the size of the object in elements.

◆ start_handle()

handle_t vg::Haplotypes::Subchain::start_handle ( ) const
inline

Returns the start node as a GBWTGraph handle.

◆ to_string()

std::string vg::Haplotypes::Subchain::to_string ( ) const

Returns a string representation of the type and the boundary nodes.

Member Data Documentation

◆ end

gbwt::node_type vg::Haplotypes::Subchain::end

◆ kmers

std::vector<std::pair<kmer_type, size_t> > vg::Haplotypes::Subchain::kmers

A vector of distinct kmers. For each kmer, list the kmer itself and the number of haplotypes it appears in.

◆ kmers_present

sdsl::bit_vector vg::Haplotypes::Subchain::kmers_present

◆ sequences

std::vector<sequence_type> vg::Haplotypes::Subchain::sequences

Sequences as (GBWT sequence id, offset in the relevant node).

◆ start

gbwt::node_type vg::Haplotypes::Subchain::start

Boundary nodes, or gbwt::ENDMARKER if not present.

◆ type

subchain_t vg::Haplotypes::Subchain::type

The type of this subchain.


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