diff options
author | Alexander Kabui | 2021-09-16 08:23:35 +0300 |
---|---|---|
committer | Alexander Kabui | 2021-09-16 08:23:35 +0300 |
commit | a3ef298678b32ee83cac7bd7462d3d92f8eaec26 (patch) | |
tree | 4820c5f30f18f7782d6a4759dda6d1cc00300838 /gn3/computations | |
parent | 129ecfe26a857c2c66a2402c9c7364b309e9f1c0 (diff) | |
download | genenetwork3-a3ef298678b32ee83cac7bd7462d3d92f8eaec26.tar.gz |
function to parse form data and write to json file
Diffstat (limited to 'gn3/computations')
-rw-r--r-- | gn3/computations/wgcna.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gn3/computations/wgcna.py b/gn3/computations/wgcna.py index e69de29..3819b62 100644 --- a/gn3/computations/wgcna.py +++ b/gn3/computations/wgcna.py @@ -0,0 +1,18 @@ +"""module contains code to preprocess and call wgcna script""" + +import os +import json +import uuid +from gn3.settings import TMPDIR + + +def dump_wgcna_data(request_data): + """function to dump request data to json file""" + filename = f"{str(uuid.uuid4())}.json" + + temp_file_path = os.path.join(TMPDIR, filename) + + with open(temp_file_path, "w") as output_file: + json.dump(request_data, output_file) + + return temp_file_path |