差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
oboファイルからのgo関連の複数項目の抽出 [2018/05/22 07:29] – 作成 133.11.222.89 | oboファイルからのgo関連の複数項目の抽出 [Unknown date] (現在) – 削除 - 外部編集 (Unknown date) 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== ファイルの中身を見てみる ====== | ||
- | < | ||
- | format-version: | ||
- | data-version: | ||
- | subsetdef: goantislim_grouping " | ||
- | subsetdef: gocheck_do_not_annotate "Term not to be used for direct annotation" | ||
- | subsetdef: gocheck_do_not_manually_annotate "Term not to be used for direct manual annotation" | ||
- | subsetdef: goslim_agr "AGR slim" | ||
- | ... | ||
- | [Term] | ||
- | id: GO:0000001 | ||
- | name: mitochondrion inheritance | ||
- | namespace: biological_process | ||
- | def: "The distribution of mitochondria, | ||
- | synonym: " | ||
- | is_a: GO:0048308 ! organelle inheritance | ||
- | is_a: GO:0048311 ! mitochondrion distribution | ||
- | |||
- | [Term] | ||
- | id: GO:0000002 | ||
- | name: mitochondrial genome maintenance | ||
- | namespace: biological_process | ||
- | def: "The maintenance of the structure and integrity of the mitochondrial genome; includes replication and segregation of the mitochondrial chromosome." | ||
- | is_a: GO:0007005 ! mitochondrion organization | ||
- | |||
- | [Term] | ||
- | id: GO:0000003 | ||
- | name: reproduction | ||
- | namespace: biological_process | ||
- | alt_id: GO:0019952 | ||
- | alt_id: GO:0050876 | ||
- | ... | ||
- | </ | ||
- | |||
- | 各Termのブロック内のid, | ||
- | |||
- | ======Termブロックが最後まで法則性を保っているかテスト====== | ||
- | Termの数がid, | ||
- | < | ||
- | [kijima.yusuke@m48 Uniprot_swiss]$ grep -E " | ||
- | 47179 | ||
- | [kijima.yusuke@m48 Uniprot_swiss]$ grep -E " | ||
- | 47189 | ||
- | [kijima.yusuke@m48 Uniprot_swiss]$ grep -E " | ||
- | 47189 | ||
- | [kijima.yusuke@m48 Uniprot_swiss]$ grep -E " | ||
- | 47189 | ||
- | </ | ||
- | 数にずれがある。ファイルの末尾を見てみると | ||
- | < | ||
- | [kijima.yusuke@m48 Uniprot_swiss]$ tail -n 20 go.obo | ||
- | namespace: external | ||
- | xref: RO:0002213 | ||
- | holds_over_chain: | ||
- | is_a: regulates ! regulates | ||
- | transitive_over: | ||
- | |||
- | [Typedef] | ||
- | id: regulates | ||
- | name: regulates | ||
- | namespace: external | ||
- | xref: RO:0002211 | ||
- | is_transitive: | ||
- | transitive_over: | ||
- | |||
- | [Typedef] | ||
- | id: starts_during | ||
- | name: starts_during | ||
- | namespace: external | ||
- | xref: RO:0002091 | ||
- | |||
- | [kijima.yusuke@m48 Uniprot_swiss]$ grep " | ||
- | 10 | ||
- | </ | ||
- | 変なのが含まれており、その数がちょうど10個なので一応解決。 | ||
- | |||
- | ====== 抜き出して並べてみる ====== | ||
- | awkを使う。 | ||
- | <code awk> | ||
- | [kijima.yusuke@m48 Uniprot_swiss]$ cat go.obo | awk ' | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | </ | ||
- | |||
- | いい感じ。行数と末尾をチェックしてみても | ||
- | <code awk> | ||
- | [kijima.yusuke@m48 Uniprot_swiss]$ cat go.obo | awk ' | ||
- | 47179 | ||
- | [kijima.yusuke@m48 Uniprot_swiss]$ cat go.obo | awk ' | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | GO: | ||
- | </ | ||
- | |||
- | はい。 |