-
Notifications
You must be signed in to change notification settings - Fork 4
File Formats
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
}
You must specify an implementation for every module, and for any modules that have additional parameters, you must specify their respective parameters. The list of module implementations and their respective parameters can be found in modules/FAVITES_ModuleList.json. If you are missing anything in your configuration file, FAVITES will notify you what exactly is missing.
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 file format of the transmission networks that are outputted by FAVITES are in the standard edge list format. Each line represents a single edge via three tab-delimited attributes:
- The label of the node from which this edge leaves
- The label of the node to which this edge goes
- The time at which this transmission event occurred
Below is an example of this file format. Note that <TAB>
is referring to a single tab character (i.e., '\t'
).
Eric<TAB>Bill<TAB>1
Eric<TAB>Curt<TAB>2
Eric<TAB>Curt<TAB>3
Curt<TAB>Bill<TAB>4
Curt<TAB>Bill<TAB>5
Niema Moshiri & Siavash Mirarab 2016