From 424c52016e120b88098fe4e8429a7402b401d83b Mon Sep 17 00:00:00 2001 From: ChocoParrot Date: Sun, 24 Oct 2021 21:21:59 +0800 Subject: [PATCH] [refactor] minor changes to the directory --- src/cline_tools/orffinder-to-gff3 | 4 +++- src/cline_tools/orffinder-to-gtf | 4 +++- src/cline_tools/orffinder-to-sequence | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cline_tools/orffinder-to-gff3 b/src/cline_tools/orffinder-to-gff3 index db2d1f9..f87eb1b 100644 --- a/src/cline_tools/orffinder-to-gff3 +++ b/src/cline_tools/orffinder-to-gff3 @@ -8,6 +8,8 @@ from orffinder import orffinder arguments = sys.argv + [""] classed_arguments = {"orf_size": "75", "max_orfs_per_sequence": "-1", "remove_nested": "False", "trim_trailing": "False", "infmt": "fasta", "attr_name": "ORF_"} +dir_path = os.path.dirname(os.path.realpath(__file__)) + try: for i in range(len(arguments)): @@ -18,7 +20,7 @@ try: classed_arguments[argument[1:]] = arguments[i + 1] if "h" in classed_arguments.keys(): - help_output = open("help_pages/orffinder-to-gff3.txt", "r").read() + help_output = open(dir_path + "/help_pages/orffinder-to-gff3.txt", "r").read() print(help_output) os._exit(1) diff --git a/src/cline_tools/orffinder-to-gtf b/src/cline_tools/orffinder-to-gtf index be9c979..10f7f1f 100644 --- a/src/cline_tools/orffinder-to-gtf +++ b/src/cline_tools/orffinder-to-gtf @@ -8,6 +8,8 @@ from orffinder import orffinder arguments = sys.argv + [""] classed_arguments = {"orf_size": "75", "max_orfs_per_sequence": "-1", "remove_nested": "False", "trim_trailing": "False", "infmt": "fasta", "attr_name": "ORF_"} +dir_path = os.path.dirname(os.path.realpath(__file__)) + try: for i in range(len(arguments)): @@ -18,7 +20,7 @@ try: classed_arguments[argument[1:]] = arguments[i + 1] if "h" in classed_arguments.keys(): - help_output = open("help_pages/orffinder-to-gtf.txt", "r").read() + help_output = open(dir_path + "/help_pages/orffinder-to-gtf.txt", "r").read() print(help_output) os._exit(1) diff --git a/src/cline_tools/orffinder-to-sequence b/src/cline_tools/orffinder-to-sequence index fe640a7..3a13b40 100644 --- a/src/cline_tools/orffinder-to-sequence +++ b/src/cline_tools/orffinder-to-sequence @@ -9,6 +9,8 @@ from orffinder import orffinder arguments = sys.argv + [""] classed_arguments = {"orf_size": "75", "outtype": "nucleotide", "max_orfs_per_sequence": "-1", "remove_nested": "False", "trim_trailing": "False", "infmt": "fasta", "attr_name": "ORF_", "outfmt": "fasta"} +dir_path = os.path.dirname(os.path.realpath(__file__)) + try: for i in range(len(arguments)): @@ -19,7 +21,7 @@ try: classed_arguments[argument[1:]] = arguments[i + 1] if "h" in classed_arguments.keys(): - help_output = open("help_pages/orffinder-to-sequence.txt", "r").read() + help_output = open(dir_path + "/help_pages/orffinder-to-sequence.txt", "r").read() print(help_output) os._exit(1)