vg
tools for working with variation graphs
Public Member Functions | Private Attributes | List of all members
Vectorizer Class Reference

#include <vectorizer.hpp>

Public Member Functions

 Vectorizer (const PathPositionHandleGraph *x)
 
 ~Vectorizer ()
 
void add_bv (bit_vector v)
 
void add_name (string n)
 
void emit (ostream &out, bool r_format, bool annotate)
 
bit_vector alignment_to_onehot (Alignment a)
 
vector< int > alignment_to_a_hot (Alignment a)
 
vector< double > alignment_to_custom_score (Alignment a, std::function< double(Alignment)> lambda)
 
vector< double > alignment_to_identity_hot (Alignment a)
 
string output_wabbit_map ()
 
template<typename T >
string format (T v)
 
template<typename T >
string wabbitize (string name, T v)
 

Private Attributes

const PathPositionHandleGraphmy_xg
 
unordered_map< vg::id_t, size_t > id_to_rank
 
vector< bit_vector > my_vectors
 
vector< string > my_names
 
bool output_tabbed = false
 
bool output_names = false
 
unordered_map< string, int > wabbit_map
 

Constructor & Destructor Documentation

◆ Vectorizer()

Vectorizer::Vectorizer ( const PathPositionHandleGraph x)

◆ ~Vectorizer()

Vectorizer::~Vectorizer ( )

Member Function Documentation

◆ add_bv()

void Vectorizer::add_bv ( bit_vector  v)

◆ add_name()

void Vectorizer::add_name ( string  n)

◆ alignment_to_a_hot()

vector< int > Vectorizer::alignment_to_a_hot ( Alignment  a)

◆ alignment_to_custom_score()

vector< double > Vectorizer::alignment_to_custom_score ( Alignment  a,
std::function< double(Alignment)>  lambda 
)

◆ alignment_to_identity_hot()

vector< double > Vectorizer::alignment_to_identity_hot ( Alignment  a)

◆ alignment_to_onehot()

bit_vector Vectorizer::alignment_to_onehot ( Alignment  a)

◆ emit()

void Vectorizer::emit ( ostream &  out,
bool  r_format = false,
bool  annotate = false 
)

TODO print header

◆ format()

template<typename T >
string Vectorizer::format ( v)
inline

◆ output_wabbit_map()

string Vectorizer::output_wabbit_map ( )

◆ wabbitize()

template<typename T >
string Vectorizer::wabbitize ( string  name,
v 
)
inline

Member Data Documentation

◆ id_to_rank

unordered_map<vg::id_t, size_t> Vectorizer::id_to_rank
private

◆ my_names

vector<string> Vectorizer::my_names
private

◆ my_vectors

vector<bit_vector> Vectorizer::my_vectors
private

◆ my_xg

const PathPositionHandleGraph* Vectorizer::my_xg
private

◆ output_names

bool Vectorizer::output_names = false
private

◆ output_tabbed

bool Vectorizer::output_tabbed = false
private

◆ wabbit_map

unordered_map<string, int> Vectorizer::wabbit_map
private

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