rosalind练习题二十二

# 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.Seqimport 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()

print(protein_seq)

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容