changeset 0:9912a1f1f6a3

Uploaded
author jiechenable1987
date Fri, 24 Feb 2012 17:38:24 -0500
parents
children e1c6678f22fa
files inter.py
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inter.py	Fri Feb 24 17:38:24 2012 -0500
@@ -0,0 +1,29 @@
+#!/usr/tmp/bin/python2.7
+
+
+import weblogolib
+from corebio.utils.deoptparse import DeOptionParser
+import sys
+
+
+#setup
+def blackboxcodonl(inputf,outputf):
+  parser = weblogolib._build_option_parser()                
+
+  (opts, args) = parser.parse_args(['--size', 'large', '--composition', 'none', '--fin',inputf,'--fout', outputf])
+
+
+  if args : parser.error("Unparsable arguments: %s " % args)
+  #best not to change anything in the try except block.
+  try:
+    data = weblogolib._build_logodata(opts)
+    format = weblogolib._build_logoformat(data, opts)
+    formatter = opts.formatter
+    formatter(data, format, opts.fout)
+  except ValueError, err :
+    print >>sys.stderr, 'Error:', err
+    sys.exit(2)
+  except KeyboardInterrupt, err:
+    sys.exit(0)
+  
+blackboxcodonl('/home/david/examples/cluster17.aln',"outfile.eps")