寫在前面
以下內(nèi)容均來自我在菲沙基因(Frasergen)暑期生信培訓(xùn)班上記錄的課堂筆記
1.Compartment計算
2.Compartment 分析流程
-
2.1 Cworld-dekker軟件的安裝
git clone https://github.com/blajoie/cworld-dekker.git
#Change directory to the `cworld-dekker` and install the `Perl` module:
perl Build.PL
./Build
./Build install --install_base /your/custom/dir
(ensure /your/custom/dir is added to your PERL5LIB path)
#e.g.
./Build install --install_base ~/perl5
# then in .bashrc
export PERL5LIB=${PERL5LIB}:/home/<yourusername>/perl5/lib/perl5
-
2.2 分析所用數(shù)據(jù)
互作圖譜分染色體matrix數(shù)據(jù)拟枚,如何獲得請看:生信 | 三維基因組技術(shù)(三):Hi-C 數(shù)據(jù)比對及HiC-Pro的使用
-
2.3 為矩陣添加header
header文件需要自己準備鹉动,操作采用cworld的addMatrixHeaders為矩陣文件添加header
perl -I /software/cworld-dekker/ \
/software/cworld-dekker/scripts/perl/addMatrixHeaders.pl \
-i data/example.matrix \
--xhf data/headerxchr1 \
--yhf data/headerychr1
-I
:添加cworld的庫浓瞪,連接到cworld軟件所在目錄即可
-i
:matrix 文件
--xhf
:橫坐標表頭
--yhf
:縱坐標表頭
自制Header文件姥闭,橫縱坐標可以相同,形如:
結(jié)果文件
-
2.4 扣除背景/計算z-scale
操作采用cworld的matrix2loess.pl
#export PATH=/software/R/R-3.5.0/bin/:$PATH
#export PATH=/software/bedtools/bedtools2-2.28.0/bin/:$PATH
perl -I /software/cworld-dekker/ \
/software/cworld-dekker/scripts/perl/matrix2loess.pl \
-i example.addedHeaders.matrix.gz
結(jié)果文件以zScore.matrix.gz結(jié)尾
-
2.5 轉(zhuǎn)換相關(guān)矩陣與PCA分析同時進行
采用cworld的matrix2EigenVectors.py贪染,需要給一個example_gene.bed文件
python software/cworld-dekker/scripts/python/matrix2EigenVectors.py \
-i example.addedHeaders.zScore.matrix.gz \
-r data/example_gene.bed
結(jié)果文件以compartments結(jié)尾
另外生成的圖片以compartments.png結(jié)尾
定義基因密度較高的區(qū)域為compartmentsA逊桦,反之為compartmentsB