DP-HLS
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
HostUtils::Sequence Namespace Reference

Functions

int base_to_num (char base)
 Map a single base to a number. A: 0, C: 1, G: 2, T: 3, _: 4. More...
 
char num_to_base (int num)
 
char num_to_aa (int num)
 
int aa_to_num (char aa)
 
template<typename T >
string nav_to_string (T nav)
 
template<typename T , size_t MAX_QRY_LENGTH, size_t MAX_REF_LENGTH>
std::vector< string > ReconstructTracebackProfile (std::vector< string > querys, std::vector< string > references, int query_start_idx, int reference_start_idx, T(&tb_streams)[MAX_REF_LENGTH+MAX_QRY_LENGTH])
 Reconstruct the traceback for profile alignmetnt from the array of traceback navigations. More...
 
std::vector< std::array< int, 5 > > MultipleSequencesToProfileAlign (std::vector< string > seq, int len)
 Given a array of sequences, convert them to the format of the input of profile alignment. More...
 
template<typename T , size_t MAX_QRY_LENGTH, size_t MAX_REF_LENGTH>
std::map< string, string > ReconstructTraceback (string query, string reference, int query_start_idx, int reference_start_idx, T(&tb_streams)[MAX_REF_LENGTH+MAX_QRY_LENGTH])
 Fucntion to reconstruct the alignment result from the an array of traceback navigations. More...
 
template<typename T , size_t MAX_QRY_LENGTH, size_t MAX_REF_LENGTH>
std::map< string, string > ReconstructTracebackSemiglobal (string query, string reference, int query_start_idx, int reference_start_idx, T(&tb_streams)[MAX_REF_LENGTH+MAX_QRY_LENGTH])
 
template<typename T , size_t MAX_QRY_LENGTH, size_t MAX_REF_LENGTH>
std::map< string, string > ReconstructTracebackOverlapSuffixPrefix (string query, string reference, int query_start_idx, int reference_start_idx, T(&tb_streams)[MAX_REF_LENGTH+MAX_QRY_LENGTH])
 
template<typename T , int LEN>
string NavigationToString (T nav[LEN])
 
template<typename T , int NB, int MAX_QRY_LENGTH, int MAX_REF_LENGTH>
array< map< string, string >, NB > ReconstructTracebackBlocks (string query[NB], string reference[NB], int query_start_idx[NB], int reference_start_idx[NB], T(&tb_streams)[NB][MAX_REF_LENGTH+MAX_QRY_LENGTH])
 Function to reconstruct the alignment result from the array of the traceback navigations for all blocks. More...
 
template<typename T , int NB, int MAX_QRY_LENGTH, int MAX_REF_LENGTH>
array< map< string, string >, NB > ReconstructTracebackSemiglobalBlocks (string query[NB], string reference[NB], int query_start_idx[NB], int reference_start_idx[NB], T(&tb_streams)[NB][MAX_REF_LENGTH+MAX_QRY_LENGTH])
 
template<typename T , int NB, int MAX_QRY_LENGTH, int MAX_REF_LENGTH>
array< map< string, string >, NB > ReconstructTracebackOverlapSuffixPrefixBlocks (string query[NB], string reference[NB], int query_start_idx[NB], int reference_start_idx[NB], T(&tb_streams)[NB][MAX_REF_LENGTH+MAX_QRY_LENGTH])
 

Function Documentation

int HostUtils::Sequence::aa_to_num ( char  aa)
int HostUtils::Sequence::base_to_num ( char  base)

Map a single base to a number. A: 0, C: 1, G: 2, T: 3, _: 4.

Parameters
base
Returns
int
std::vector<std::array<int, 5> > HostUtils::Sequence::MultipleSequencesToProfileAlign ( std::vector< string >  seq,
int  len 
)

Given a array of sequences, convert them to the format of the input of profile alignment.

Parameters
seqSequences
lenLength of Sequences
Returns
std::vector<std::array<int, 5>>
template<typename T >
string HostUtils::Sequence::nav_to_string ( nav)
template<typename T , int LEN>
string HostUtils::Sequence::NavigationToString ( nav[LEN])
char HostUtils::Sequence::num_to_aa ( int  num)
char HostUtils::Sequence::num_to_base ( int  num)
template<typename T , size_t MAX_QRY_LENGTH, size_t MAX_REF_LENGTH>
std::map<string, string> HostUtils::Sequence::ReconstructTraceback ( string  query,
string  reference,
int  query_start_idx,
int  reference_start_idx,
T(&)  tb_streams[MAX_REF_LENGTH+MAX_QRY_LENGTH] 
)

Fucntion to reconstruct the alignment result from the an array of traceback navigations.

Template Parameters
T
Parameters
query
reference
template<typename T , int NB, int MAX_QRY_LENGTH, int MAX_REF_LENGTH>
array<map<string, string>, NB> HostUtils::Sequence::ReconstructTracebackBlocks ( string  query[NB],
string  reference[NB],
int  query_start_idx[NB],
int  reference_start_idx[NB],
T(&)  tb_streams[NB][MAX_REF_LENGTH+MAX_QRY_LENGTH] 
)

Function to reconstruct the alignment result from the array of the traceback navigations for all blocks.

Template Parameters
NBNumber of Blocks
Parameters
query
reference
template<typename T , size_t MAX_QRY_LENGTH, size_t MAX_REF_LENGTH>
std::map<string, string> HostUtils::Sequence::ReconstructTracebackOverlapSuffixPrefix ( string  query,
string  reference,
int  query_start_idx,
int  reference_start_idx,
T(&)  tb_streams[MAX_REF_LENGTH+MAX_QRY_LENGTH] 
)
template<typename T , int NB, int MAX_QRY_LENGTH, int MAX_REF_LENGTH>
array<map<string, string>, NB> HostUtils::Sequence::ReconstructTracebackOverlapSuffixPrefixBlocks ( string  query[NB],
string  reference[NB],
int  query_start_idx[NB],
int  reference_start_idx[NB],
T(&)  tb_streams[NB][MAX_REF_LENGTH+MAX_QRY_LENGTH] 
)
template<typename T , size_t MAX_QRY_LENGTH, size_t MAX_REF_LENGTH>
std::vector<string> HostUtils::Sequence::ReconstructTracebackProfile ( std::vector< string >  querys,
std::vector< string >  references,
int  query_start_idx,
int  reference_start_idx,
T(&)  tb_streams[MAX_REF_LENGTH+MAX_QRY_LENGTH] 
)

Reconstruct the traceback for profile alignmetnt from the array of traceback navigations.

Parameters
querys
references
query_start_idx
reference_start_idx
Returns
std::vector<string>
template<typename T , size_t MAX_QRY_LENGTH, size_t MAX_REF_LENGTH>
std::map<string, string> HostUtils::Sequence::ReconstructTracebackSemiglobal ( string  query,
string  reference,
int  query_start_idx,
int  reference_start_idx,
T(&)  tb_streams[MAX_REF_LENGTH+MAX_QRY_LENGTH] 
)
template<typename T , int NB, int MAX_QRY_LENGTH, int MAX_REF_LENGTH>
array<map<string, string>, NB> HostUtils::Sequence::ReconstructTracebackSemiglobalBlocks ( string  query[NB],
string  reference[NB],
int  query_start_idx[NB],
int  reference_start_idx[NB],
T(&)  tb_streams[NB][MAX_REF_LENGTH+MAX_QRY_LENGTH] 
)