annotate interproscan5/create_index.py @ 9:1d6b3be059c8 draft default tip

Name change. Removed redundant tool def.
author mkh
date Mon, 08 Feb 2016 12:10:24 -0500
parents fe8e43a26870
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
1 #!/usr/bin/env python
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
2
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
3 import os
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
4 import sys
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
5
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
6 o = open(sys.argv[1], 'w+')
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
7
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
8 o.write('<html> <body> <h1> InterProScan result summary page </h1> <ul>')
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
9
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
10 for filename in [f for f in os.listdir(sys.argv[2]) if os.path.isfile(os.path.join(sys.argv[2], f))]:
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
11 o.write('<li><a href="%s"> %s </a></li>' % (filename, os.path.splitext(filename)[0]))
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
12
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
13 o.write('</ul></body></html>')
fe8e43a26870 Uploaded
mkh
parents:
diff changeset
14 o.close()