-
Notifications
You must be signed in to change notification settings - Fork 4
File Formats
Niema Moshiri edited this page Dec 9, 2016
·
22 revisions
For robustness to future development, we designed a file format similar to an edge list that must be used for the input Contact Network. The first portion of the file is a list of nodes, and the second portion is a list of edges.
- "Node" lines have three tab-delimited sections:
- NODE (i.e., just the string
NODE
) - This node's label
- Attributes of this node as comma-separated values, or a period (i.e.,
'.'
) if this node has no attributes
- NODE (i.e., just the string
- "Edge" lines have five tab-delimited sections:
- EDGE (i.e., just the string
EDGE
) - The label of the node from which this edge leaves
- The label of the node to which this edge goes
- Attributes of this edge as comma-separated values, or a period (i.e.,
'.'
) if this edge has no attributes -
d
(directed) oru
(undirected) to denote whether or not this edge is directed (i.e.,u -> v
vs.u <-> v
)
- EDGE (i.e., just the string
- Lines beginning with the pound symbol (i.e.,
'#'
) and empty lines are ignored
Below is an example of this file format. Note that <TAB>
is referring to a single tab character (i.e., '\t'
).
#NODE<TAB>label<TAB>attributes (csv or .)
#EDGE<TAB>u<TAB>v<TAB>attributes (csv or .)<TAB>(d)irected or (u)ndirected
NODE<TAB>Bill<TAB>USA,Mexico
NODE<TAB>Eric<TAB>USA
NODE<TAB>Curt<TAB>.
EDGE<TAB>Bill<TAB>Eric<TAB>.<TAB>d
EDGE<TAB>Curt<TAB>Eric<TAB>Friends<TAB>u
The user configuration file format is a JSON file with certain restrictions. Specifically, it must be in the following format:
{
"ContactNetwork": "NetworkX",
"Driver": "Default",
"EndCriteria": "Transmissions",
"NodeEvolution": "Dummy",
"NodeSample": "Perfect",
"PostValidation": "Dummy",
"SeedSelection": "Random",
"SeedSequence": "Random",
"SourceSample": "Dummy",
"TransmissionNodeSample": "Random",
"TransmissionTimeSample": "Fixed",
"TreeNode": "DendroPy",
"contact_network_file": "~/GitHub/FAVITES/test/example_contact_network.txt",
"end_transmissions": 2,
"fixed_transmission_time_delta": 10,
"num_seeds": 1,
"out_dir": "~/FAVITES_output",
"seed_sequence_length": 100
}
Niema Moshiri & Siavash Mirarab 2016