diff options
author | Frederick Muriuki Muriithi | 2025-01-23 08:38:23 -0600 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-01-23 08:38:23 -0600 |
commit | ea3601197c3a3d4b90e2f43828a3dfca5b06891f (patch) | |
tree | b49bbc1626731dc0b598d69cd46a6a8927863db2 /scripts | |
parent | d973f82248fd9ea0ca9447c2d8296cd8828ea408 (diff) | |
download | gn-uploader-ea3601197c3a3d4b90e2f43828a3dfca5b06891f.tar.gz |
Ensure names are lowercase for comparison purposes.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/rqtl2/phenotypes_qc.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/rqtl2/phenotypes_qc.py b/scripts/rqtl2/phenotypes_qc.py index ba28ed0..76ecb8d 100644 --- a/scripts/rqtl2/phenotypes_qc.py +++ b/scripts/rqtl2/phenotypes_qc.py @@ -290,10 +290,15 @@ def qc_pheno_file(# pylint: disable=[too-many-locals, too-many-arguments] push_error, rconn, file_fqkey(fqkey, "errors", filepath)) _csvfile = rqtl2.read_csv_file(filepath, separator, comment_char) _headings: tuple[str, ...] = tuple( + # select lowercase for comparison purposes heading.lower() for heading in next(_csvfile)) _errors: tuple[InvalidValue, ...] = tuple() - _absent = tuple(pheno for pheno in _headings[1:] if pheno not in phenonames) + _absent = tuple(pheno for pheno in _headings[1:] if pheno + not in tuple( + # lower to have consistent case with headings for + # comparison + phe.lower() for phe in phenonames)) if len(_absent) > 0: _errors = _errors + (save_error(InvalidValue( filepath.name, |