Representation of a subchain.
More...
#include <recombinator.hpp>
Representation of a subchain.
◆ kmer_type
◆ 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.
|
◆ badness()
double vg::Haplotypes::Subchain::badness |
( |
const gbwtgraph::GBZ & |
gbz | ) |
const |
Returns an estimate of the badness of the subchain. The ideal value is 0.0, and higher values indicate worse subchains. The estimate is based on the following factors:
- Length of the subchain.
- Number of haplotypes relative to the expected number.
- Information content of the kmers (disabled).
◆ distance()
size_t vg::Haplotypes::Subchain::distance |
( |
const gbwtgraph::GBZ & |
gbz, |
|
|
size_t |
i |
|
) |
| const |
Returns the distance from the last base of start
to the first base of end
over the given sequence. Returns 0 if the subchain is not normal or if the sequence does not exist.
◆ end_handle()
handle_t vg::Haplotypes::Subchain::end_handle |
( |
| ) |
const |
|
inline |
Returns the end node as a GBWTGraph handle.
◆ get_sequence()
sequence_type vg::Haplotypes::Subchain::get_sequence |
( |
size_t |
i | ) |
const |
|
inline |
Returns (sequence identifier, offset in a node) for the given sequence.
◆ 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.
◆ load_v1()
void vg::Haplotypes::Subchain::load_v1 |
( |
std::istream & |
in | ) |
|
Loads a less space-efficient version 1 or 2 subchain.
◆ 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.
◆ end
gbwt::node_type vg::Haplotypes::Subchain::end |
◆ kmer_counts
sdsl::int_vector<0> vg::Haplotypes::Subchain::kmer_counts |
Number of haplotypes each kmer appears in.
◆ kmers
std::vector<kmer_type> 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 |
A bit vector marking the presence of kmers in the sequences. Sequence i
contains kmer j
if and only if kmers_present[i * kmers.size() + j] == 1
.
◆ 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
The type of this subchain.
The documentation for this struct was generated from the following files: