且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用python编程将一组DNA序列转换为蛋白质序列?

更新时间:2022-02-12 09:29:30

您应该阅读有关 Biopython 的信息.它具有与生物学和生物信息学相关的便捷功能和类.

You should read about Biopython. It comes with handy functions and classes related to Biology and Bioinformatics.

它具有执行所需功能的功能: Bio.Seq.translate

It has a function that does what you are looking for: Bio.Seq.translate

这里有代码示例:

>>> coding_dna = "GTGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG"
>>> translate(coding_dna)
'VAIVMGR*KGAR*'
>>> translate(coding_dna, stop_symbol="@")
'VAIVMGR@KGAR@'
>>> translate(coding_dna, to_stop=True)
'VAIVMGR'