版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、POJ1080HumanGeneFunctions解题计算机05 级吴连龙00548047 A B,允许插入适当空格使长度相同,定义相应位置不同关键码组合的形似度矩阵 Weight,求最佳插入方式使得i B j 个基因结尾的最佳相似度。不插入空格,问题转化为 Simi-1j-1的子问题,加上 GeneAi和 格和 GeneBj的匹配权值。格和 GeneAi的匹配权值。可以用反证法证明,子问题的最优解一定是当前 i,j 问题的最优解的构成Simij=maxSimi-1j-+WeightGeneAiGeneBjSimij-1 + Weight空格 GeneBjSimi-1j + Weight Ge
2、neAiO(1O(N2O(N2O(NPOJ 0ms28KB。/ Problem: POJ / Title : Human Gene / Method : Dynamic / : O( N2 /Space :O(N) #include char Weight55 5,-1,-2,-1,-3,-1,5,-3,-2,-4,-2,-3,5,-2,-2,-1,-2,-2,5,-1,-3,-4,-2,-int LenA, LenB, i, int Sum; / 测试数据个数bool Cur; / 当前阶段游标char char char GeneA101, short / 函数说明:返回两个shortin
3、line short max( short ValA, short ValB return ValA ValB ? ValA : void FA=0; FC=1; FG=2; scanf(%d, &Sum); while ( Sum- 0 scanf(%d%s,&LenA,&Str); for ( i = 0; i LenA; i+ GeneAi+1=FStri; scanf( %d %s, &LenB, &Str); for ( i = 0; i LenB; i+ )GeneB i+1 = F Str i Sim00 = for ( j = 1; j = LenB; j+ Sim0j = S
4、im0 j-1 + Weight4 GeneB j for ( i = 1, Cur = 1; i = LenA; i+, Cur = !Cur SimCur0=Sim!Cur0+WeightGeneAi4; for ( j = 1; j = LenB; j+ )/ 情况1: 不插入空格基因A第i位和基因B第jSimCurj = Sim!Curj-1 + / 情况2: 在基因A第i位插入空格和基因B第jSimCurj=max(SimCurj,SimCurj-1+Weight4GeneBj/ 情况3: 在基因B第j位插入空格和基因A第iSimCurj = max( SimCurj, Sim!Cu
5、rj + WeightGeneAi4 NOI2003DNA分子的最佳比对,Fjoi2003 目录。LenA,LenB GeneA,GeneB 对应显然更不容易出错。579494040-NOI2003 福建省选手选拔赛试试题三、DNA 分子的最佳比对(本题满分 40 分问题描述苷酸组成的长链,这四种核苷酸分别是腺嘌呤核苷酸(用 A 代表、鸟嘌呤核苷酸(用 G 代表、胞嘧啶核苷酸(C 代表)和胸腺嘧啶核苷酸(T 代表A,T,C,G的字符串来表示一个 DNA 分子序列,如 CGTTAGA在生物进化过程中,DNA分子可能发生各种各样的突变。这种突变形成了生物遗传信(1)(2)DNA(3)DNADNAD
6、NA序列在同样的位 DNAT =ATCAG,T2=ACTAG,可以按如下方式比对,1:T“-C-T(1) (2) (3)023编程任务DNA数据输入INPUT3.*21DNAT , 2DNAT25000。序列中的结果输出DNA输入文件示输出示Human Gene Time Limit:1000MSMemoryLimit:10000K Total Submit:2255 Accepted:1440It is well known that a human gene can be considered as a sequence, consisting of fournucleotides,whi
7、charesimplydenotedbyfourletters,A,C,G,andT.Biologists have been interested in identifying human genes and determining their functions, because these can be used to diagnose human diseases and to design new drugs for A human gene can be identified through a series of time-consuming biological experim
8、ents,oftenwiththehelpofcomputerprograms.Onceasequenceofageneis obtained, the next job is to determine its function.One of the methods for biologists to use in determining the function of a new gene sequence that they have just identified is to search a database with the new gene as a query.Thedataba
9、setobesearchedstoresmanygenesequencesandtheirfunctionsmanyresearchershavebeensubmittingtheirgenesandfunctionstothedatabaseand the database is freely accessible through the Internet.Adatabasesearchwillreturnalistofgenesequencesfromthedatabasethatare similar to the query gene.Biologistsassumethatseque
10、ncesimilarityoftenimpliesfunctionalsimilarity.So,the function of the new gene might be one of the functions that the genes from the list have. To exactly determine which one is the right one another series of biological experiments will be needed.Your job is to make a program that compares two genes
11、 and determines their similarityasexplainedbelow.Yourprogrammaybeusedasapartofthedatabase search if you can provide an efficient one.GiventwogenesAGTGATGandGTTAG,howsimilararethey?Oneofthemethods to measure the similarityoftwogenesiscalledalignment.Inanalignment,spacesareinserted,ifnecessary,in appr
12、opriate positions ofthegenestomakethemequallylongandscoretheresultinggenesaccordingtoa scoring matrix.For example, one space is inserted into AGTGATG to result in AGTGAT-G, and threespacesareinsertedintoGTTAGtoresultinGT-TAG.Aspaceisdenotedbya minus sign (-). The two genes are now of equallength.The
13、setwostringsareAGTGAT-GT-In this alignment, there are four matches, namely, G in the second position, T in the third,Tinthesixth,andGintheeighth.Eachpairofalignedcharactersisassigneda score according to the following scoring matrix.denotesthataspace-spacematchisnotallowed.Thescoreofthealignmentabove
14、is Ofcourse,manyotheralignmentsarepossible.Oneisshownbelow(adifferent number of spaces are inserted into different positions):-GTTA-This alignment gives a score of (-3)+5+5+(-2)+5+(-1) +5=14. So, this one is better thanthepreviousone.Asamatteroffact,thisoneisoptimalsincenootheralignment can have a higher score. So, it is said that thesimilarityofthetwogenesisThe input consists of T test cases. The number of test cases ) (T is given in the first lineoftheinputfile.Eachtestcaseconsistsoftwolines:eac
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2030年中国真空断路器行业市场发展趋势与前景展望战略研究报告
- 2024-2030年中国皮肤美容产品行业市场发展趋势与前景展望战略研究报告
- 2024-2030年中国白乳胶行业发展趋势及发展前景研究报告
- 2024-2030年中国男式手机皮套市场发展分析及市场趋势与投资方向研究报告
- 2024-2030年中国电视机接收器行业市场发展分析及商业模式与投融资战略研究报告
- 2024-2030年中国电磁除铁器行业发展分析及投资风险预测研究报告
- 2024-2030年中国电泳显示器行业市场发展趋势与前景展望战略研究报告
- 2024-2030年中国电子手表行业市场发展分析及竞争策略与投资前景研究报告
- 2024-2030年中国甲巯咪唑行业市场运行分析及投资价值评估报告
- 2024-2030年中国生物降解树脂市场发展现状及未来趋势研究研究报告
- 山东省滨州市滨城区2023-2024学年九年级上学期期中考试数学试题
- 老年人噎食的预防与急救处理
- 26个字母练字帖打印
- 昏迷患者应急预案及抢救
- 班组长质量控制培训课件
- 运输合同样本:车辆运输合同样本电子版
- 名著导读《我胆小如鼠》
- 《厄尔尼诺现象》课件
- 贵州省六盘水山脚树煤矿“9.24”火灾事故专项安全风险辨识评估报告
- 新SAT真题分享:2017-03-U.S(学习资料)
- 初中人教版劳动教育教案
评论
0/150
提交评论