annotate get_clustering_methods.py @ 6:00f14e3bbe9f draft

Uploaded
author greg
date Thu, 30 Aug 2018 09:45:52 -0400
parents
children 51c2f0c74349
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
1 import os
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
2
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
3
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
4 def get_clustering_method_options(file_path):
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
5 options = []
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
6 if not os.path.isdir(file_path):
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
7 return options
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
8 methods_dir = os.path.join(file_path, "alns")
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
9 for i, file_name in enumerate(os.listdir(methods_dir)):
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
10 full_path = os.path.join(file_path, file_name)
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
11 options.append((file_name, full_path, i == 0))
00f14e3bbe9f Uploaded
greg
parents:
diff changeset
12 return options