Rosalind-002:DNA转录为RNA(Transcribing DNA into RNA)

题目:

DNA转录为RNA(Transcribing DNA into RNA)

Given: A DNA string tt, which corresponding to a coding strand, having length at most 1000 nt.

所给:一条被命名为tt的DNA编码链,长度至少为1000个碱基。

Return: The transcribed RNA string of tt.

需得:由tt经转录得到的RNA链。

测试数据

GATGGAACTTGACTACGTAAATT

测试输出

GAUGGAACUUGACUACGUAAAUU

生物背景

RNA中五碳糖为核糖,碱基有四种,分别为腺嘌呤(adenine,A)、鸟嘌呤(guanine,G)、胞嘧啶(cytosine,C)和尿嘧啶(uracil,U)。信使RNA(mRNA)由DNA的其中一条链转录而来,携带遗传信息并指导蛋白质的合成。转录RNA分子的DNA链称为模板链,另一条链称为编码链。

思路

题目给出的是编码链,因此只用把T替换为U即为转录得到的RNA序列。

Python知识点

DNA序列是一个字符串,Python中针对字符串提供了大量方法可直接调用,其中“.replace()”方法可用于替换字符。

代码

f=open('rosalind_dna.txt','r')
s=f.read()
s1=s.replace('T','U')
print(s1)

作者:wshjlxt
https://www.bilibili.com/read/cv1977567
出处: bilibili

本文地址:https://blog.csdn.net/weixin_43958845/article/details/109633930

相关推荐:

1.Counting DNA Nucleotides

Problem A string issimplyanorderedcollectionofsymbolsselectedfromsome alphabet andformedintoaword;the length ofastringis...

cfDNA(circulating cell free DNA)全基因组测序

参考资料: 【cfDNA专题】cell-freeDNA在非肿瘤疾病中的临床价值(好) ctDNA,cfDNA和CTCs有什么区别吗? cfDNA你懂多少? 新发现|基因是否表达,做个cfDNA全基因组测序就可揭晓 游离DNA Cell-FreeDNA(cfDNA)Isolation 游离DNA(ci...

[Leetcode] Repeated DNA Sequences

AllDNAiscomposedofaseriesofnucleotidesabbreviatedasA,C,G,andT,forexample:"ACGAATTCCG".WhenstudyingDNA,itissometimesusefultoidentifyrepeatedsequenceswi...

DNA解链统计物理

来源:KersonHuang,LecturesonStatisticalPhysicsandProteinFolding,pp24-25 把双链DNA解开就像拉拉链。设DNA有\(N\)个链环(link),每个链环有两种状态:闭合着或打开着,后一种状态比前一种状态的能量高\(\Delta\)。打开的...

UVa1368 DNA序列(DNA Consensus String)

思路:   比较同一列A,C,G,T四个字母出现的个数,找到出现数最大的字母即答案,一样的话优先\'A\'(按字典顺序进行判断就可以得到字典序最小的解)   AC代码 1#include<stdio.h> 2#include<string.h> 3 4charstr[55][...