Skip to content

Commit

Permalink
add func to get converter script
Browse files Browse the repository at this point in the history
  • Loading branch information
sterrettJD committed Dec 8, 2023
1 parent 5aa6bb6 commit 8d26fb1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/snake_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,15 @@ def get_kraken_db_loc(default, config):
loc = config.get("kraken_db")
if loc is not None:
return loc
return default
return default

def get_tpm_converter_path():
path_2_script = path.dirname(__file__)
converter = path.join(path_2_script, "rule_utils", "counts_to_tpm.py")
# remove ".."
converter = path.normpath(converter)

if path.exists(converter):
return converter
else:
raise FileNotFoundError(f"TPM conversion script was not found at {converter}.")

0 comments on commit 8d26fb1

Please sign in to comment.