diff options
| author | pi coding agent <pi@localhost> | 2026-10-15 20:44:47 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-10-15 16:01:05 -0500 |
| commit | 87ba0e2fae57764863af2c978a8878f92f043ab2 (patch) | |
| tree | fc01b589ed946d508d26b2163d56aec565c033f2 /scripts | |
| parent | 930dfee072eeba7482fbd2828efd8fa3922b138f (diff) | |
| download | gn-uploader-87ba0e2fae57764863af2c978a8878f92f043ab2.tar.gz | |
Sort collected genotype symbols for deterministic output
The genotype symbols were converted to a tuple straight from a set, so their order depended on the set's iteration order. That made the output (and the JSON emitted by the CLI) non-deterministic, and caused the multi-processed result to differ from the single-threaded result once symbols were merged across chunks. Sort the symbols so the output is stable and identical for both implementations. The set of symbols, which is what consumers care about, is unchanged.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/genotypes/preprocess_csv_collect_info.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/genotypes/preprocess_csv_collect_info.py b/scripts/genotypes/preprocess_csv_collect_info.py index 0fb1b96..b153279 100644 --- a/scripts/genotypes/preprocess_csv_collect_info.py +++ b/scripts/genotypes/preprocess_csv_collect_info.py @@ -350,7 +350,7 @@ def _as_file_stats( dot_geno_lines=stats.dot_geno_lines, dot_geno_fields=(DotGenoFields(**stats.dot_geno_fields) if bool(stats.dot_geno_fields) else None), - geno_symbols=tuple(stats.geno_symbols), + geno_symbols=tuple(sorted(stats.geno_symbols)), samples_list=tuple(samples), markers_list=stats.markers, errors=tuple(header_errors) + tuple(stats.errors)) |
