proteinortho  6.0.14
Global Functions

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< floattypegenerate_random_vector (const unsigned int size)
 
vector< floattypeget_new_x (vector< floattype > x, vector< unsigned int > &nodes, map< unsigned int, unsigned int > &mapping, bool isWeighted)
 
vector< floattypemakeOrthogonal (vector< floattype > x)
 
vector< floattypenormalize (vector< floattype > x, floattype *length)
 
vector< floattypegetY (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 ()
 

Detailed Description

Function Documentation

◆ BFS()

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

◆ BFS_not_critical()

unsigned int BFS_not_critical ( vector< unsigned int > *  done_withBacktrack,
unsigned int  start_node,
unsigned int  end_node 
)

depricated

◆ calc_group()

floattype calc_group ( vector< unsigned int > &  nodes)

Calculate number of species

◆ clear_edges()

void clear_edges ( vector< unsigned int > &  nodes)

Removes all edges between the given list of protein ids from graph entirely

◆ comparator_pairfloattypeUInt()

bool comparator_pairfloattypeUInt ( const pair< floattype, unsigned int > &  l,
const pair< floattype, unsigned int > &  r 
)

◆ criticalHeuristic()

bool criticalHeuristic ( ConnectedComponent cur_cc)

depricated

◆ generate_random_vector()

vector<floattype> generate_random_vector ( const unsigned int  size)

Generate random vector x of size size

◆ get_new_x()

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

◆ getConnectivity()

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().

◆ getCurrentRSS()

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

◆ getTime()

string getTime ( void  )

gets the current unix time

◆ getY()

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

◆ makeOrthogonal()

vector<floattype> makeOrthogonal ( vector< floattype x)

Make vector x orthogonal to 1, Formula (2) – openMP A ML

◆ max_of_diag()

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<floattype> normalize ( vector< floattype x,
floattype length 
)

Normalize vector x, Formula (4) – openMP A ML

◆ numberOfNodesToMemoryUsageLaplacian_inKB()

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)

◆ parse_file()

void parse_file ( string  file)

Parses the given file and inserts the information into the variable 'graph'

◆ partition_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()

◆ print_group()

void print_group ( vector< unsigned int > &  nodes,
floattype  connectivity 
)

Group formatting for output

◆ print_header()

void print_header ( )

Print header with species names

◆ printHelp()

void printHelp ( )

Auxiliary function that prints the -help

◆ remove_edge_index()

void remove_edge_index ( const unsigned int  node_id,
const unsigned int  index 
)

Remove edge in a single direction given an index – openMP safe

◆ removeExternalEdges()

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)

◆ sort_species()

void sort_species ( void  )

Sort vector of species (variable 'species')

◆ splitGroups()

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.

◆ stats()

void stats ( floattype  i,
floattype  size 
)

Progress stats

◆ string2floattype()

floattype string2floattype ( string  str)

Convert string to floattype (float or double)

◆ sumOutDegs()

unsigned int sumOutDegs ( const vector< unsigned int > &  nodes)

depricated

◆ test__generate_random_vector()

bool test__generate_random_vector ( )

◆ test__get_new_x()

bool test__get_new_x ( )

◆ test__getY()

bool test__getY ( )

Test getY()

◆ test__makeOrthogonal()

bool test__makeOrthogonal ( )

◆ test__max_of_diag()

bool test__max_of_diag ( )

◆ test__normalize()

bool test__normalize ( )

◆ test__splitGroups()

bool test__splitGroups ( )

◆ tokenize()

void tokenize ( const string &  str,
vector< string > &  tokens,
const string &  delimiters = "\t" 
)

Split a string at a certain or multiple delimiters 'delimiters'