annotate get_clustering_methods.py @ 6:e813f9537cb2 draft

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