vg
tools for working with variation graphs
Loading...
Searching...
No Matches
recombinator.cpp File Reference
#include "recombinator.hpp"
#include "gref.hpp"
#include "kff.hpp"
#include "statistics.hpp"
#include "algorithms/component.hpp"
#include "algorithms/extract_subchain.hpp"
#include <algorithm>
#include <cmath>
#include <map>

Classes

struct  vg::FragmentedHaplotypeVisit
struct  vg::RecombinatorHaplotype
struct  vg::RecombinatorFragment

Namespaces

namespace  vg

Functions

std::string vg::to_string (handle_t handle)
bool vg::is_gref_fragment (const gbwtgraph::GBWTGraph &graph, path_handle_t path)
hash_map< Haplotypes::Subchain::kmer_type, size_t >::iterator vg::find_kmer (hash_map< Haplotypes::Subchain::kmer_type, size_t > &counts, Haplotypes::Subchain::kmer_type kmer, size_t k)
void vg::load_subchain_header (Haplotypes::Subchain &subchain, std::istream &in)
void vg::load_subchain_kmers_present (Haplotypes::Subchain &subchain, std::istream &in)
net_handle_t vg::follow_chain (const SnarlDistanceIndex &distance_index, const gbwtgraph::GBZ &gbz, size_t chain_id, net_handle_t curr)
std::vector< HaplotypePartitioner::sequence_type > vg::get_sequence_visits (handle_t handle, const gbwt::FastLocate &r_index)
std::vector< HaplotypePartitioner::sequence_type > vg::match_visits (handle_t start, handle_t end, const std::vector< HaplotypePartitioner::sequence_type > &from_visits, const std::vector< HaplotypePartitioner::sequence_type > &to_visits, const HaplotypePartitioner &partitioner)
std::vector< std::string > vg::generate_haplotype (gbwt::size_type sequence_id, gbwt::edge_type pos, handle_t end, size_t start_max, size_t end_max, const HaplotypePartitioner &partitioner)
std::vector< HaplotypePartitioner::kmer_type > vg::take_unique_minimizers (const std::vector< std::string > &sequences, const HaplotypePartitioner::minimizer_index_type &minimizer_index)
void vg::present_kmers (const std::vector< std::vector< HaplotypePartitioner::kmer_type > > &sequences, std::vector< HaplotypePartitioner::kmer_type > &all_kmers, sdsl::int_vector< 0 > &kmer_counts, sdsl::bit_vector &kmers_present)
void vg::add_path (const gbwt::GBWT &source, gbwt::size_type path_id, gbwt::GBWTBuilder &builder, gbwtgraph::MetadataBuilder &metadata)
std::vector< PathPiece > vg::clip_path_to_index (const gbwt::vector_type &path, const gbwt::DynamicGBWT &index, const std::function< size_t(gbwt::node_type)> &node_length)
size_t vg::add_gref_fragments (const gbwtgraph::GBZ &gbz, const std::vector< gbwt::size_type > &path_ids, size_t min_length, gbwt::GBWTBuilder &builder, gbwtgraph::MetadataBuilder &metadata)
void vg::validate_recombinator_parameters (const Recombinator::Parameters &parameters)
double vg::get_or_estimate_coverage (const hash_map< Haplotypes::Subchain::kmer_type, size_t > &counts, const Recombinator::Parameters &parameters, Haplotypes::Verbosity verbosity)
std::vector< std::pair< Recombinator::kmer_presence, double > > vg::classify_kmers (const Haplotypes::Subchain &subchain, const hash_map< Haplotypes::Subchain::kmer_type, size_t > &kmer_counts, double coverage, Recombinator::Statistics *statistics, const Recombinator::Parameters &parameters)
std::vector< std::pair< size_t, double > > vg::select_diploid (const gbwtgraph::GBZ &gbz, const Haplotypes::Subchain &subchain, const std::vector< std::pair< size_t, double > > &candidates, const std::vector< std::pair< Recombinator::kmer_presence, double > > &kmer_types, const Recombinator::Parameters &parameters)
std::vector< std::pair< size_t, double > > vg::select_haplotypes (const gbwtgraph::GBZ &gbz, const Haplotypes::Subchain &subchain, const hash_map< Haplotypes::Subchain::kmer_type, size_t > &kmer_counts, double coverage, Recombinator::Statistics *statistics, std::vector< Recombinator::LocalHaplotype > *local_haplotypes, const Recombinator::Parameters &parameters)