Problem

Recall from “Edit Distance Alignment” that if  and  are the augmented strings corresponding to an alignment of strings  and , then the edit alignment score of  and  was given by the Hamming distance  (because  and  have the same length and already include gap symbols to denote insertions/deletions).

As a result, we obtain , where the minimum is taken over all alignments of  and . Strings  and  achieving this minimum correspond to an optimal alignment with respect to edit alignment score.

Given: Two protein strings  and  in FASTA format, each of length at most 1000 aa.

Return: The total number of optimal alignments of  and  with respect to edit alignment score, modulo 134,217,727 (227-1).

回想一下“编辑距离对齐”,如果 和 是对应于字符串对齐的扩展字符串 和 ,那么编辑比对得分的 和  由汉明距离给出  (因为  和 具有相同的长度,并且已经包括间隔符号以表示插入/删除)。

结果,我们获得 ,其中最小值用于  和 。弦乐 和  达到该最小值对应于关于编辑对齐分数的最佳对齐。

给出:两个蛋白质串  和 以FASTA格式,每个长度最大为1000aa。

返回值:的最佳比对总数 和 关于编辑对齐分数,取模134,217,727(2 27 -1)

Sample Dataset

>Rosalind_78
PLEASANTLY
>Rosalind_33
MEANLY

Sample Output

4

Rosalind第68题:Counting Optimal Alignments相关推荐

  1. Rosalind第88题:Counting Rooted Binary Trees

    Problem As in the case of unrooted trees, say that we have a fixed collection of  taxa labeling the  ...

  2. Rosalind第五题:计算GC内容

    问题 DNA字符串的GC含量由字符串中" C"或" G"的符号百分比给出.例如," AGCTATAG"的GC含量为37.5%.请注意,任何D ...

  3. Rosalind第四题:兔子与递归关系

    http://rosalind.info/problems/fib/ 问题 序列是对象(通常是数字)的有序集合,允许重复.序列可以是有限的也可以是无限的.两个例子是有限奇数数列和无限奇数数列.我们用这 ...

  4. [刷题]Counting Bits

    Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the ...

  5. [简单题]Counting Duplicates( Python 实现)

    题目: 原题目链接 解法一:用时:100ms def duplicate_count(text):text = text.lower()aa = [0] * len(set(text))i = 0fo ...

  6. Rosalind第八题:将RNA转化成蛋白质

    问题 通过使用英文字母中的20个字母(除B,J,O,U,X和Z以外的所有字母)缩写20个常见氨基酸.蛋白质字符串由这20个符号构成.今后,术语"遗传串"将结合蛋白质串,DNA串和R ...

  7. Rosalind第七题:孟德尔第一定律

    给定:三个正整数2,2和,2代表一个包含生物体的种群:个体是纯合的显性因子,是杂合的,是纯合的隐性因子. 回报:两个随机选择的交配有机体将产生一个具有显性等位基因的个体(从而显示显性表型)的概率.假设 ...

  8. Rosalind第10题——ros_bio10_CONS

    如果第一次阅读,请查看写在前面 #暂时发现读取fasta成为字典会让后续数据处理操作很困难,暂时以后慎用!!! #用列表进行处理将会很简单,下文copy--作者:未琢 https://www.bili ...

  9. Rosalind第11题——ros_bio11_FIBD

    如果第一次阅读,请查看写在前面 #参考--作者:未琢 https://www.bilibili.com/read/cv2017126 出处:bilibili n, m = input().split( ...

最新文章

  1. ORA-01940无法删除当前已连接用户
  2. 【Python-ML】神经网络激励函数-Sigmoid
  3. Android intent 页面跳转
  4. webpack初体验
  5. lua cocos 中对FNT字体的使用
  6. 洛谷 - P1725 琪露诺(动态规划+单调队列优化)
  7. P3639-[APIO2013]道路费用【最小生成树】
  8. 【计算机网络复习】1.2.2 OSI参考模型
  9. Spring获取前台参数的几种方式
  10. Lightroom Classic 教程,如何使用 Photoshop 和 Lightroom 优化照片?
  11. 他面前有一个人,有一把刀
  12. 一朵梨花压海棠的出处
  13. 计算机专业师范类毕业论文,师范生毕业论文范文
  14. python绝对值_python求绝对值的三种方法小结
  15. SCI文章下载、选刊、分区查询—起飞站
  16. 百度地图离线开发V2.0
  17. xmanager连接linux7桌面,使用Xmanager连接CentOS 7远程桌面
  18. apollo学习之---基础知识点学习(1)commen_math
  19. 写一个程序,判断能否形成三角形,若能,判断是等腰三角形、等边三角形、直角三角形、锐角三角形还是钝角三角形。
  20. fstream、ifstream、ofstream

热门文章

  1. STM32L4的待机模式闹钟唤醒方法
  2. Win7任务栏相关设置
  3. 小米12s ultra,索尼xperia1 iv,数码相机 拍照对比
  4. 看这篇就够了!能源企业数字化升级,推动绿色低碳发展
  5. JavaScript(九)
  6. 【Hack The Box】windows练习-- Silo
  7. 西门子_Step7软件仿真方法
  8. 全面解析Mybatis中参数处理
  9. 微信朋友圈,模仿微信朋友圈,朋友圈点赞评论
  10. miui11升级鸿蒙,MIUI11新版本推送 GPU驱动更新 小米10 Pro跑分轻松突破60万