diff options
Diffstat (limited to 'gn3')
| -rw-r--r-- | gn3/computations/rqtl2.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gn3/computations/rqtl2.py b/gn3/computations/rqtl2.py index bccedc0..95d8225 100644 --- a/gn3/computations/rqtl2.py +++ b/gn3/computations/rqtl2.py @@ -66,3 +66,13 @@ def compose_rqtl2_cmd(rqtl_path, input_file, rscript_path = config.get("RSCRIPT", "Rscript") return f"{rscript_path} { rqtl_path } " + " ".join( [f"--{key} {val}" for key, val in params.items()]) + + +def create_file(file_path): + """Utility function to create file given a file_path""" + try: + with open(file_path, "x",encoding="utf-8") as _file_handler: + return True, "File created at" + except FileExistsError: + return False, "File Already Exists" + |
