Play with the Bio.Seq Module

Q

How to import the Bio.Seq module and use its functions?

✍: FYIcenter.com

A

Here are some examples on how to import the Bio.Seq module and use its functions.

1. Import the Bio.Seq module and create a Bio.Seq object.

fyicenter$ python

>>> from Bio.Seq import Seq
>>> my_seq = Seq("AGTACACTGGT")
>>> my_seq
Seq('AGTACACTGGT')

>>> print(my_seq)
AGTACACTGGT

2. Try complement() and reverse_complement() functions on the Bio.Seq object.

>>> my_seq.complement()
Seq('TCATGTGACCA')

>>> my_seq.reverse_complement()
Seq('ACCAGTGTACT')

 

Double Stranded DNA, mRNA and Transcription

Install Biopython

Biopython - Tools for Biological Computation

⇑⇑ OBF (Open Bioinformatics Foundation) Tools

2023-02-04, 687🔥, 0💬