Hi-Cのコンタクトマップの書き方を日本語で解説しているのってほとんどなくなーい?
ということで人柱になりたいと思います。
Hi-Cの日本語解説ついては以下のスライドが神です。
https://biosciencedbc.jp/gadget/human/170901_higashi_170831.pdf
プロトコルについては以下の論文が現状ベストプラクティスと思います。
https://pubmed.ncbi.nlm.nih.gov/31919520/
コンタクトマップ作成について
コンタクトマップ作成ではほんとはHiC-Proが一番いいらしいですが、今回はJuicer使います。
Step.1 Juicerをダウンロード
git clone https://github.com/theaidenlab/juicer.git
# 新しくフォルダを作る
mkdir <myJuicerDir>
# 作ったフォルダに移動する
cd <myJuicerDir>
# juicerというディレクトリにあるCPUというフォルダにシンボリクリンクをはる
ln -s /path/to/juicer/CPU scripts
# つぎにscriptsフォルダに移動
cd scripts/common
# juicerのツールをダウンロード
wget https://hicfiles.tc4ga.com/public/juicer/juicer_tools.1.9.9_jcuda.0.8.jar
# これに対してもシンボリックリンクをはる
ln -s juicer_tools.1.9.9_jcuda.0.8.jar juicer_tools.jar
Step.2 リファレンスゲノムの準備
# 先ほど作った<myJuicerDir>に移動
cd /path/to/<myJuicerDir>
# referenceという名前のフォルダを作成
mkdir references
# そこにリファレンスとなるfastaファイルを入れる
# かりにref.fastaとする
# 制限酵素サイトを示したファイルを収納するフォルダを作成
mkdir restriction_sites
# restirction_sitesディレクトリに移動
cd restriction_sites
# 制限酵素サイトのファイルを作成
python /path/to/juicer/misc/generate_site_positions.py \
python /path/to/juicer/misc/generate_site_positions.py \
DpnII \
ref \
/path/to/references/ref.fasta
# ファイル名には自動的に制限酵素名(この場合だとDpnII)が付加されるので書かなくて大丈夫
# chrom.sizeファイルの作成
awk 'BEGIN{OFS="\t"}{print $1, $NF}' ref_DpnII.txt > ref_DpnII.chrom.size
# restirction_sitesディレクトリでBWA用のindex作成
cd references
bwa index ref.fasta
Step.3 fastqファイル用のディレクトリ作成
# 適当なディレクトリ名でフォルダ作成
mkdir <sample_name>
# そこに移動して
cd <sample_name>
# さらにfastqという名前のファイルを作成する これ大事!
mkdir fastq
# この中にfastqファイルを持ってくる
Step.4 Mapping
以下をqsubした
# !/bin/sh
# $ -S /bin/sh
# $ -cwd
# $ -l s_vmem=80G -l mem_req=8G -pe def_slot 10
export PATH=$PATH:~/miniconda3/bin/
# たぶんほんとはこれいらない。自分の環境構築に問題あり。。
/path/to/scripts/juicer.sh \
-t 10 \
-d /path/to/<sample_name> \
-D /home/ahosakanig/<myJuicerDir> \
-s DpnII \
-z /path/to/references/[].fasta \
-y /path/to/restriction_sites/[]_DpnII.txt \
-p /path/to/restriction_sites/[]_DpnII.chrom.size
そうするとfastq
フォルダにaligned
というのが出来上がる。
ここに入っているinter.hic
がコンタクトマップ
これをJuicebox アプリで読み込むと完成!
ダウンロードは以下から。
https://github.com/aidenlab/Juicebox/wiki/Download
描けたが、ここからが大変なんでしょう、きっと。まだカバレッジもデータも足りないのでこれからがんばる。