diff options
author | Pjotr Prins | 2021-01-08 10:33:13 +0000 |
---|---|---|
committer | Pjotr Prins | 2021-01-08 10:33:13 +0000 |
commit | b112b3203e34ea61dfdf802bce5036f938eaa774 (patch) | |
tree | da2ed8f18fcb7263fcec6f77f27ae40a51e6321d /workflows/tools/normalize-yamlfa.py | |
parent | 5d941e47e27a3cd2c47f8ee51f5523d180f8a5b2 (diff) | |
download | bh20-seq-resource-b112b3203e34ea61dfdf802bce5036f938eaa774.tar.gz bh20-seq-resource-b112b3203e34ea61dfdf802bce5036f938eaa774.tar.lz bh20-seq-resource-b112b3203e34ea61dfdf802bce5036f938eaa774.zip |
GenBank: Fix normalization and depth differences with original records
Diffstat (limited to 'workflows/tools/normalize-yamlfa.py')
-rwxr-xr-x | workflows/tools/normalize-yamlfa.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/workflows/tools/normalize-yamlfa.py b/workflows/tools/normalize-yamlfa.py index 20c2feb..55a8848 100755 --- a/workflows/tools/normalize-yamlfa.py +++ b/workflows/tools/normalize-yamlfa.py @@ -19,10 +19,10 @@ directory are parsed using the state.json file. It is possible to select a subset of IDs. This tool has two modes of operation. It can validate with the -`--validate` switch which stops at a warning and does no rewriting. +--validate switch which stops at a warning and does no rewriting. This mode is typically used in troubleshooting. -The other mode is `--rewrite` which rewrites the JSON files after +The other mode is --rewrite which rewrites the JSON files after making a backup (.bak) of the original. This mode updates files and won't stop - it is used for (automated) uploads. @@ -92,6 +92,6 @@ for id in ids: os.rename(fn,fn+".bak") with open(fn, 'w') as outfile: print(f" Writing {fn}") - json.dump(rec.__dict__, outfile, indent=4) + json.dump(rec.__dict__, outfile, indent=2) else: print(rec) |