annotate interproscan5/create_index.py @ 0:0da2847fc108 draft default tip

Uploaded
author si-datascience
date Thu, 24 May 2018 14:57:30 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
1 #!/usr/bin/env python
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
2
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
3 import os
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
4 import sys
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
5
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
6 o = open(sys.argv[1], 'w+')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
7
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
8 o.write('<html> <body> <h1> InterProScan result summary page </h1> <ul>')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
9
0da2847fc108 Uploaded
si-datascience
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))]:
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
11 o.write('<li><a href="%s"> %s </a></li>' % (filename, os.path.splitext(filename)[0]))
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
12
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
13 o.write('</ul></body></html>')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
14 o.close()