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

refactor output filename generation

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