Reproducing results
Invoking any of the MIXALIME commands creates or updates a JSON file MyProject.json. It serves three purposes:
- Keeps track of what's been done;
- Keeps track of some of the relevant package versions and results obtained at different steps;
- Allows one to easily reproduce results given a JSON file and input data alone with a single command call.
If we follow the demo as shown in the Quickstart section, our JSON file should look like this:
Content of MyProject.json
{
"betanegbinfit": "1.9.7",
"jax": "0.4.20",
"mixalime": "2.16.1",
"scipy": "1.11.3",
"dill": "0.3.7",
"name": "MyProject",
"create": {
"files": [
"scorefiles"
],
"bad_maps": null,
"default_bad": 1.0,
"drop_bad": [],
"min_qual": 10,
"min_cnt": 5,
"max_cover": Infinity,
"filter_db": false,
"filter_rs": false,
"symmetrify": false,
"filter_name": null,
"filter_chr": null,
"compression": "lzma",
"snp_bad_check": false,
"expected_result": [
[
"1.00",
"10319",
"24893"
],
[
"1.33",
"7408",
"13359"
],
[
"1.50",
"12409",
"37584"
],
[
"2.00",
"41762",
"199208"
],
[
"2.50",
"2195",
"3585"
],
[
"3.00",
"6897",
"26558"
],
[
"4.00",
"1677",
"2420"
],
[
"5.00",
"712",
"926"
],
[
"6.00",
"731",
"1143"
]
]
},
"fit": {
"dist": "BetaNB",
"left": 4,
"estimate_p": false,
"window_size": 10000,
"window_behavior": "both",
"min_slices": 3,
"adjust_line": false,
"k_left_bound": 1,
"max_count": Infinity,
"max_cover": Infinity,
"adjusted_loglik": false,
"n_jobs": -1,
"regul": false,
"regul_alpha": 1.0,
"regul_n": true,
"regul_slice": true,
"regul_prior": "laplace",
"fix_params": "",
"std": false,
"optimizer": "SLSQP",
"r_transform": "NB",
"symmetrify": false,
"small_dataset_strategy": "conservative",
"small_dataset_n": 10000,
"stop_slice_n": 10
},
"plot": {
"out": "results",
"max_count": 60,
"slices": [
5,
10,
20,
30,
40
],
"bad": null,
"show_bad": true,
"fmt": "png",
"dpi": 200
},
"test": {
"correction": "none",
"gof_tr": null,
"fit": null,
"dataset_n_thr": -1,
"n_jobs": 1
},
"combine": {
"group": [],
"alpha": 0.05,
"min_cover": 20,
"adaptive_min_cover": false,
"adaptive_es": 1.0,
"adaptive_pval": 0.05,
"filter_id": null,
"filter_chr": null,
"n_jobs": 1,
"expected_result": [
2349,
2081,
0
]
},
"export": {
"out": "results",
"sample_info": false
}
}
We can use this file to reproduce the results without typing down all commands manually:
> rm MyProject*.lzma > mixalime reproduce MyProject.json
It should run the whole pipeline by itself. Just watch.
Now, what happens if your local version of any of the packages specified in the JSON file differs? reproduce will notify you with a warning.
What happens if some result statistics are different at the current run of reproduce from that specified in the JSON file? MIXALIME will throw an appropriate error and cease to continue "reproducing" results, notifying that some unknown factor intervened and the results are no longer reproducible.
