diff options
author | zsloan | 2021-04-28 19:40:58 +0000 |
---|---|---|
committer | zsloan | 2021-04-28 19:40:58 +0000 |
commit | 6e8afe5a6871a680778bfaed6b79c934b33d0307 (patch) | |
tree | 59f2fe617f66832da1b951804fe4d5101a3e43d3 | |
parent | 68ee0a995fceaf6aefdd3c8f780e46a83b51a0e8 (diff) | |
download | genenetwork2-6e8afe5a6871a680778bfaed6b79c934b33d0307.tar.gz |
Account for temp traits when adding covariates with GEMMA mapping
-rw-r--r-- | wqflask/wqflask/marker_regression/gemma_mapping.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py index 83ebcdf9..06c9300a 100644 --- a/wqflask/wqflask/marker_regression/gemma_mapping.py +++ b/wqflask/wqflask/marker_regression/gemma_mapping.py @@ -146,7 +146,12 @@ def gen_covariates_file(this_dataset, covariates, samples): for covariate in covariate_list: this_covariate_data = [] trait_name = covariate.split(":")[0] - dataset_ob = create_dataset(covariate.split(":")[1]) + dataset_name = covariate.split(":")[1] + if dataset_name == "Temp": + temp_group = trait_name.split("_")[2] + dataset_ob = create_dataset(dataset_name = "Temp", dataset_type = "Temp", group_name = temp_group) + else: + dataset_ob = create_dataset(covariate.split(":")[1]) trait_ob = create_trait(dataset=dataset_ob, name=trait_name, cellid=None) |