明 細 書
配列探索システムおよび探索プログラム
技術分野
[0001] 本発明は、複数の配列中、類似する配列の位置を探索する方法およびプログラム に関する。
背景技術
[0002] 配列の探索方法においては、長い文字列からなるデータベース中から、クエリー配 列に類似の文字列がある領域 (類似領域)を探すこと、特にゲノム配列のような少な い種類の文字で構成される大きなデータベースに対して、クエリー配列と一致もしく は類似の文字列が存在する領域を探索する。このような手法は、クエリー配列の類似 領域を高速に推定する方法は近年爆発的に増力 tlしている生物学的情報の処理方法 として重要である。
[0003] たとえば、ゲノム配列中から遺伝子の領域を推定する方法において、もしくは大規 模な文章中から文字の置換、挿入、損を許して検索する必要のあるような検索方法 において重要である。
特許文献 1: WO03Z056458号公報
発明の開示
発明が解決しょうとする課題
[0004] たとえば、配列力 タエリー配列に類似する領域を探索するアルゴリズム(以下、「 配列写像アルゴリズム」とも称する。)として、動的プログラミング手法と比較して高速 であるため、 Fastaや Blastのような heuristicアルゴリズムが用いられている。また、 250 万個のヒト EST (長さ数百から 1万程度)を約 30億個の塩基力もなるゲノム配列に写 像する場合に、ヒト ESTをェクソンに分割しながらゲノム配列に写像する際に、長い ギャップを少数だけ挿入するようなアルゴリズムにより、高速に EST配列をァラインメ ントできる手法が特許文献 1に開示されて 、る。
[0005] し力しながら、これらアルゴリズムは、多くの処理時間を必要とする。また、二つの配 列感の類似性を解くことのみのために設計されているため、 ESTを、既知のコードィ匕
すべきゲノムに射影することができない。以下、二つの配列中の類似する部分を探索 するための技術の例について説明する。
[0006] [ハッシュテーブルを利用した類似位置推定方法]
クエリー配列をデータベース配列上に高速にァライメントするために、データベース 配列に対して、ゲノム配列中に現れる短!、配列(以降索引単語とする)をキーとする ノ、ッシュテーブルを構成して、それを用いてその所在を高速に探し出す方法がある。 ここで索引単語とは、例えばデータベース配列上の全ての 12merの配列でもよいし、 不連続な配列であってもよい。また、例えば空白文字で囲まれた単語であってもかま わない。
[0007] 「シングルヒット法による類似位置推定方法」
索引単語をキーとする索引が作成された上記ハッシュテーブルもしくはルックアップ テーブルを用いて、クエリー配列中にある単語がハッシュテーブル中の索引単語に あるかどう力、そしてその索引単語はデータベース中どの位置にあつたのかを調べる ことによって、クエリー配列の類似位置を推定する方法が提案されている。ここでいう シングルヒット法とは、ハッシュテーブルもしくはルックアップテーブルに対してひとつ の単語について調べ、そのデータベース中での該当位置を取得し、その該当位置周 辺を類似領域の候補とする手法を ヽぅ。
[0008] また、 N— hit法は、シングルヒット法と同様に、索引単語を用いて索引が作成された 上記ハッシュテーブルもしくはルックアップテーブルを用いて、クエリー配列中の各々 の単語がデータベース中のどの位置にあるのか調べることによって、クエリー配列の 類似位置を推定する方法である。 N— hit法においては、クエリー配列の N箇所の単 語がその位置関係を保存したまま、データベース配列中に現れることを条件にして、 その該当位置周辺を類似領域の候補とする。ここで、 N= lの時に、 N— hit法はシン ダルヒット法と同じになる。
[0009] 従来の N— hit法は、以下の手法で類似領域の候補を見出して 、る。まず、データ ベース配列に対して作成されたルックアップテーブルの表を、クエリー配列の各単語 に対して索引する。次いで、ルックアップテーブルから取り出されたデータベース配 列中の位置力 該当する単語が、クエリー配列上にあった位置を引いた値 (対角位
置とする)を全ての該当箇所に対して求める。それらの値全体を例えばマージソート することによって、対角位置を昇順に並べ、同じ対角位置を与える単語を探すことに よって、 N— hitを見つけることができる。この手法を用いると、クエリー配列の単語に 対するデータベース上の位置の候補数の合計を Nとすると、時間計算量で 0(Nlog N)、空間計算量で O(N)必要である。
[0010] 本発明は、時間計算量および空間計算量が改善された、高速な配列の探索システ ムおよびプログラムを提供することを目的とする。
課題を解決するための手段
[0011] 本発明の目的は、第 1の配列から、第 2の配列と類似する位置を探索する配列探索 システムであって、
配列を構成する所定の長さの部分列中、第 1の配列中の各要素力 延びる当該所 定の長さの部分列の出現位置を格納する第 1のテーブルと、
第 2の配列中の各要素力 延びる当該所定の長さの部分列に対応する、前記第 1 のテーブル中の、前記第 1の配列の部分列に関する出現位置を取得する出現位置 取得手段と、
前記第 2の配列の部分列に関する出現位置および第 1の配列の部分列に関する 出現位置に基づく構造体を、前記第 2の配列の部分列に関する出現位置と、第 1の 配列の部分列に関する出現位置との間の差異にしたがってヒープに投入することに より、ヒープを形成するヒープ形成手段であって、前記形成されたヒープの根に、前 記差異が同一の構造体が所定回数表れるときに、当該構造体を取り出して、その情 報を記憶装置に記憶するヒープ形成手段と、
前記取り出された、差異が同一の構造体の第 1の配列の部分列に関する出現位置 と、前記第 2の配列の部分列に関する出現位置とから、少なくとも所定の長さ以上、 第 1の配列および第 2の配列とがー致する位置を特定する類似位置特定手段とを備 えたことを特徴とする配列探索システムにより達成される。
[0012] 本発明において、出現位置取得手段は、第 1のテーブル中の要素に対して配置さ れたポインタが指し示す値を取得し、その後、ポインタを移動させるように構成しても 良い。或いは、出現位置を示す第 2のテーブルを生成し、当該第 2のテーブルを参
照しても良い。
[0013] たとえば、前記第 2の部分列 qkの第 2の配列中の出現位置を query(qk)、第 1の配列 中の部分列 qkの出現位置を db(qk)とするときに、前記ヒープ形成手段が、構造体とし て、(query(qk),db(qk》を生成するのが望まし!/、。
[0014] 或いは、第 2の配列の部分列 qkの第 2の配列中の出現位置を query(qk)、第 1の配 列中の部分列 qkの出現位置を db(qk)とするときに、ヒープ形成手段が、構造体として
、(query(qk)- db(qk))または (db(qk)- query(qk)と、前記部分列 qkの第 2の配列における 出現位置を表わす IDとの組を生成しても良い。
[0015] 好ましい実施態様においては、前記ヒープ形成手段が、第 2の配列の部分列と、第
2の配列の他の部分列との間の距離が所定の値を超えた場合には、前記他の部分 列を、前記ヒープ形成処理の処理対象から除外する。これにより、処理時間をより短 縮することが可能となる。
[0016] また、本発明の別の実施態様において、第 1の配列から、第 2の配列と類似する位 置を探索する配列探索システムであって、
配列を構成する所定の長さの部分列中、第 1の配列中の各要素力 延びる当該所 定の長さの部分列の出現位置を格納する第 1のテーブルと、
第 2の配列中の各要素力 延びる当該所定の長さの部分列に対応する、前記第 1 のテーブル中の、前記第 1の配列の部分列に関する出現位置を取得する出現位置 取得手段と、
前記第 2の配列の部分列に関する出現位置および第 1の配列の部分列に関する 出現位置に基づく第 1の構造体を形成するとともに、前記第 2の配列の他の部分列 に関する出現位置および第 1の配列の部分列に関する出現位置に基づく第 2の構造 体を形成し、前記第 1の構造体における、前記第 2の配列の部分列に関する出現位 置と、第 1の配列の部分列に関する出現位置との間の差異と、前記第 2の構造体に おける前記第 2の配列の部分列に関する出現位置と、第 1の配列の部分列に関する 出現位置との間の差異とがー致するときに、前記第 1の構造体および第 2の構造体を 取り出して、それらの情報を記憶する比較手段と、
前記取り出された、差異が同一の構造体の第 1の配列の部分列に関する出現位置
と、前記第 2の配列の部分列に関する出現位置とから、少なくとも所定の長さ以上、 第 1の配列および第 2の配列とがー致する位置を特定する類似位置特定手段とを備 えている。
[0017] たとえば、前記第 2の配列の部分列を qi、他の部分列を qjとしたときに、前記比較手 段力 qi=(ql,q2," ',qQ- 1)および qj=(q2,〜,qQ)として、 qiに関する第 1の構造体と、 qj に関する第 2の構造体との間で比較を実行する。
[0018] 別の好ま 、実施態様にぉ 、ては、前記第 2の配列の部分列を qi、他の部分列を qj としたときに、前記比較手段が、 qi=(ql ,q2, · · · ,qQ- 1)および q2=(qi+l , · · -max(qi+k,qQ) として、 qiに関する第 1の構造体と、 q2に関する第 2の構造体との間で比較を実行す る。
[0019] また、本発明の目的は第 1の配列から、第 2の配列と類似する位置を探索するため に、配列を構成する所定の長さの部分列中、第 1の配列中の各要素から延びる当該 所定の長さの部分列の出現位置を格納する第 1のテーブルを備えたコンピュータを、 前記第 1のテーブルに基づいて、第 2の配列中の各要素力 延びる当該所定の長 さの部分列に対応する、前記第 1のテーブル中の、前記第 1の配列の部分列に関す る出現位置を取得する出現位置取得手段と、
前記第 2の配列の部分列に関する出現位置および第 1の配列の部分列に関する 出現位置に基づく構造体を、前記第 2の配列の部分列に関する出現位置と、第 1の 配列の部分列に関する出現位置との間の差異にしたがってヒープに投入することに より、ヒープを形成するヒープ形成手段であって、前記形成されたヒープの根に、前 記差異が同一の構造体が所定回数表れるときに、当該構造体を取り出して、その情 報を記憶装置に記憶するヒープ形成手段と、
前記取り出された、差異が同一の構造体の第 1の配列の部分列に関する出現位置 と、前記第 2の配列の部分列に関する出現位置とから、少なくとも所定の長さ以上、 第 1の配列および第 2の配列とがー致する位置を特定する類似位置特定手段として 機能させることを特徴とするコンピュータにより読み取り可能な配列探索プログラムに よっても達成される。
[0020] さらに、本発明の目的は、第 1の配列から、第 2の配列と類似する位置を探索するた
めに、配列を構成する所定の長さの部分列中、第 1の配列中の各要素力も延びる当 該所定の長さの部分列の出現位置を格納する第 1のテーブルを備えたコンピュータ を、
第 2の配列中の各要素力 延びる当該所定の長さの部分列に対応する、前記第 1 のテーブル中の、前記第 1の配列の部分列に関する出現位置を取得する出現位置 取得手段と、
前記第 2の配列の部分列に関する出現位置および第 1の配列の部分列に関する 出現位置に基づく第 1の構造体を形成するとともに、前記第 2の配列の他の部分列 に関する出現位置および第 1の配列の部分列に関する出現位置に基づく第 2の構造 体を形成し、前記第 1の構造体における、前記第 2の配列の部分列に関する出現位 置と、第 1の配列の部分列に関する出現位置との間の差異と、前記第 2の構造体に おける前記第 2の配列の部分列に関する出現位置と、第 1の配列の部分列に関する 出現位置との間の差異とがー致するときに、前記第 1の構造体および第 2の構造体を 取り出して、それらの情報を記憶する比較手段と、
前記取り出された、差異が同一の構造体の第 1の配列の部分列に関する出現位置 と、前記第 2の配列の部分列に関する出現位置とから、少なくとも所定の長さ以上、 第 1の配列および第 2の配列とがー致する位置を特定する類似位置特定手段として 機能させることを特徴とするコンピュータにより読み取り可能な配列探索プログラムに よっても達成される。
発明の効果
[0021] 本発明によれば、時間計算量および空間計算量が改善された、高速な配列の探索 システムおよびプログラムを提供することが可能となる。
発明を実施するための最良の形態
[0022] 以下、添付図面を参照して、本発明の実施の形態について説明する。図 1は、本発 明の実施の形態に力かる配列探索システムの概略を示すブロックダイヤグラムである 。本実施の形態において、配列探索システムは、ゲノム配列中、 EST配列に類似す る位置を推定する。図 1に示すように、配列探索システム 10は、ゲノム配列に基づく 第 1のルックアップテーブル (LUT)を生成するゲノム配列 LUT生成部 12と、 EST配
列に関する第 2の LUTを生成する EST配列 LUT生成部 14と、ヒープを構築するヒ ープ形成処理部 16と、後述する値の対 (位置の対)に基づいて類似する配列の位置 を抽出する Nhit抽出部 18と、 LUTや処理結果を記憶する記憶装置 20とを有してい る。記憶装置 20は、 RAMなどのメモリやハードディスク装置などの外部記憶装置を 含む。配列探索システムは、コンピュータにより実現でき、配列探索プログラムをコン ピュータにインストールし、これを起動することにより、コンピュータが、ゲノム配列 LU T生成部、 EST配列生成部、ヒープ形成処理部および Nhit抽出部として機能する。
[0023] なお、本実施の形態にぉ ヽては説明を容易にするために、 EST配列 LUT生成部 14を設け、 EST配列 LUT生成部 14が第 2の LUTを生成している力 これは必須の ものではなぐ後述するように、第 1の LUTのみを生成し、第 1の LUTの要素に対す るポインタを配置することで、第 2の LUTの要素に相当する値を適切に取得すること はできる。
[0024] 本発明の第 1の実施の形態においては、クエリー配列 (本実施の形態では EST配 列)の長さを Qとすると、時間計算量 0(NlogQ)、空間計算量 O(Q)となる。また、後述 する第 2の実施の形態においては、時間計算量 0(N~2)、空間計算量 O(l)となる。第 1の実施の形態および第 2の実施の形態とも、 Ν— hitの条件 (クエリー配列の N個の 単語とデータベース配列の N個の単語が位置関係を保存して発見される条件)を満 たす対角位置を抽出することを目的としている。
[0025] 以下、第 1の実施の形態に力かる配列探索システム 10にて実行される処理につい て説明する。ゲノム配列 LUT生成部 12は、記憶装置に記憶されたゲノム配列のデ ータを読み出し、第 1の LUTを生成する。第 1の LUTは、所定の長さの N— mer配列 のそれぞれが、ゲノム配列中のどの位置に出現するかを示す。つまり、各 N— mer配 列の出現位置が格納される。図 2Aはゲノム配列の例を示す図、図 3は、図 2Aに示 すゲノム配列に基づ 、て、 2— mer配列の出現位置が格納された第 1の LUTの例を 示す。
[0026] 次!、で、 EST配列 LUT生成部 14は、第 1の LUTを参照して、 EST配列を構成す る N— mer配列のそれぞれに、当該 N— mer配列が出現するゲノム配列中の位置を格 納したような第 2の LUTを生成する。ここで、 EST配列を構成する N— mer配列は、 E
STの各要素を先頭として N個の要素からなる。したがって、第 2の LUTにおいては、 (N-Q + 1)個の配列のそれぞれにつ 、て、当該配列につ 、て格納されて 、た第 1 の LUTの値が収容される。図 4は、図 2Bに示す EST配列を構成する 2— mer配列の それぞれが、図 2Aのゲノム配列中に出現する位置を示した LUTの例を示す。図 4に おいて、先頭の行 (符号 401参照)には、 EST配列中の先頭の 2— mer配列「GC」が 、ゲノム配列において出現する位置「8、 23、 25, 29」が示される。次の行 (符号 402 参照)には、 EST配列中の次の 2— mer配列「CA」力 ゲノム配列において出現する 位置「26」が示される。なお、処理の便宜のため、それぞれの値の組の末尾には、別 の値「φ」が格納される。
[0027] ルックアップテーブル (LUT)には、キーとなる配列が出現する位置を保存して!/、る 。第 1の実施の形態に力かる手法では、 LUT中の配列の出現位置が位置によってソ ートされていることが望ましい。これは、第 1の実施の形態においては、各配列につい て出現位置順に LUTから取り出すためである。このような LUTは、ゲノム配列 LUT 生成部 12や EST配列 LUT生成部 14力 記憶装置に記憶されたデータに基づ!/、て LUTを生成する際に、出現位置の小さなものから順に作成してゆくことで実現できる
[0028] 以下の説明において、 LUTのキーとなる 2— merの配列を、複数の文字からなる単 語と考えることもできるため、「単語」とも称する。 EST配列(以下、機能面力も「クエリ 一配列」とも称する。 )において、類似位置推定に使用する単語を ql,q2,q3,....,qQと する。また、単語 qkが出現するデータベース上の位置は、長さ nlのリスト db(qk)で与え られるものとする。また、単語 qkが出現するクエリー配列上の位置は query(qk)で与え られるものとする。リスト db(qk)の各要素 db(qk)l,db(qk)2,...,db(qk)nlは出現位置順に ソートされている。
[0029] 次に、ヒープ形成処理部 16における処理について、図 5のフローチャートを参照し て説明する。ヒープには、 ql,..,qQの各単語の最初の出現位置とクエリー配列での出 現位置との対角位置〔db(qk)l
- query(qk)〕、および、単語 qkのクエリー配列上の位置を特定するための ID〔k、 qk、 或いは、 query(qk)〕が対となった構造体が格納される (ステップ 501)。或いは、ヒープ
には、単語 qkのデータベース上の出現位置 db(qk)およびクエリー配列上の出現位置 query(qk)が対となった構造体が格納されてもょ 、 (ステップ 501)。後述する具体例 では、後者にしたがって形成された構造体が利用される。
[0030] ここで、これらの構造体は、対角位置とクエリー単語の出現位置の大小関係によつ て構築され (つまり、対角位置の大小関係を優先し、対角位置が等しい場合は、タエ リー単語の出現位置の大小関係を用いる。)、現在ヒープ中にある最小の対角位置 を与える構造体力 順に取り出すことができる。
[0031] 次いで、ヒープ形成処理部 16は、ヒープ中の最小の対角位置を与える構造体を取 得し
ステップ 502)、その構造体カもクエリー配列上の位置を特定するための ID(k)を取り 出し (ステップ 503)、その IDが示すリスト db(qk)力も次の要素を新しく取得して、構造 体を作成し、ヒープに入れる (ステップ 504)。リスト db(qk)から取得する要素がなくなつ たら、ヒープ形成処理部 16は、ヒープには何もいれない。ヒープ形成処理部 16は、 取得した構造体を、直前までに取得した構造体と比較して (ステップ 505)、連続して N回以上の等しい、若しくは、幅 k以下の距離にある対角位置を与える場合、対角位 置とクエリー配列上の位置関係を出力する (ステップ 506)。
[0032] ヒープ形成処理部 16は、ヒープに構造体がなくなるまで、ステップ 502— 507を繰り 返す (ステップ 507参照)。このようにすると、 N-hitの条件を満たす対角位置を抽出 することができる。
[0033] このように、第 1の実施の形態では、ヒープを利用して、ヒープのルートに(y— X)が 最小となるような値の組が位置するようにしておく。そして、このルートの構造体を順 に取り出すことで、(y— X)の値が昇順となるような構造体群を取得することができる。ヒ ープから、(y— X)の値が等しいような構造体が N回取り出すことができれば、それが N-hitとなる。
[0034] 図 2A—図 4に示したゲノム配列および EST配列に関して、ヒープ形成処理部 16の 処理をより具体的に説明する。図 6に示すように、まず、先頭の単語「ql = GC」のタエ リー配列(つまり EST配列)上の出現位置「query(ql)= 1」と、当該単語のデータべ一 ス上(つまりゲノム配列上)の出現位置「db(ql) = 8」との対( 1、 8)がヒープに入れられ
る。なお、この対の構造体 (x, y)に関して、ヒープは「y— x」の大小関係で構成される
[0035] 次いで、図 7に示すように、次の単語「q2=AG」のクエリー配列上の出現位置「 query(q2) = 2」と、当該単語のデータベース上の出現位置「db(q2) = 26」との対の構 造体(2, 26)がヒープに入れられる。ここでは上記「y— x」の大小関係が考慮される。 このように、図 8—図 10に示すように、クエリー配列の出現位置(を示す値)が進むよ うに、それぞれの単語 q3— q5の、クエリー配列上の出現位置(「3」一「5」)およびデー タベース上の出現位置 (それぞれ、「7」、 「6」、 「2」)の対の構造体がヒープに入れら れる。
[0036] 全ての単語 qk (その出現位置「query(qk)」 )につ!/、て、対の構造体をヒープに入れ た状態を図 11に示す。この状態において、ヒープ中の最小の構造体 (つまりヒープに おいてルートに位置する構造体(11, 2)が取り出され、記憶装置 20中に記憶される 。図 12は、ヒープにおいて構造体(11, 2)が取り出された状態を示す。
[0037] 構造体が取り出されると、当該取り出された構造体に対応する単語の、次のデータ ベース上の出現位置「db(qk)= 14」が取得されて、対の構造体(11, 14)がヒープに 入れられる(図 13参照)。
[0038] これにより、「y— x」が最小となる対の構造体 (8, 4)がヒープから取り出され、記憶装 置 20中に記憶される。図 14は、ヒープにおいて構造体 (8, 4)が取り出された状態を 示す図である。次いで、当該取り出された構造体に対応する単語の、次のデータべ ース上の出現位置「db(qk) = 24」が取得されて、対の構造体(8, 24)がヒープに入れ られる(図 15参照)。
[0039] ここでも、「y— x」が最小となる対の構造体(9, 5)がヒープから取り出され、記憶装置 20中に記憶される。図 16は、ヒープにおいて構造体(9, 5)が取り出された状態を示 す図である。なお、取り出された構造体に対応する単語の次のデータベース上の出 現位置は「 φ」であるため、「query(qk) = 9」に関する処理は終了する。そこで、次の 単語 (つまり、「query(qk)= 10」)について、構造体(10, 6)が取り出されて記憶装置 に記憶され(図 17参照)、さらに、次の構造体(10, 17)を形成してヒープに入れられ る(図 18参照)。
[0040] このような構造体のヒープへの投入、所定の条件の下でのヒープの取り出し Z記憶 を繰り返すことにより、取り出された順で、図 19Aに示すような構造体の列を作ること ができる。これら構造体の「y— x」は、図 19Bに示すように、ソートされている。したがつ て、 N— hit算出部 18は、連続で同じ値が並んでいるものと N— hitとして取り出す。取 り出された構造体の情報 (位置情報など)は、記憶装置 20に記憶される。図 20Aは、 取り出された構造体の値「y— x」を示し、図 20Bは、図 20Aの値に対応する構造体を 示す。
[0041] 図 21は、 N— hit算出部 18により取り出された構造体に基づいて、ゲノム配列にお いて、 EST配列と類似する部分が見出された状態を示す図である。たとえば、図 20 Bに示す「y— x=— 4」の構造体の組(8, 4)、 (9, 5)および(10, 6)から、クエリー配 列(つまり EST配列)の「8」の位置から「10」の位置までの要素(この例では 2— mer配 列)と、データベース上の配列(つまりゲノム配列)の「4」の位置から 6の位置までの要 素とがー致することが理解できる (符号 2101、 2102参照)。なお、図 2A等で示した 例において、ゲノム配列の位置は先頭で「0」をとり、 EST配列の位置は先頭で「1」を とっている。
[0042] また、図 20Bに示す「y— x= 7」の構造体の組(1, 8)、 (6, 13)、 (10, 17)および( 11, 18)から、クエリー配列の「1」の位置、「6」の位置、「10」の位置および「11」の位 置の要素と、データベース上の配列の「8」の位置、「13」の位置、「17」の位置および 「18」の位置の要素とがー致することが理解できる(符号 2103、 2104参照)。他の部 分についても同様に、それぞれの配列において類似する要素をもつ位置を特定する ことが可能である。
[0043] 次に、本発明の第 2の実施の形態について説明する。図 1ではヒープを形成してい るが、第 2の実施の形態ではヒープを形成せず、対角位置を逐一比較している。第 2 の実施の形態に力かる配列探索システムでは、図 1のヒープ形成処理部の代わりに、 比較処理部が配置される。
[0044] 比較処理部では、以下の処理が実行される。図 22は本実施の形態に力かる比較 処理部で実行される処理を示すフローチャートである。
[0045] 比較処理部は、単語 =
(ql,...,qQ- 1)の各々、および、単語 qj = (q2,...,qQ)の各々について、 qiと qjの与える対 角位置を比較して、等しい対角位置を与える組を得る (ステップ 2201)。
db(qi)l - query(qi),db(qi)2 - query(qi),… , db、qi)x - query、qi)
db(qj)l - query(qj),db、qj)2 - query(qj),…, db(qj)y - query(qj)
つまり、上記のようなリストを、 db(ql)l- query(ql)および db(q2)l- query(q2)の組から 順に比較し、小さいほうを大きいほうより大きくなるまで進めることを繰り返し、その過 程で等 U、対角位置を与える組を得る。
[0046] 等 、対角位置を与える組を発見した場合、比較処理部は、その組を記憶装置に 記憶するとともに、単語 qi側で、その対角位置を与えるデータベース上の位置を重複 して発見しないために、リストから除外する(ステップ 2202)。或いは、ステップ 2201 を繰り返す際に、等しい対角位置を与える組を無視する。
[0047] リストから除外されたものを除く全ての組について処理が終了すると (ステップ 2203 でイエス (Yes))、比較処理部は、記憶装置に記憶された等しい対角位置を与える組 を取得した後、対角位置とクエリー配列での出現位置の大小関係でソートし (ステツ プ 2204)、連続して N回以上の、若しくは幅 k以下の距離にある対角位置を与える場 合、対角位置とクエリー配列上の位置関係を出力する (ステップ 2205)。このような処 理によっても、 N-hitの条件を満たす対角位置を抽出することができる。
[0048] 図 2A—図 4に示したゲノム配列および EST配列に関して、比較処理部の処理をよ り具体的に説明する。まず、図 23に示すように、 db(ql)l-query(ql)と、
db(q2)l-query(q2)とを比較する。上記例では、先頭の単語の「8—1」と次の単語の「2 6—2」とが比較される。ここでは、「26—2>8—1」のため、単語 qlのデータベース上の 出現位置が進められ、 db(ql)2-query(ql)と、 db(q2)l-query(q2)とが比較される(図 24 参照)。ここでも、「26— 2> 23—1」であるため、さらに単語 qlのデータベース上の出 現位置が進められ、 db(ql)3-query(ql)と、 db(q2)l-query(q2)とが比較される(図 25参 照)。ここで、「26— 2 = 25— 1」となるため、(query(qk),db(qk)の組(2, 26)および(1, 25)が、それぞれ記憶装置 20に記憶される。引き続く比較において、(
query(q2),db(q2)2) = (2, φ )であるため、この組の処理は終了する。
[0049] 単語 q2に関する処理は終了したため、次に、単語 qlおよび単語 q3に関して処理が 進められる。ここでは、 db(ql)l- query(ql)と、 db(q3)l- query(q3)とが比較される(図 26 参照)。「7—3< 8—1」であるため、 db(q3)が進められて、 db(ql)l-query(ql)と、 db(q3)2- query(q3)とが比較される(図 27参照)。ここでは、「16— 3 >8— 1」であるため 、 db(ql)が進められる。このような処理を必要な (qi,qj)の組について繰り返し、 db(qi)- query(qi)と db(qj)- query(qj)との差が同一となるような、(query(qi),db(qi))よび( query(qj),db(qj))の組を記憶装置に記憶しておく。
[0050] その後、比較処理部は、抽出した値の組を、 db(qk)- query(qk)の値でソートする(ス テツプ 2206)。この値が同じ場合には、 query(qk)の値に従う。つまり、昇順のソートで あれば、 query(qk)の値が小さいほうが、先頭に近い位置に配置される。これにより、 図 19Aと同様の結果を得ることができる。
[0051] 本発明は、以上の実施の形態に限定されることなぐ特許請求の範囲に記載された 発明の範囲内で、種々の変更が可能であり、それらも本発明の範囲内に包含される ものであることは言うまでもない。
[0052] たとえば、前記実施の形態においては、ゲノム配列生成部 12が、第 1の LUTを生 成し、 EST配列 LUT生成部 14力 第 2の LUTを生成している力 このような構成をと らずとも本発明を実現することができる。他の例においては、ゲノム配列生成部 12は 、第 1の LUTを生成する。その一方、第 2の LUTは生成されず、したがって、 EST配 列 LUT生成部 14は存在しない。その代わりに、第 1の LUTへのポインタを生成して ポインタを制御し、 db(qk)の値を第 1の LUTから取り出すことができるようにするポイン タ制御部が設けられれば良い。この構成では、ポインタは、第 1の LUTにおいて、ク エリー配列の部分列 qkと同じ値の部分列に設けられていれば良い。たとえば、上述し た例では、第 1の LUTにおいて、「GC」、「CA」、「AG」、「GA」、「AT」、「TA」、「A C」、「CG」および「GG」についてポインタを配置しておけばよい。初期的には、ポィ ンタは、第 1の LUTにおける先頭の値に位置する。
[0053] たとえば、第 1の実施の形態に力かる処理において、ヒープ形成部 16が、 DB20中 に記憶されたクエリー配列の所定の部分列 qkを参照し、第 1の LUT中、部分列 qkに
一致する値に関するポインタを参照して、 db(qk)を特定することができる。これにより、 (query(qk),db(qk))を得ることができる。値を得た後、ポインタ制御部力 参照された ポインタを一つ進めればょ 、。
[0054] また、第 1の実施の形態のステップのステップ 502以降において、抽出して連続し て N回近い対角位置を与える場合を調べる際に、クエリー配列上での単語の距離が 指定の距離よりも遠い場合を除外することで、おこる確率が極めて低い 2hitを検出し ないことが可能である。
[0055] また、第 2の実施の形態において、 qi=(ql,...,qQ- l),qj=(q2,...,qQ)として qiおよび qj に関する逐一比較を実行した力 おこる確率が極めて低い 2hitを検出しないために、 qi=(ql,...,qQ- l),q2=(qi+l,...,max(qi+k,qQ》として、 qiおよび q2に関する逐一比較を 実行しても良い。
[0056] さらに、上記実施の形態によれば、 N-hitによってァライメント候補地点を推定するこ とができる力 クエリー配列とデータベース配列のすべての N-hitを出力すると、 N-hit が存在しない領域力 Sタエリー配列中に存在することがわかる。これらは、クエリー配列 とデータベース配列には、相同領域がないことを示している。クエリー配列中にその ような N-hitが存在しない領域が一定以上存在する場合に、相同領域がないものとし て詳細なァライメントをする必要はなぐァライメントプログラムにおいて、このような条 件分岐によって、ァライメントの枝力りを行うことで効率ィ匕を図ることが可能である。
[0057] また、前記実施の形態にお!、て、理解を容易にするために、部分列として 2— mer 配列を利用した力 これに限定されず、 N— mer (たとえば 8— mer)配列を利用しても 良いことは言うまでもない。
[0058] また、本発明によれば、時間計算量の改善 (処理の高速化)、空間計算量の改善( 必要なメモリ量の削減)に加え、以下のような利点がある。
[0059] 文字 (遺伝子)の置換、挿入、損を許して検索することにより、文字の読み取りミス( ゲノムの読み取りミス)が生じた場合でも適用することができる。また、異種の動物のゲ ノム間でも高速かつ正確な候補を挙げることが可能となる。さらに、たんぱく質力 推 定される核酸配列をゲノムにァライメントすることに適用可能である。
[0060] さらには、一般の文書、たとえば、特許明細書などで、検索したい言葉が等距離で
出てくるものを一緒にして抽出することなどに適用することも可能である。
産業上の利用可能性
[0061] 本発明は、たとえば、ゲノム配列のように比較的少ない種類のかつ大量な文字で構 成されるデータベースにおいて、クエリー配列と一致若しくは類似する文字列が存在 する領域を高速に探索することができる。また、上述したように、一般の文書において も、検索したい言葉が問う郷里で出てくるものを抽出することも可能である。したがつ て、本発明は、種々のデータベースにおける文字列の探索、抽出に利用することが 可能である。
図面の簡単な説明
[0062] [図 1]図 1は、本発明の実施の形態に力かる配列探索システムの概略を示すブロック ダイヤグラムである。
[図 2]図 2Aは、本実施の形態において、ゲノム配列の例を示す図、図 2Bは EST配 列の例を示す図である。
[図 3]、図 3は、図 2Aに示すゲノム配列に基づいて、 2— mer配列の出現位置が格納 された第 1の LUTの例を示す図である。
[図 4]図 4は、図 2Bに示す EST配列を構成する 2— mer配列のそれぞれ力 図 2Aの ゲノム配列中に出現する位置を示した LUTの例を示す図である。
[図 5]図 5は、本実施の形態にカゝかるヒープ形成処理部にて実行される処理を示すフ ローチャートである。
[図 6]図 6は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図で ある。
[図 7]図 7は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図で ある。
[図 8]図 8は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図で ある。
[図 9]図 9は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図で ある。
[図 10]図 10は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図
である。
[図 11]図 11は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図 である。
[図 12]図 12は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図 である。
[図 13]図 13は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図 である。
[図 14]図 14は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図 である。
[図 15]図 15は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図 である。
[図 16]図 16は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図 である。
[図 17]図 17は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図 である。
[図 18]図 18は、ヒープ形成処理部の実行により形成されるヒープを具体的に示す図 である。
[図 19]図 19Aは、ヒープ力も取り出された構造体群を示す図、図 19Bは、各構造体 に基づく値「y— x」を示す図である。
[図 20]図 20Aは、取り出された各構造体の値「y— x」を示す図、図 20Bは対応する構 造体群を示す図である。
[図 21]図 21は、 N— hit算出部により取り出された構造体に基づいて、ゲノム配列にお いて、 EST配列と類似する部分が見出された状態を示す図である。
[図 22]図 22は、本実施の形態にカゝかる比較処理部で実行される処理を示すフロー チャートである。
[図 23]図 23は、第 2の実施の形態に力かる構造体の比較を具体的に示す図である。
[図 24]図 24は、第 2の実施の形態に力かる構造体の比較を具体的に示す図である。
[図 25]図 25は、第 2の実施の形態に力かる構造体の比較を具体的に示す図である。
[図 26]図 26は、第 2の実施の形態に力かる構造体の比較を具体的に示す図である。
[図 27]図 27は、第 2の実施の形態に力かる構造体の比較を具体的に示す図である。 符号の説明
10 配列探索システム
12 ゲノム配列 LUT生成部
14 EST配列 LUT生成部
16 ヒープ形成処理部
18 N— hit抽出部
20 記憶装置