Module 11

complement()

Finding the complement with Biopython.

Complement made easy

Biopython's complement() method does what your manual function did, but in one line.

from Bio.Seq import Seq
seq = Seq("ATGC")
print(seq.complement())
Your task

Complement with Biopython

  • Compute the complement of ATGC using Biopython.