.json compression application for converting MACHINA outputs into interpretable inputs for MACHINA-Viz
Make sure to have Python3 installed
Simply run
chmod +x install.sh
./install.sh
Simply run the shell script on a directory containing all the output files from MACHINA.
./run.sh <MACHINA output directory>
Your directory should have one of the following structures:
- Input Directory
- solution1.tree
- solution1.labeling (You can change the name from solution1 as long as the tree and labeling have the same name)
- solution2.tree
- solution2.labeling
- ...
- coloring.txt (Optional)
or
- Input Directory
- pmh
- solution1.tree
- solution2.tree
- ...
- potential_labelings
- solution1.labeling
- solution2.labeling
- ...
- coloring.txt (Optional)
The program will compress the directory into a single json file containing the following format:
{
"name": <patient name>,
"solutions": [
{
"name": <solution name>,
"tree": [
[u, v],
...
],
"labeling": [
[n, label],
...
],
"migration": [
[label_u, label_v, # occurences],
...
]
},
...
],
"summary": {
"migration": [
[label_u, label_v, # occurences],
...
]
}
}