aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/load_phenotypes_to_db.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/load_phenotypes_to_db.py b/scripts/load_phenotypes_to_db.py
index d31ade6..533b0e3 100644
--- a/scripts/load_phenotypes_to_db.py
+++ b/scripts/load_phenotypes_to_db.py
@@ -49,21 +49,27 @@ def save_phenotypes(
"""Read `phenofiles` and save the phenotypes therein."""
logger.info("Saving new phenotypes.")
logger.debug("Processing %s 'pheno' files.", len(phenofiles))
- phenofiles = control_data["pheno"]
+ ## TODO: Replace with something like this: ##
+ # phenofiles = control_data["phenocovar"] + control_data.get(
+ # "gn-metadata", {}).get("pheno", [])
+ #
+ # This is meant to load (and merge) data from the "phenocovar" and
+ # "gn-metadata -> pheno" files into a single collection of phenotypes.
+ phenofiles = control_data["phenocovar"]
if len(phenofiles) <= 0:
return tuple()
- if control_data["pheno_transposed"]:
+ if control_data["phenocovar_transposed"]:
logger.info("Undoing transposition of the files rows and columns.")
phenofiles = (
transpose_csv_with_rename(
_file
build_line_splitter(control_data)
build_line_joiner(control_data))
- for _file in control_data["pheno"])
+ for _file in control_data["phenocovar"])
- _headers = rqtl2.read_csv_file_headers(control_data["pheno"][0],
- control_data["pheno_transposed"],
+ _headers = rqtl2.read_csv_file_headers(control_data["phenocovar"][0],
+ control_data["phenocovar_transposed"],
control_data["sep"],
control_data["comment.char"])
return create_new_phenotypes(