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 .
A 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