Cor-relation plot

2022-03-31  本文已影响0人  余绕
1. Generate npz files
#BSUB -J blast
#BSUB -n 10
#BSUB -R span[hosts=1]
#BSUB -o %J.out
#BSUB -e %J.err
#BSUB -q normal

cd /public/home/qtxu/Data/Chenxiaoyang/eChIP_data/H3K9hib/co_relation

multiBamSummary bins -bs 1000 --bamfiles \
            /public/home/qtxu/Data/Chip_seq_data/Published_data/H3K23ac/MSU/H3K23ac_rmp.bam\
            /public/home/qtxu/Data/Chip_seq_data/Published_data/H3K27me3/MSU/H3K27me3_rmp.bam \
            /public/home/qtxu/Data/Chip_seq_data/Published_data/H3K4ac/MSU/H3K4ac_rmp.bam   \
            /public/home/qtxu/Data/Chip_seq_data/Published_data/H3K9_kac/MSU/H3K9ac_rmp.bam \
            /public/home/qtxu/Data/Chip_seq_data/Published_data/H3K9me1/MSU/H3K9me1_rmp.bam \
            /public/home/qtxu/Data/Chip_seq_data/Published_data/H3K9me3/MSU/H3K9me3_rmp.bam \
            /public/home/qtxu/Data/Chip_seq_data/Published_data/H4_K16ac/MSU/H4K16ac_rmp.bam \
                        H3K9ac.bam \
                        /public/home/qtxu/Data/Kbu_Kcr/Novo_data/Bu_ChIP-seq/N1/MSU_New/N1_rmp_Bu.bam \
                        /public/home/qtxu/Data/Kbu_Kcr/Novo_data/Chip-seq/N1/MUS_7.0_new/N1_cr_rmp.bam \
                        /public/home/qtxu/Data/Chip_seq_data/Published_data/H3K4me3/WT_H3K4me3_rmp.bam \
                         --extendReads 130 -out treat_results.npz

2. Example 1:Scatterplot
    plotCorrelation \
    -in readCounts.npz \
    --corMethod spearman --skipZeros \
    --plotTitle "Spearman Correlation of Read Counts" \
    --whatToPlot heatmap --colorMap RdYlBu --plotNumbers \
    -o heatmap_SpearmanCorr_readCounts.png   \
    --outFileCorMatrix SpearmanCorr_readCounts.tab
image.png
3. Example 2:Heatmap
   plotCorrelation \
    -in readCounts.npz \
    --corMethod spearman --skipZeros \
    --plotTitle "Spearman Correlation of Read Counts" \
    --whatToPlot heatmap --colorMap RdYlBu --plotNumbers \
    -o heatmap_SpearmanCorr_readCounts.png   \
    --outFileCorMatrix SpearmanCorr_readCounts.tab
image.png

4. Example3. Plot PCA

plotPCA -in readCounts.npz \
-o PCA_readCounts.png \
-T "PCA of read counts"
image.png
5. Fingerprint (Bam files as input)

对样本比对结果reads累积情况进行展示。一定长度窗口(bin)上reads数进行计数,然后排序,再依次累加画图。input (能测到90%DNA片段)在基因组理论上是均匀分布,随着测序深度增加趋近于直线,实验组在排序越高的窗口处reads累积速度越快,说明这些区域富集的越特异。

image.png
$ deepTools2.0/bin/plotFingerprint \
 -b testFiles/*bam \
--labels H3K27me3 H3K4me1 H3K4me3 H3K9me3 input \
--minMappingQuality 30 --skipZeros \
--region 19 --numberOfSamples 50000 \
-T "Fingerprints of different samples"  \
--plotFile fingerprints.png \
--outRawCounts fingerprints.tab
image.png

Ref to: deepTools 使用指南 - 简书 (jianshu.com)

上一篇下一篇

猜你喜欢

热点阅读