Mercurial > repos > iuc > meme_chip
annotate get_meme_motif_databases.py @ 3:cc100e0f61f4 draft default tip
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 1661efcd3fb5d37fd972588bcf328a6ac705d4fa"
author | iuc |
---|---|
date | Sat, 27 Nov 2021 14:39:19 +0000 |
parents | 6095db402811 |
children |
rev | line source |
---|---|
0
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
1 import os |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
2 |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
3 |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
4 def get_meme_motif_database_options(file_path): |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
5 options = [] |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
6 if not os.path.isdir(file_path): |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
7 return options |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
8 for i, file_name in enumerate(os.listdir(file_path)): |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
9 full_path = os.path.join(file_path, file_name) |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
10 options.append((file_name, full_path, i == 0)) |
6095db402811
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme_chip commit 9068afc3812495aaf88c9a2f5a224c634d634742
iuc
parents:
diff
changeset
|
11 return options |