Created
          July 26, 2011 15:34 
        
      - 
      
- 
        Save sdouglas/1107043 to your computer and use it in GitHub Desktop. 
    DNA reverse complement
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import string | |
| complement = string.maketrans('ACGTacgt','TGCATGCA') | |
| def rcomp(s): | |
| """Returns the reverse complement of the sequence in s.""" | |
| return s.translate(complement)[::-1] | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment