[Verba] Meeting summary

Stuart D. Gathman stuart at gathman.org
Fri Feb 10 11:45:27 EST 2006


We reviewed Taylors program to decode binary ASCII messages, and reviewed
coding.  Rebecca manned the keyboard for creating a DNA antisense
function.  The program is attached.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

-------------- next part --------------
def complement(n):
   """Return complementary nucleotide
   >>> complement("T")
   'A'
   >>> complement("C")
   'G'
   """
   if n == 'T': return 'A'
   if n == 'A': return 'T'
   if n == 'G': return 'C'
   if n == 'C': return 'G'
   raise ValueError('invalid nucleotide: ' + n)
   

def antisense(s):
   """Find antisense nucleotide sequence
   >>> antisense("GATTCAGTTAG")
   'CTAAGTCAATC'
   """
   return ''.join(complement(c) for c in s)
      
def _test():
  import doctest,comp
  return doctest.testmod(comp)

# Make into a program that can complement DNA sequences 

if __name__ == '__main__':
  _test()
  import sys
  print "Enter sequence to be complemented:"
  print antisense(raw_input())


More information about the Verba mailing list