Skip to content

Commit

Permalink
add read_csv function
Browse files Browse the repository at this point in the history
  • Loading branch information
raquellewei committed Oct 2, 2023
1 parent 99a240c commit 2614f16
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fununifrac/reproducibility/plot_mds.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ def parsearg():

if __name__ == "__main__":
args = parsearg()

metadata = pd.read_table(args.metadata_file)
if args.metadata_file.endswith('.csv'):
metadata = pd.read_csv(args.metadata_file)
else:
metadata = pd.read_table(args.metadata_file)
with open(args.label_file, 'r') as f:
labels = f.readlines()
labels = [l.strip() for l in labels]
Expand Down

0 comments on commit 2614f16

Please sign in to comment.