更新时间: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'