comparison inter.py @ 0:c55bdc2fb9fa

Uploaded
author davidmurphy
date Thu, 27 Oct 2011 12:09:09 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c55bdc2fb9fa
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")