diff options
author | Pjotr Prins | 2018-02-10 08:53:27 +0000 |
---|---|---|
committer | Pjotr Prins | 2018-02-10 08:53:27 +0000 |
commit | 91365baf9ba657f56c19201874cdf60aede75dd1 (patch) | |
tree | 33f9f0069b177d41423004d6f2eff471b56f273a /wqflask | |
parent | b3d9c748008d401ca5b5fa5d60a6a1eff505ee3e (diff) | |
download | genenetwork2-91365baf9ba657f56c19201874cdf60aede75dd1.tar.gz |
Fixing GEMMA LOCO
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/marker_regression/gemma_mapping.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py index c004983e..68920130 100644 --- a/wqflask/wqflask/marker_regression/gemma_mapping.py +++ b/wqflask/wqflask/marker_regression/gemma_mapping.py @@ -3,7 +3,7 @@ import os, math, string, random, json from base import webqtlConfig from base.trait import GeneralTrait from base.data_set import create_dataset -from utility.tools import flat_files, GEMMA_COMMAND, GEMMA_WRAPPER_COMMAND, TEMPDIR, assert_bin +from utility.tools import flat_files, GEMMA_COMMAND, GEMMA_WRAPPER_COMMAND, TEMPDIR, assert_bin, assert_file import utility.logger logger = utility.logger.getLogger(__name__ ) @@ -210,8 +210,13 @@ def parse_gemma_output(genofile_name): def parse_loco_output(this_dataset, gwa_output_filename): output_filelist = [] - with open("{}/gn2/".format(TEMPDIR) + gwa_output_filename + ".json") as data_file: - data = json.load(data_file) + jsonfn = "{}/gn2/".format(TEMPDIR) + gwa_output_filename + ".json" + assert_file(jsonfn) + try: + with open(jsonfn) as data_file: + data = json.load(data_file) + except: + logger.error("Can not parse "+jsonfn) files = data['files'] for file in files: |