Skip to content
Snippets Groups Projects
Commit 5e33bd56 authored by Larissa Glass's avatar Larissa Glass
Browse files

refactor output filename generation

parent 02305427
No related branches found
No related tags found
1 merge request!8refactor output filename generation
...@@ -34,11 +34,13 @@ def get_args(): ...@@ -34,11 +34,13 @@ def get_args():
def output_filename(filename: str) -> str: def output_filename(filename: str) -> str:
filepath = Path(filename) filepath = Path(filename)
if filename.endswith(".csv") or filename.endswith(".tsv"): if filepath.suffix == ".csv" or filepath.suffix == ".tsv":
return "generated_" + filepath.stem + ".csv" outfile = "generated_" + filepath.stem + ".csv"
if filename.endswith(".gtf"): elif filepath.suffix == ".gtf":
return "generated_" + filepath.name outfile = "generated_" + filepath.name
else:
raise NotImplementedError()
return outfile
def app(): def app():
args = get_args() args = get_args()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment