aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-04-28 14:44:03 -0500
committerGitHub2021-04-28 14:44:03 -0500
commitd31f2c4e4d57b927101fe9a33b4f540eef1385ae (patch)
treecd633578dd208788fa9ef28ae4f15974abac9396
parent1a7bb988ee360b3ef48e22e25b419c375dccb9fa (diff)
parent6e8afe5a6871a680778bfaed6b79c934b33d0307 (diff)
downloadgenenetwork2-d31f2c4e4d57b927101fe9a33b4f540eef1385ae.tar.gz
Merge pull request #567 from zsloan/bug/fix_gemma_temptrait_covariates
Account for temp traits when adding covariates with GEMMA mapping
-rw-r--r--wqflask/wqflask/marker_regression/gemma_mapping.py7
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)