版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年护理文书书写题库及答案
- 2026年高考语文诗歌鉴赏真题试题与答案
- 浙江省道路危险货物运输企业安全生产风险分级管控实施指南
- 2026届重庆市六年级英语小升初分班考模拟卷含阅读完形书面表达答案解析与评分标准
- 服装生产安全规则
- 某电子厂产品测试办法
- 某服装厂生产排程细则
- 初中三年级英语复习话题单元“计划与安排”(Plans and Arrangements)深度整合教案
- 高职市场营销专业三年级《职场述职报告的结构解构与效能评估》教学设计
- 企业资源整合计划沟通联系函(3篇范文)
- 2023年嘉兴市招聘警务辅助人员考试真题及答案
- 苏教版数学五年级上册 第七单元测试卷(含答案)
- 人教版小学生必背古诗词(129首完整版)
- CCMD3中国精神障碍分类与诊断标准第3版
- 铁总-2014-11-2(铁路建设项目质量安全事故与招标投标挂钩办法铁总建设(2014)-290号)
- 重庆国隆农业科技产业发展集团有限公司招聘考试真题2022
- 钢结构工程施工工法
- YS/T 320-2014锌精矿
- LY/T 2842-2017林业常用药剂合理使用准则(一)
- 3到6岁幼儿园识字表
- GB/T 233-2000金属材料顶锻试验方法
评论
0/150
提交评论