Skip to content

Commit

Permalink
Fix MAGE-TAB to JSON converter service #10
Browse files Browse the repository at this point in the history
  • Loading branch information
djcomlab committed Jun 15, 2017
1 parent b3822e4 commit 11fef24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion isarest.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,8 @@ def post(self):
src_dir = os.path.normpath(tmp_dir)
files = [f for f in os.listdir(src_dir) if f.endswith('.idf.txt')]
if len(files) == 1:
J = magetab2json.convert(os.path.join(src_dir, files[0]), 'protein microarray', 'protein expression profiling')
with open(os.path.join(src_dir, files[0])) as source_fp:
J = magetab2json.convert(source_fp, 'protein microarray', 'protein expression profiling')
if J is None:
raise IOError("Could not generate JSON from input MAGE-TAB")
except Exception as e:
Expand Down

0 comments on commit 11fef24

Please sign in to comment.