comparison vmap_dnaindex.py @ 0:f63d639b223c draft

Initial Upload
author mzeidler
date Wed, 25 Sep 2013 11:41:16 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f63d639b223c
1 from argparse import ArgumentParser
2 import os
3 from vmap import DNAIndex
4
5 if __name__ == "__main__":
6
7
8 parser = ArgumentParser()
9
10 a = parser.add_argument
11 a("-o","--html_file",dest="html_file")
12 a("-d","--dir",dest="directory")
13
14 (options,args)= parser.parse_known_args()
15
16 args.insert(0,"dummy")
17 try:
18 DNAIndex.run(argv=args)
19 except SystemExit:
20 f = open(options.html_file,'w')
21 rval = ["<html><head><title>BWA Index Galaxy Composite Dataset </title></head><body><p/>\n"]
22 rval.append('<div>This composite dataset is composed of the following files:<p/><ul>')
23 flist = os.listdir(options.directory)
24
25 for file in flist:
26 rval.append( '<li><a href="%s">%s</a></li>' % ( file, file) )
27 rval.append( '</ul></body></html>' )
28
29 f.write("\n".join( rval ))
30 f.close()