Created
December 28, 2015 16:03
-
-
Save yk-tanigawa/7dcb7a39242f06232ef6 to your computer and use it in GitHub Desktop.
Compute reverse complement nucleotide sequence with python
This file contains 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; | |
def revcomp(sequence): | |
return string.translate(sequence[::-1], string.maketrans("ACGT", "TGCA")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment