Rosalind第70题:Global Alignment with Scoring Matrix

Problem

To penalize symbol substitutions differently depending on which two symbols are involved in the substitution, we obtain a scoring matrix  in which  represents the (negative) score assigned to a substitution of the th symbol of our alphabet  with the th symbol of .

gap penalty is the component deducted from alignment score due to the presence of a gap. A gap penalty may be a function of the length of the gap; for example, a linear gap penalty is a constant  such that each inserted or deleted symbol is charged ; as a result, the cost of a gap of length  is equal to .

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

Return: The maximum alignment score between  and . Use:

  • The BLOSUM62 scoring matrix.
  • Linear gap penalty equal to 5 (i.e., a cost of -5 is assessed for each gap symbol).
  • 为了根据替换涉及哪两个符号来不同地惩罚符号替换,我们获得一个得分矩阵  在其中  表示分配给替代项的(负)得分 我们字母的th符号  与 的符号 。

    缺口罚分是从比对得分扣除组分由于一个存在间隙。空位罚分可以是空位长度的函数。例如, 线性间隙罚分是一个常数 这样每个插入或删除的符号都会收费 ; 结果,长度差距的代价 等于 。

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

    返回值:之间的最大对齐分数 和 。采用:

  • BLOSUM62得分矩阵。
  • 线性间隙罚分等于5(即,每个间隙符号的评估成本为-5 )。

Sample Dataset

>Rosalind_67
PLEASANTLY
>Rosalind_17
MEANLY

Sample Output

8
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值