東京大学 新領域創成科学研究科 メディカル情報生命専攻 2024年1月実施 問題12
Author
Description
ナノポアシークエンサーは DNA 配列を電流値の変化を通して読み取ることができる。 ある DNA 配列を読み取ったところ、時間 でそれぞれ読み取られた電流値列は であった。 この DNA 配列には基準配列が含まれていることが分かっており、基準配列を単独で読み取ったときの電流値列は時間 に対して であった(基準波形)。 このとき、 の中で基準配列に相当する時間区間を見つけたい。
DNA 配列を読み取る速度にはばらつきがあり急な変動があるため、基準配列を探す場合には時間軸方向へのずれを許したい。 このため、 (ただし に対して , は正の整数) が存在して と が対応していると仮定する。 読み取りノイズ等が無ければ が成立して欲しいが、実際には読み取りノイズや電流値読み取りタイミングのずれを考慮して、相違度 が最小値をとるような対応関係 が基準波形とナノポアシークエンサー出力の一部分との正しい対応関係を示していると仮定する。
(1) とする。相違度が最小となる を1つ求めるアルゴリズムを示せ。
(2) とする。相違度が最小となる , の組を1つ求めるアルゴリズムを示せ。
(3) はどのような物理条件に対応していると考えられるか。1行で説明せよ。
(4) は と が対応しているときの、基準配列 に対する の相違度の最小値である。 を用いて を表せ。
(5) 基準配列 に対する の相違度の最小値を計算するアルゴリズムを示し、その時間計算量を , , を用いて示せ。
题目描述
纳米孔测序仪以电流变化读取 DNA。某待测序列在时刻 的电流为
已知其中包含一段参考序列;单独读取参考序列时,在 得到参考波形
由于读取速度波动,需要允许时间轴错位。假设存在对应位置
且对相邻参考时刻(原文此处排作 1 leq t < m)
其中 为正整数。把参考波形与测序输出部分的差异度定义为
并以使其最小的 作为正确对应。结合上图回答:
- 当 时,给出求一组最优 的算法。
- 当 时,给出求一组最优 的算法。
- 用一行说明参数 对应何种物理限制。
- 定义 :在 与 对应的条件下,参考前缀 与输出前缀 的最小差异度。用满足 的先前状态 表示 ,并体现单调对应与相邻位置差不超过 的约束。
- 设计计算完整参考波形 对 最小差异度的算法,并用 表示时间复杂度。
考点
- 带时间扭曲的序列比对:把参考采样点单调映射到观测时间轴,并以平方误差作为局部匹配代价。
- 受限动态规划:以 表示固定末端配对的最优前缀误差,只在由 限定的前驱窗口中取最小值。
- 复杂度分析:根据 个状态及每个状态至多检查 个前驱,给出朴素算法关于 的时间界。
Kai
1. Finding for
When , the problem reduces to finding a single time point such that the dissimilarity is minimized. The algorithm can be described as follows:
- Initialize to 1.
- For each , compute the dissimilarity .
- Find the index that minimizes .
The resulting will be the index that minimizes the dissimilarity.
Algorithm
Input: A sequence {A_t}, reference value B_1
Output: Index p_1 that minimizes dissimilarity
1. Initialize min_dissimilarity = infinity
2. Initialize p_1 = 1
3. For i = 1 to n do
d_i = (B_1 - A_i)^2
If d_i < min_dissimilarity then
min_dissimilarity = d_i
p_1 = i
4. Return p_1
2. Finding for
When , the problem involves finding two indices and such that and . The goal is to minimize the dissimilarity . The algorithm can be described as follows:
- Initialize minimum dissimilarity to infinity and to 1.
- For each , do:
- For each , do:
- Compute the dissimilarity .
- If , update , , and .
- For each , do:
Algorithm
Input: A sequence {A_t}, reference values {B_1, B_2}, window W
Output: Indices p_1, p_2 that minimize dissimilarity
1. Initialize min_dissimilarity = infinity
2. Initialize p_1, p_2 = 1
3. For i = 1 to n do
For j = i to min(i + W, n) do
d_ij = (B_1 - A_i)^2 + (B_2 - A_j)^2
If d_ij < min_dissimilarity then
min_dissimilarity = d_ij
p_1 = i
p_2 = j
4. Return p_1, p_2
3. Physical Meaning of
The parameter represents the maximum allowable fluctuation in the time axis when matching the reference signal to the nanopore sequencer output. It accounts for variations in the speed at which the DNA is read, allowing for some flexibility in aligning the sequences.
4. Recursive Formula for
The minimum dissimilarity can be computed using the following recurrence relation:
5. Algorithm for Minimum Dissimilarity for
To calculate the minimum dissimilarity between the sequence and the reference signal , we use a dynamic programming approach.
- Initialize a 2D array of size with infinity, where represents the minimum dissimilarity for the first elements of the reference sequence mapped to the first elements of the output sequence.
- Set for all .
- For each , do:
- For each , do:
- Set .
- For each , do:
Time Complexity
The time complexity of this algorithm is , where:
- is the length of the reference signal,
- is the length of the sequence ,
- is the maximum allowed shift between adjacent points.
Knowledge
难点思路
本题的主要难点在于第 4 和第 5 问,需要正确地推导出动态规划的递推关系,并设计出高效的算法。关键是要理解如何处理时间轴偏移的约束条件,以及如何在保证正确性的同时优化算法的时间复杂度。
解题技巧
对于序列对齐问题,动态规划是一种有效的解决方案。特别是在处理时间序列中的波动和对齐问题时,可以灵活调整对齐窗口 来达到最优匹配。
重点词汇
- Dissimilarity: 相异度
- Reference Signal: 参考信号
- Window: 窗口
参考资料
- Dynamic Time Warping Algorithm: Introduction to the dynamic time warping algorithm, Wikipedia.
- Time Series Analysis and Its Applications, Third Edition, Robert H. Shumway and David S. Stoffer.