# Problem
# After identifying the exons and introns of an RNA string, we only need to delete the introns and concatenate the exons to form a new string ready for translation.
# Given: A DNA string s (of length at most 1 kbp) and a collection of substrings of s acting as introns. All strings are given in FASTA format.
# Return: A protein string resulting from transcribing and translating the exons of s. (Note: Only one solution will exist for the dataset provided.)
# Sample Dataset
# >Rosalind_10
# ATGGTCTACATAGCTGACAAACAGCACGTAGCAATCGGTCGAATCTCGAGAGGCATATGGTCACATGATCGGTCGAGCGTGTTTCAAAGTTTGCGCCTAG
# >Rosalind_12
# ATCGGTCGAA
# >Rosalind_15
# ATCGGTCGAGCGTGT
# Sample Output
# MVYIADKQHVASREAYGHMFKVCA
# 给出一段序列,给了2个内含子序列,需要将2个内含子去掉,将剩余的序列转录为RNA,翻译成蛋白质。
from Bio.Seq import Seq
seq = Seq("ATGGTCTACATAGCTGACAAACAGCACGTAGCAATCGGTCGAATCTCGAGAGGCATATGGTCACATGATCGGTCGAGCGTGTTTCAAAGTTTGCGCCTAG")
intron_list = ["ATCGGTCGAA", "ATCGGTCGAGCGTGT"]
seq2 = seq.replace(intron_list[0], "")
seq3 = seq2.replace(intron_list[1], "")
# 转录DNA序列
rna_seq = seq3.transcribe()
# 翻译RNA序列
protein_seq = rna_seq.translate()文章来源:https://www.toymoban.com/news/detail-478180.html
print(protein_seq)文章来源地址https://www.toymoban.com/news/detail-478180.html
到了这里,关于rosalind练习题二十二的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!