使用deeptools畫熱圖和平均圖

ATAC后續(xù)可視化生成的熱圖和平均圖可以用R包進行繪制,我這里選的是deeptools里的bamCoverage和computeMatrix功能

deeptools安裝是用conda一鍵式安裝,我直接安在base環(huán)境下,不需要再另外配置環(huán)境

看一下deeptools的手冊,可以更快幫助自己了解deeptools的參數(shù)


先將之前bowtie比對的bam文件進行歸一化,轉為bigwig文件

需要用samtools先建索引:ls *.rmdum.bam |xargs -i samtools index {}

bamCoverage命令轉bw文件,-b是輸入文件,-o是是輸出文件

bamCoverage -b /home/huilin_hu/Arabidopsis/output/5.clean/57.bowtie.clean.sort.exc.sort.reheader.rmdup.bam -o 57.bw


根據(jù)computeMatrix畫熱圖

computeMatrix 有兩種不同的模式

reference-point(relative to a point): 計算某個點的信號豐度

scale-regions(over a set of regions): 把所有基因組區(qū)段縮放至同樣大小,然后計算其信號豐度

我這里是輸入多個樣本

-b 10000是指上游區(qū)域10000bp -a是指下游區(qū)域10000bp

-R是擬南芥基因組注釋文件中提取的bed文件,共三列,染色體,起始坐標和終止坐標

-S是bamCoverage轉的bw文件

會輸出兩個文件:matrix1_test_TSS.gz? regions1_test_genes.bed 自己命名就好,這兩個文件用于后期畫熱圖和平均圖

computeMatrix reference-point --referencePoint TSS -p 15 \

-b 10000 -a 10000? ? \

-R /home/huilin_hu/Arabidopsis/output/5.clean/genes.bed \

-S /home/huilin_hu/Arabidopsis/output/5.clean/*.bw? \

--skipZeros? -o matrix1_test_TSS.gz? \

--outFileSortedRegions regions1_test_genes.bed

使用上述命令的時候運行的比較慢

plotHeatmap -m matrix1_test_TSS.gz -out 57_Heatmap_1K.png

我這里會報這個錯,但是也出圖了,下方所示,這個錯誤的網(wǎng)址目前我沒打開

Bad key "text.kerning_factor" on line 4 in

/home/huilin_hu/miniconda3/lib/python3.7/site-packages/matplotlib/mpl-data/stylelib/_classic_test_patch.mplstyle.

You probably need to get an updated matplotlibrc file from

https://github.com/matplotlib/matplotlib/blob/v3.1.3/matplotlibrc.template

or from the matplotlib source distribution

平均圖:plotProfile -m matrix1_test_TSS.gz -out 57_test.png

最后編輯于
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

友情鏈接更多精彩內(nèi)容