INGOR
|
Structure search algorithm related utility functions. More...
#include <algo/Algo.h>
Public Member Functions | |
ytGraph * | Algo_readGraph (char *file, char *type, ytKeyValues *args, ytData *data, ytGraph *G) |
Reads a graph from a file with respect to the specified data. | |
void | Algo_setNetworkProperties (Score *score, ytNetwork *network, const char *filename) |
Calculates the node and edge properties and sets to the ytNetwork instance. | |
Structure search algorithm related utility functions.
ytGraph * Algo_readGraph | ( | char * | file, |
char * | type, | ||
ytKeyValues * | args, | ||
ytData * | data, | ||
ytGraph * | G | ||
) |
Reads a graph from a file with respect to the specified data.
Node IDs are converted based on the specified data.
Available types and their arguments
parents
col=
n : Column position of the nodes in the TAB separated file. The first column is n=0. no_parents
col=
n : Column position of the nodes in the TAB separated file. The first column is n=0. not_found=restrict
: By default, nodes not found in the read graph are connected to all the other nodes. This is to not restrict edges for nodes not found in the file for generating the constrain file. If this is specified, such edge are not connected. Therefore they are restricted. file | File name to read. |
type | One of parents , no_parents , or arbitrary file format names. See Network File Formats for the avaiable network file formats. |
args | Type specific arguments. |
G | ytGraph instance to merge. NULL acceptable. If specified, the read graph and G are merged and returned. The specified instance will be deleted. |
Calculates the node and edge properties and sets to the ytNetwork instance.
If filename is non-NULL, input data matrix, target data matrix, partial residual matrix, and log likelihood matrix are output into the specified file with suffixes .X
, .Y
, PR.Y
, and LL
.