INGOR
|
The TXT network file format consisting of parent-child pair edge list. More...
#include <ytTXT.h>
Public Member Functions | |
void | ytTXT_write (FILE *fp, const ytNetwork *network, const ytKeyValues *args) |
Writes a network in parent child list text format. | |
ytNetwork * | ytTXT_read (FILE *fp, const ytKeyValues *args) |
Reads a network file written in TXT format. | |
The TXT network file format consisting of parent-child pair edge list.
This format is a tab-delimited text file where each row represents a single edge.
Parent
Parent node name.
Child
Child node name.
id
Edge index. The index origin can be changed by the argument. By default, the index begins with 1 (one). This is for processing the file by the R script.
parent.id
Parent node id.
child.id
Child node id.
name
(OPTIONAL) "Parent_
Child" style edge name where Parent and Child represent the names of the parent and the child of the edge, respectively. This is enabled when "name
" option is set when outputting. The binding character can be changed see ytTXT_write() for details.
NOTE: The default binding character was changed to "_
" (underscore) from "-
" (hyphen-minus) since rel. 0.9.0.
In addition to the above columns, edge properties are also written in separate columns.
The node properties are written in a column parent.*
and child.*
where "*
" represents the original node property name.
If npropc
is specified when writing, the same property of the parent and child nodes are written in a single column node.*
, and values are concatinated by "|
" (vertical bar) in the following rows.
ytNetwork * ytTXT_read | ( | FILE * | fp, |
const ytKeyValues * | args | ||
) |
Reads a network file written in TXT format.
skip=
n (default: n =0
) header=
( on
| off
) (default: on
) skip
arguments for account. That is, the header row comes after ignoring the specified lines. type={
col_name =
type,
...}
use_index
void ytTXT_write | ( | FILE * | fp, |
const ytNetwork * | network, | ||
const ytKeyValues * | args | ||
) |
Writes a network in parent child list text format.
header=
( on
| off
) on
) origin=
i id
, parent.id
, and child.id
. (default: i =1
) full
NA
" is set to its child. npropc
node.*
where "*
" represents the node property name. na=
str (default: "" (empty string)) name
name
" column which shows "Parent_
Child" style names of edges, where Parent and Child represents the names of the parent and child of the edge, respectively. The binding character ("_
" by default) can be changed by the binder
argument. binder=
str name
" column. "_
" (underscore) is used by default. fp | |
network | |
args |