proteinortho
6.0.14
|
Functions | |
ConnectedComponent | BFS (vector< bool > *done, unsigned int cur_node) size_t getPeakRSS() |
size_t | getCurrentRSS () |
void | printHelp () |
unsigned int | numberOfNodesToMemoryUsageLaplacian_inKB (unsigned int n) |
unsigned int | BFS_not_critical (vector< unsigned int > *done_withBacktrack, unsigned int start_node, unsigned int end_node) |
bool | criticalHeuristic (ConnectedComponent *cur_cc) |
void | partition_graph () |
void | clear_edges (vector< unsigned int > &nodes) |
void | removeExternalEdges (map< unsigned int, bool > &a) |
void | remove_edge_index (const unsigned int node_id, const unsigned int index) |
void | parse_file (string file) |
void | sort_species (void) |
void | stats (floattype i, floattype size) |
void | print_header () |
void | print_group (vector< unsigned int > &nodes, floattype connectivity) |
floattype | calc_group (vector< unsigned int > &nodes) |
floattype | string2floattype (string str) |
void | tokenize (const string &str, vector< string > &tokens, const string &delimiters="\t") |
unsigned int | max_of_diag (vector< unsigned int > &nodes, vector< unsigned int > &diag) |
vector< floattype > | generate_random_vector (const unsigned int size) |
vector< floattype > | get_new_x (vector< floattype > x, vector< unsigned int > &nodes, map< unsigned int, unsigned int > &mapping, bool isWeighted) |
vector< floattype > | makeOrthogonal (vector< floattype > x) |
vector< floattype > | normalize (vector< floattype > x, floattype *length) |
vector< floattype > | getY (floattype max_degree, vector< floattype > x_hat, vector< floattype > x_new, vector< unsigned int > &nodes, vector< unsigned int > &diag) |
unsigned int | sumOutDegs (const vector< unsigned int > &nodes) |
floattype | getConnectivity (vector< unsigned int > &nodes, bool useLapack) |
bool | comparator_pairfloattypeUInt (const pair< floattype, unsigned int > &l, const pair< floattype, unsigned int > &r) |
void | splitGroups (vector< floattype > &y, vector< unsigned int > &nodes, bool useLapack) |
string | getTime (void) |
bool | test__max_of_diag () |
bool | test__generate_random_vector () |
bool | test__get_new_x () |
bool | test__makeOrthogonal () |
bool | test__normalize () |
bool | test__getY () |
bool | test__splitGroups () |
ConnectedComponent BFS | ( | vector< bool > * | done, |
unsigned int | cur_node | ||
) |
standard breadth-first search (BFS) Returns the peak (maximum so far) resident set size (physical memory use) measured in bytes, or zero if the value cannot be determined on this OS. https://github.com/mapbox/mapbox-gl-native/blob/master/test/src/mbgl/test/getrss.cpp
unsigned int BFS_not_critical | ( | vector< unsigned int > * | done_withBacktrack, |
unsigned int | start_node, | ||
unsigned int | end_node | ||
) |
depricated
floattype calc_group | ( | vector< unsigned int > & | nodes | ) |
Calculate number of species
void clear_edges | ( | vector< unsigned int > & | nodes | ) |
Removes all edges between the given list of protein ids from graph entirely
bool comparator_pairfloattypeUInt | ( | const pair< floattype, unsigned int > & | l, |
const pair< floattype, unsigned int > & | r | ||
) |
bool criticalHeuristic | ( | ConnectedComponent * | cur_cc | ) |
depricated
vector<floattype> generate_random_vector | ( | const unsigned int | size | ) |
Generate random vector x of size size
vector<floattype> get_new_x | ( | vector< floattype > | x, |
vector< unsigned int > & | nodes, | ||
map< unsigned int, unsigned int > & | mapping, | ||
bool | isWeighted | ||
) |
determine new X, Formula (1) – openMP B ML
floattype getConnectivity | ( | vector< unsigned int > & | nodes, |
bool | useLapack | ||
) |
The main function for calculating the algebraic connectivity. If useLapack is true, the the lapack function is used (otherwise power iteration is used) If the algebraic connectivity is less than the given threshold then the given connected component is split directly (thus no fiedler vector is returned) The split is done in splitGroups().
size_t getCurrentRSS | ( | ) |
Returns the current resident set size (physical memory use) measured in bytes, or zero if the value cannot be determined on this OS. https://github.com/mapbox/mapbox-gl-native/blob/master/test/src/mbgl/test/getrss.cpp
string getTime | ( | void | ) |
gets the current unix time
vector<floattype> getY | ( | floattype | max_degree, |
vector< floattype > | x_hat, | ||
vector< floattype > | x_new, | ||
vector< unsigned int > & | nodes, | ||
vector< unsigned int > & | diag | ||
) |
Qx, Formula (5) – openMP A ML
Make vector x orthogonal to 1, Formula (2) – openMP A ML
unsigned int max_of_diag | ( | vector< unsigned int > & | nodes, |
vector< unsigned int > & | diag | ||
) |
Returns maximum degree of given protein_ids – openMP A ML
Normalize vector x, Formula (4) – openMP A ML
unsigned int numberOfNodesToMemoryUsageLaplacian_inKB | ( | unsigned int | n | ) |
Estimates the memory usage for construction of the quadratic adjacency matrix in KB (the adjacency matrix is used by LAPACK)
void parse_file | ( | string | file | ) |
Parses the given file and inserts the information into the variable 'graph'
void partition_graph | ( | ) |
Major partioning algorithm. First all connected components are identified using the BFS algorithm (see function BFS()). Then it iterates over all connected components and calculates the algebraic connectivity (either using LAPACK dsyevr or the power iteration) using different multithreading systems. The algebraic connectivity is calculated in getConnectivity(). If the algebraic connectivity of a connected component is less than the minimum threshold (param_con_threshold) then the connected component is split into 2 (or more). Connected component are split in getConnectivity() > splitGroups() > removeExternalEdges()
void print_group | ( | vector< unsigned int > & | nodes, |
floattype | connectivity | ||
) |
Group formatting for output
void print_header | ( | ) |
Print header with species names
void printHelp | ( | ) |
Auxiliary function that prints the -help
void remove_edge_index | ( | const unsigned int | node_id, |
const unsigned int | index | ||
) |
Remove edge in a single direction given an index – openMP safe
void removeExternalEdges | ( | map< unsigned int, bool > & | a | ) |
Remove edges that go beyond the given group groups a, works in a single direction, no overlap in parallel runs if lists are without overlap. This is used for perfoming a cut between groups based on the fiedler vector in partition_graph(). map<unsigned int,bool> : maps the node id of a connected component to the split group id (e.g. nodes=[1,5,10]. Splitting 1,5 from 10 : 1=>0, 5=>0, 10=>1)
void sort_species | ( | void | ) |
Sort vector of species (variable 'species')
void splitGroups | ( | vector< floattype > & | y, |
vector< unsigned int > & | nodes, | ||
bool | useLapack | ||
) |
Split connected component according to eigenvector (given in y) – openMP B ML Removes all edges between positive, negative and around zero entries of the eigenvector y The around zero is defined with param_sep_purity. If the requirements of the kmere-heuristic are satisfied, then the connected component is split in more groups: The number of new groups is defined by = number of nodes / ( kmereHeuristic_protPerSpecies * number of species ) The eigenvector y is clustered in k groups by the maginitute of the entries. Then the connected component is split accordingly.
floattype string2floattype | ( | string | str | ) |
Convert string to floattype (float or double)
unsigned int sumOutDegs | ( | const vector< unsigned int > & | nodes | ) |
depricated
bool test__generate_random_vector | ( | ) |
bool test__get_new_x | ( | ) |
Test get_new_x()
bool test__getY | ( | ) |
Test getY()
bool test__makeOrthogonal | ( | ) |
Test makeOrthogonal()
bool test__max_of_diag | ( | ) |
Test max_of_diag()
bool test__normalize | ( | ) |
Test normalize()
bool test__splitGroups | ( | ) |
Test splitGroups()
void tokenize | ( | const string & | str, |
vector< string > & | tokens, | ||
const string & | delimiters = "\t" |
||
) |
Split a string at a certain or multiple delimiters 'delimiters'