Skip to content

Commit d4f48d3

Browse files
committed
Added .txt support
1 parent 9235bec commit d4f48d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

physiofit/base/io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ def _read_data(path_to_data: str) -> DataFrame:
6767

6868
data_path = Path(path_to_data).resolve()
6969

70-
if data_path.suffix == ".tsv":
70+
if data_path.suffix in [".txt", ".tsv"]:
7171
data = read_csv(str(data_path), sep="\t")
7272
elif data_path.suffix == ".csv":
7373
data = read_csv(str(data_path), sep=";")
7474
else:
7575
if not data_path.exists():
7676
raise ValueError(f"{data_path} is not a valid file")
7777
else:
78-
raise TypeError(f"{data_path} is not a valid format. Accepted formats are .csv or .tsv")
78+
raise TypeError(f"{data_path} is not a valid format. Accepted formats are .csv, .txt or .tsv")
7979

8080
IoHandler._verify_data(data)
8181
return data

physiofit/ui/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def parse_args():
8282
parser = argparse.ArgumentParser("Physiofit: Extracellular flux estimation software")
8383

8484
# Parse data arguments (tsv + json)
85-
parser.add_argument("-t", "--data", type=str, help="Path to data file in tsv format")
85+
parser.add_argument("-t", "--data", type=str, help="Path to data file in tabulated format (txt or tsv)")
8686
parser.add_argument("-c", "--config", type=str, help="Path to config file in json format")
8787

8888
# Parse basic parameters

0 commit comments

Comments
 (0)