![]() |
ノート/シーケンサ出力の解読https://pepper.is.sci.toho-u.ac.jp:443/pepper/index.php?%A5%CE%A1%BC%A5%C8%2F%A5%B7%A1%BC%A5%B1%A5%F3%A5%B5%BD%D0%CE%CF%A4%CE%B2%F2%C6%C9 |
![]() |
ノート
訪問者数 2086 最終更新 2019-05-21 (火) 13:23:40
拡張子 AB1 (AB-one) や ABI (AB-ai) の付いたファイルは、Applied Biosystems社の 3100/3130/3500/3730 (xlを含む)シーケンサの出力として得られるデータで、 下記の資料にある書式を持つ、バイナリファイルである。
http://www6.appliedbiosystems.com/support/software_community/ABIF_File_Format.pdf (リンク切れ?)
https://projects.nfstc.org/workshops/resources/articles/ABIF_File_Format.pdf
フォーマットにのっとって実データを解釈してみよう。
フォーマットを簡単に整理すると、
struct DirEntry{ SInt32 name; //tag name この先頭エントリでは'tdir' SInt32 number; //tag number この先頭エントリでは1 SInt16 elementtype; //element type code この先頭エントリでは1023 SInt16 elementsize; //size in bytes of one element この先頭エントリでは28 SInt32 numelements; //number of elements in item SInt32 datasize; //size in bytes of item SInt32 dataoffset; //item's data, or offset in file SInt32 datahandle; //reserved }たとえば次のようなデータ(ファイルの16進ダンプ、od -Ax -txCa ABIF.ab1 > ABIF.ab1.hexで作成)の場合、
000000 41 42 49 46 00 65 74 64 69 72 00 00 00 01 03 ff A B I F nul e t d i r nul nul nul soh etx del 000010 00 1c 00 00 00 77 00 00 0e 00 00 03 3a cf 00 00 nul fs nul nul nul w nul nul so nul nul etx : O nul nulDirEntryに当てはめると、
033ac0 d8 27 e7 27 f3 28 04 28 0e 28 18 28 21 28 2e 41 X ' g ' s ( eot ( so ( can ( ! ( . A 033ad0 45 50 74 00 00 00 01 00 04 00 02 00 00 00 01 00 E P t nul nul nul soh nul eot nul stx nul nul nul soh nul 033ae0 00 00 02 2b 34 00 00 00 00 00 00 41 45 50 74 00 nul nul stx + 4 nul nul nul nul nul nul A E P t nul 033af0 00 00 02 00 04 00 02 00 00 00 01 00 00 00 02 2b nul nul stx nul eot nul stx nul nul nul soh nul nul nul stx + 033b00 34 00 00 00 00 00 00 41 50 46 4e 00 00 00 02 00 4 nul nul nul nul nul nul A P F N nul nul nul stx nul 033b10 12 00 01 00 00 00 13 00 00 00 13 00 01 90 19 00 dc2 nul soh nul nul nul dc3 nul nul nul dc3 nul soh dle em nul 033b20 00 00 00 41 50 58 56 00 00 00 01 00 13 00 01 00 nul nul nul A P X V nul nul nul soh nul dc3 nul soh nul 033b30 00 00 02 00 00 00 02 32 00 00 00 00 00 00 00 41 nul nul stx nul nul nul stx 2 nul nul nul nul nul nul nul A 033b40 50 72 4e 00 00 00 01 00 13 00 01 00 00 00 17 00 P r N nul nul nul soh nul dc3 nul soh nul nul nul etb nulこれを解読すると、
[0] name AEPt^A, tagnum 1, e_type 4, e_size 2, num_e 1, datasize 2, offset 2b340000 11060 0 [1] name AEPt^B, tagnum 2, e_type 4, e_size 2, num_e 1, datasize 2, offset 2b340000 11060 0 [2] name APFN^B, tagnum 2, e_type 18, e_size 1, num_e 19, datasize 19, offset 19019 >>> ^RKB_3730_POP7_BDTv3 [3] name APXV^A, tagnum 1, e_type 19, e_size 1, num_e 2, datasize 2, offset 32000000 2^@ [4] name APrN^A, tagnum 1, e_type 19, e_size 1, num_e 23, datasize 23, offset 3005e >>> 06IsUD ̄,??8or96-PCRstop^@ [5] name APrV^A, tagnum 1, e_type 19, e_size 1, num_e 2, datasize 2, offset 37000000 7^@ [6] name APrX^A, tagnum 1, e_type 2, e_size 1, num_e 4560, datasize 4560, offset 30075 >>> (略)のようになっている。但し、
このようにして、データを読み取ることができる。
サンプルプログラムをreadabif.cに掲げる。あくまでサンプルである。
ABIFの情報は、シーケンスに関する値が書かれており、それは次のようなタグに対応する。(一部のみ紹介)