Open swinterbourne opened 3 years ago
I've encountered the same thing with the Duncan-Sp_2018 upgraded config file, it is all alphabetically ordered.
@mikej888 let's discuss this at least briefly next dev meeting.
In Python 2.6+ dict
s are have ordered keys by default. https://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts.
Commit 13943f6 in riboviz
develop
sets yaml.dump
sort_keys=False
.
Issue linked to #76 and testing the
riboviz.tools.upgrade_config_file
tool from riboviz 2.1.I used the command
python -m riboviz.tools.upgrade_config_file -i ../example-datasets/fungi/saccharomyces/Lareau_2014_Replicates_RPF_3-samples_CDS_w_250utrs_config.yaml -o ../example-datasets/fungi/saccharomyces/Lareau_2014_Replicates_RPF_3-samples_CDS_w_250utrs_config_upgraded.yaml
on the Lareau et al 2014 dataset to upgraded the config file.The new config file is organised in alphabetical order, as a result the provenance has moved from the top of the config to the middle of the of the config file. I assume that we want to keep the provenance at the top of the config file?
Upgraded config_file: