Skip to content

Instantly share code, notes, and snippets.

@yk-tanigawa
Created December 28, 2015 16:03
Show Gist options
  • Save yk-tanigawa/7dcb7a39242f06232ef6 to your computer and use it in GitHub Desktop.
Save yk-tanigawa/7dcb7a39242f06232ef6 to your computer and use it in GitHub Desktop.
Compute reverse complement nucleotide sequence with python
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