macでインフォマティクス

macでインフォマティクス

HTS (NGS) 関連のインフォマティクス情報についてまとめています。

DNA配列中のk-merを2次元空間に視覚化する KMAP

 

 DNA配列中のパターンを同定し図示することは、様々な生物学的データ解析において極めて重要な作業である。この作業では、DNA配列の基本的な構成要素であるkmmerの集合によってパターンが表現されることが多い。これらのパターンを視覚的に明らかにするためには、各kmerを2次元空間の点に投影すればよい。しかし、この投影は、kmerの高次元の性質とそのユニークな数学的性質のために困難が伴う。そこで、本著者らはkmer多様体の特異性に対処する数学的体系を確立した。このkmer多様体理論を活用して、kmerパターンを検出し、2次元空間で可視化するKMAPと名付けた統計的手法を開発した。KMAPを3つの異なるデータセットに適用し、その有用性を示した。KMAPは、HT-SELEXデータからのモチーフ発見において、約90%の類似性を示し、古典的手法MEMEと同等の性能を達成した。ユーイング肉腫(EWS)のH3K27ac ChIP-seqデータの解析では、BACH1、OTX2、ERG1がゲノム全体のプロモーター領域やエンハンサー領域に結合することで、EWSの予後に影響を与える可能性があることを見出した。また、ETV6の分解後にFLI1がエンハンサー領域に結合することを見出し、ETV6とFLI1の競合的結合を示した。さらに、KMAPはAAVS1遺伝子座の遺伝子編集データにおいて4つの一般的なパターンを同定し、文献で報告された知見と一致した。これらの応用は、KMAPが様々な生物学的背景において価値あるツールとなり得ることを強調している。KMAPはhttps://github.com/chengl7-lab/kmapから利用できる。

 

インストール

レポジトリの指示に従ってubuntu22で環境を作ってテストした(RTX3090使用)。

Github

mamba create --name=kmap_test python=3.11 -y
conda activate kmap_test
mamba install anaconda::scipy -y
mamba install anaconda::scipy -y
mamba install anaconda::numpy -y
mamba install anaconda::matplotlib -y
mamba install anaconda::pandas -y
mamba install anaconda::click -y
mamba install anaconda::tomli-w -y
mamba install anaconda::requests -y
mamba install conda-forge::biopython -y
mamba install bioconda::logomaker -y
pip install taichi
pip install kmer-map

> kmap

$ kmap

[Taichi] version 1.7.1, llvm 15.0.4, commit 0f143b2f, linux, python 3.11.9

[Taichi] Starting on arch=cuda

GPU is available

 

This software is affiliated with the following paper:

Title: Your Paper Title

Authors: First Author, Second Author, Third Author

Journal: Journal Name

Year: 2023

DOI: https://doi.org/your-paper-doi

Usage: kmap [OPTIONS] COMMAND [ARGS]...

 

  KMAP: visualize kmers in 2d.

 

Options:

  --help  Show this message and exit.

 

Commands:

  draw_logo

  ex_hamball

  preproc

  scan_motif

  visualize_kmers

kmap visualize_kmers --help

[Taichi] version 1.7.1, llvm 15.0.4, commit 0f143b2f, linux, python 3.11.9

[Taichi] Starting on arch=cuda

GPU is available

 

This software is affiliated with the following paper:

Title: Your Paper Title

Authors: First Author, Second Author, Third Author

Journal: Journal Name

Year: 2023

DOI: https://doi.org/your-paper-doi

Usage: kmap visualize_kmers [OPTIONS]

 

Options:

  --res_dir TEXT   Result directory for storing all outputs  [required]

  --debug BOOLEAN  display debug information.

  --help           Show this message and exit.

 

 

テストラン

1、テストラン用のfastaファイルの前処理。

git clone https://github.com/chengl7-lab/kmap.git
cd kmap/
mkdir test && cp tests/test.fa test/
kmap preproc --fasta_file ./test/test.fa --res_dir ./test

 

2、モチーフのスキャン。

kmap scan_motif --res_dir ./test --debug true

10分くらいかかる。

 

3、kmersの可視化。

kmap visualize_kmers --res_dir ./test --debug True

ld_data.pdf

10分ほどかかった。

 

レポジトリより

  • ./test/config.tomlファイルを編集し、第3セクションの可視化前にn_max_iter = 2500をn_max_iter = 100に変更する。これで最適化ステップが2500から100に減り、実行時間が大幅に短縮される。

引用

KMAP: Kmer Manifold Approximation and Projection for visualizing DNA sequences

Chengbo Fu, Einari A. Niskanen, Gong-Hong Wei, Zhirong Yang, Marta Sanvicente-García, Marc Güell,  Lu Cheng

bioRxiv, Posted April 15, 2024.