diff options
| author | pi coding agent <pi@localhost> | 2026-11-05 20:09:55 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-11-05 14:16:31 -0600 |
| commit | e4ffb00d2f505ba11ec175ada2c85288d80a6050 (patch) | |
| tree | a3af3dd9bd82e7ac26db04ba09390d1b6eb9d799 /uploader/phenotypes | |
| parent | be5137651f46fe2d0fd649993efa0fe69b386ec3 (diff) | |
| download | gn-uploader-e4ffb00d2f505ba11ec175ada2c85288d80a6050.tar.gz | |
Unify missing-value symbol parsing in r_qtl.utils
Move `parse_missing_values_symbols` from the genotypes views into `r_qtl.utils` and use it in the genotypes Stage 01 collector config and the phenotypes individual-file uploads, replacing their divergent inline splits with the more robust whitespace/comma parsing. Move the tests to `tests/r_qtl/test_utils.py`.
Diffstat (limited to 'uploader/phenotypes')
| -rw-r--r-- | uploader/phenotypes/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py index ff28a6f..a85a442 100644 --- a/uploader/phenotypes/views.py +++ b/uploader/phenotypes/views.py @@ -34,6 +34,7 @@ from flask import (flash, from r_qtl import r_qtl2_qc as rqc from r_qtl import exceptions as rqe +from r_qtl.utils import parse_missing_values_symbols from uploader import jobs from uploader import session @@ -323,7 +324,7 @@ def process_phenotypes_individual_files(error_uri): cdata = { "sep": form["file-separator"], "comment.char": form["file-comment-character"], - "na.strings": form["file-na"].split(" "), + "na.strings": parse_missing_values_symbols(form["file-na"]), } bundlepath = Path(uploads_dir(app), f"{str(uuid.uuid4()).replace('-', '')}.zip") |
