https://mp.weixin.qq.com/mp/appmsgalbum

Peak calling

MACS2是被广泛使用的call peak工具,MACS3与MACS2算法差异不大,MACS2的命令基本可以直接迁移到MACS3。

  1. mkdir $wkdir/4_peakcalling
  2. cd $wkdir/4_peakcalling
  3. macs3 callpeak \
  4. -g 119481543 \
  5. -t clean_bams/ZAT6_ABA_rep1_final.bam \
  6. -c clean_bams/Col0_mock_rep1_final.bam \
  7. --name raw_peaks/ZAT6_ABA_rep1 \
  8. --format BAM \
  9. --keep-dup all \
  10. --qvalue 0.075 \
  11. --cutoff-analysis \
  12. 1>logs/ZAT6_ABA_rep1_callpeak_with_macs3.log 2>&1

Peak 过滤筛选

方法一

  1. read.table(file = "../ChIP-seq-narrow/raw_peaks/ZAT6_ABA_rep1_cutoff_analysis.txt", header = T)
  2. python scripts/plot_macs_cutoff_analysis.py \
  3. raw_peaks/ZAT6_ABA_rep2_cutoff_analysis.txt \
  4. raw_peaks/ZAT6_ABA_rep2_cutoff_analysis.pdf \
  5. 1>logs/ZAT6_ABA_rep2_plot_macs_cutoff_analysis.log 2>&1
  6. awk '$9>3' \
  7. raw_peaks/ZAT6_ABA_rep1_peaks.narrowPeak \
  8. > clean_peaks/cutoff/ZAT6_ABA_rep1_peaks.narrowPeak

方法二

  1. bedtools intersect \
  2. -f 0.5 \ # 重叠百分比
  3. -r \ # 相互重叠
  4. -a clean_peaks/cutoff/ZAT6_ABA_rep1_peaks.narrowPeak \
  5. -b clean_peaks/cutoff/ZAT6_ABA_rep2_peaks.narrowPeak \
  6. -wa \ # 输出 A 文件
  7. > clean_peaks/intersect/ZAT6_ABA_peaks.narrowPeak

方法三

  1. idr \
  2. --samples \
  3. raw_peaks/ZAT6_ABA_rep1_peaks.narrowPeak \
  4. raw_peaks/ZAT6_ABA_rep2_peaks.narrowPeak \
  5. --idr-threshold 0.05 \
  6. --output-file clean_peaks/idr/ZAT6_ABA_true_rep_idr.txt \
  7. --plot \
  8. --input-file-type narrowPeak \
  9. --rank p.value \
  10. 1>logs/ZAT6_ABA_select_peaks_by_idr.log 2>&1

Peak 差异分析

Peak 可视化

Peak 注释

ChIPseeker

参考

公众号 | YuLabSMU | 文章发表:Current Protocols | ChIPseeker R 包操作指南

公众号 | 小白鱼的生统笔记 | 使用R包ChIPseeker进行peaks关联的基因注释