Deeptools: Chip-seq数据质量控制

Deeptools 对数据质量控制的命令包含如下

  • plotCorrelation
  • plotPCA
  • plotFingerprint
  • bamPEFragmentSize
  • computeGCBias
  • plotCoverage

可视化工具1 plotCorrelation

使用场景: 计算不同样本的相关性

输入 multiBigwigSummary or multiBamSummary 产生的table文件

输出:相关性热图,或者散点图

Deeptools: Chip-seq数据质量控制-图片1

Deeptools: Chip-seq数据质量控制-图片2

  1. $ deepTools2.0/bin/plotCorrelation \
  2. -in scores_per_transcript.npz \
  3. --corMethod pearson --skipZeros \
  4. --plotTitle "Pearson Correlation of Average Scores Per Transcript" \
  5. --whatToPlot scatterplot \
  6. -o scatterplot_PearsonCorr_bigwigScores.png   \
  7. --outFileCorMatrix PearsonCorr_bigwigScores.tab
  8.  
  9. deepTools2.0/bin/plotCorrelation \
  10.    -in readCounts.npz \
  11.    --corMethod spearman --skipZeros \
  12.    --plotTitle "Spearman Correlation of Read Counts" \
  13.    --whatToPlot heatmap --colorMap RdYlBu --plotNumbers \
  14.    -o heatmap_SpearmanCorr_readCounts.png   \
  15.    --outFileCorMatrix SpearmanCorr_readCounts.tab

主要参数

  1. --corData, -in : multiBigwigSummary 或者 multiBamSummary输出的压缩矩阵文件
  2. --corMethod, -c 对样品进行聚类的方法,选项有spearman, pearson
  3. --whatToPlot, -p:选择出图样式,选项有heatmap, scatterplot
  4. --plotFile, -o 根据后缀名选择输出的文件,可以选择.png, .eps, .pdf and .svg.
  5. --skipZeros 没有mapping的跳过
  6. --labels, -l: 输入样品名称,不同样品用空格隔开
  7. --plotTitle, -T:出图的标题
  8. --plotFileFormat 输出格式png, eps, pdf and svg.
  9. --removeOutliers 去除掉异常值
  10. --outFileCorMatrix 输出样品间相关系数的矩阵
  11. --plotHeight :图的高度,单位是cm
  12. --plotWidth:图的宽度,单位是cm
  13. --zMin, -min: 设置最小的值
  14. --zMax, -max 设置最大的值
  15. --colorMap 设置颜色,颜色表查询位置http://matplotlib.org/examples/color/colormaps_reference.html
  16. --xRange,--yRange: 设置x,y的范围

可视化工具2 plotPCA

使用场景: 画各个样品的主成分图

输入文件,multiBamSummary 和multiBigwigSummary 计算的结果,输出: 图

Deeptools: Chip-seq数据质量控制-图片3

  1. $ deepTools2.0/bin/plotPCA -in readCounts.npz \
  2. -o PCA_readCounts.png \
  3. -T "PCA of read counts"

重要参数

  1. --corData, -inmultiBamSummary multiBigwigSummary
  2. --plotFile, -o 根据后缀名选择输出的文件,可以选择.png, .eps, .pdf and .svg.
  3. --labels, -l: 输入样品名称,不同样品用空格隔开
  4. --plotTitle, -T:出图的标题
  5. --plotFileFormat 输出格式png, eps, pdf and svg.
  6. --plotHeight :图的高度,单位是cm
  7. --plotWidth:图的宽度,单位是cm
  8. --outFileNameData 输出画PCA的数据
  9. --ntop 选择top N行的数字进行画图,默认是1000
  10. --PCs 默认是12 ,用于画图的主成分
  11. --log2 计算PCA时候,对数字进行log2转换,为了避免0,所有数字加上0.01
  12. --colors 设置颜色,如 red blue green

可视化工具3 plotFingerprint

使用场景:检测Chip-seq相对背景是否有显著的富集。

怎么样的chip-seq是比较好的?

Deeptools: Chip-seq数据质量控制-图片4

左图a是最理想的富集。图c是input和treat并不明显

Deeptools: Chip-seq数据质量控制-图片5

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

 

  1. -b: 输入文件,比对的bam文件
  2. --plotFile, -o 根据后缀名选择输出的文件,可以选择.png, .eps, .pdf and .svg.
  3. --outRawCounts 输出每个bincounts数目
  4. --ignoreDuplicates:是否忽略掉重复的reads
  5. --minMappingQuality 去除低比对质量的比对结果
  6. --centerReads reads are centered with respect to the fragment length。这个参数我不是很理解,师弟给我画了个图

Deeptools: Chip-seq数据质量控制-图片6

 

  1. --samFlagInclude/--samFlagExclude : 根据sam文件的flag进行挑选和过滤reads
  2. --minFragmentLengthATAC-seq 设定的参数,FragementLength的长度
  3. --labels, -l 空格输入的标签
  4. --binSize, -bs 设置bin的大小
  5. --numberOfProcessors, -p 线程数
  6. --region, -r 限定的用于分析的
  7. --plotFile, -o 根据后缀名选择输出的文件,可以选择.png, .eps, .pdf and .svg.
  8. --plotTitle, -T:出图的标题
  9. --skipZeros 没有mapping的跳过

可视化工具4 plotCoverage

使用场景,计算bam的覆盖度

输入 bam文件,输出 图

Deeptools: Chip-seq数据质量控制-图片7

  1. $ plotCoverage -b H3K4Me1.bam H3K4Me3.bam H3K27Me3.bam H3K9Me3.bam
  2.    --plotFile example_coverage
  3.    -n 1000000
  4.    --plotTitle "example_coverage" \
  5.    --outRawCounts coverage.tab \
  6.    --ignoreDuplicates \
  7.    --minMappingQuality 10 \
  8.    --region 19
  9.  
  10. # have a look at the optional tabular output: each row represents the number of reads overlapping with a sampled bp
  11. $ head coverage.tab
  12.    'H3K27me3'        'H3K4me1'       'H3K4me3'       'H3K9me3'
  13.    0 0       0       0
  14.    0 0       0       0
  15.    0 0       0       0
  16.    0 0       0       0
  17.    0 0       0       0
  18.    0 0       0       0
  19.    0 0       0       0
  20.    0 0       0       0
  21.    0 0       0       0

参数:

  1. -b: 输入文件,比对的bam文件,用空格分开不同的bam文件
  2. --plotFile, -o 根据后缀名选择输出的文件,可以选择.png, .eps, .pdf and .svg.
  3. --outRawCounts 输出每个bincounts数目
  4. --ignoreDuplicates:是否忽略掉重复的reads
  5. --minMappingQuality 去除低比对质量的比对结果
  6. --centerReads reads are centered with respect to the fragment length。这个参数我不是很理解,师弟给我画了个图
  7. --samFlagInclude/--samFlagExclude : 根据sam文件的flag进行挑选和过滤reads
  8. --minFragmentLengthATAC-seq 设定的参数,FragementLength的长度
  9. --labels, -l 空格输入的标签
  10. --binSize, -bs 设置bin的大小
  11. --numberOfProcessors, -p 线程数
  12. --region, -r 限定的用于分析的
  13. --plotFile, -o 根据后缀名选择输出的文件,可以选择.png, .eps, .pdf and .svg.
  14. --plotTitle, -T:出图的标题
  15. --skipZeros 没有mapping的跳过
  16. --numberOfSamples, -n 抽样次数,default1 million.

manual https://deeptools.readthedocs.io/en/latest/content/tools/plotFingerprint.html

发表评论

匿名网友

拖动滑块以完成验证
加载失败