comparison inter.py @ 4:4d47ab2b7bcc

Uploaded
author davidmurphy
date Fri, 13 Jan 2012 07:18:19 -0500
parents c55bdc2fb9fa
children
comparison
equal deleted inserted replaced
3:09d2dac9ef73 4:4d47ab2b7bcc
1 #!/usr/tmp/bin/python2.7
2
3
4 import weblogolib
5 from corebio.utils.deoptparse import DeOptionParser
6 import sys
7
8
9 #setup
10 def blackboxcodonl(inputf,outputf):
11 parser = weblogolib._build_option_parser()
12
13 (opts, args) = parser.parse_args(['--size', 'large', '--composition', 'none', '--fin',inputf,'--fout', outputf])
14
15
16 if args : parser.error("Unparsable arguments: %s " % args)
17 #best not to change anything in the try except block.
18 try:
19 data = weblogolib._build_logodata(opts)
20 format = weblogolib._build_logoformat(data, opts)
21 formatter = opts.formatter
22 formatter(data, format, opts.fout)
23 except ValueError, err :
24 print >>sys.stderr, 'Error:', err
25 sys.exit(2)
26 except KeyboardInterrupt, err:
27 sys.exit(0)
28
29 blackboxcodonl('/home/david/examples/cluster17.aln',"outfile.eps")