aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-08-10 19:01:47 +0000
committerzsloan2021-08-10 19:01:47 +0000
commit162851e8f92ed6d01c25d4f6034bcac4986e8094 (patch)
tree4961e3a21a663f1b215a65eccb605e075920813a
parent3ae0ab231c529f765e48557dec7e336fa3bd9ede (diff)
downloadgenenetwork2-162851e8f92ed6d01c25d4f6034bcac4986e8094.tar.gz
Replaced forward slashes with underscores in the hashed filenames used by GEMMA, since the forward slashes make the paths not work properly
-rw-r--r--wqflask/wqflask/marker_regression/gemma_mapping.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py
index efd8bba8..623ab87f 100644
--- a/wqflask/wqflask/marker_regression/gemma_mapping.py
+++ b/wqflask/wqflask/marker_regression/gemma_mapping.py
@@ -129,7 +129,7 @@ def run_gemma(this_trait, this_dataset, samples, vals, covariates, use_loco,
def gen_pheno_txt_file(this_dataset, genofile_name, vals):
"""Generates phenotype file for GEMMA"""
- filename = "PHENO_" + generate_hash_of_string(this_dataset.name + str(vals))
+ filename = "PHENO_" + generate_hash_of_string(this_dataset.name + str(vals)).replace("/", "_")
with open(f"{TEMPDIR}/gn2/{filename}.txt", "w") as outfile:
for value in vals:
@@ -169,7 +169,7 @@ def gen_covariates_file(this_dataset, covariates, samples):
this_covariate_data.append("-9")
covariate_data_object.append(this_covariate_data)
- filename = "COVAR_" + generate_hash_of_string(this_dataset.name + str(covariate_data_object))
+ filename = "COVAR_" + generate_hash_of_string(this_dataset.name + str(covariate_data_object)).replace("/", "_")
with open((f"{flat_files('mapping')}/"
f"{filename}.txt"),