专栏名称: 23Plus
23Plus是首个专注于表观遗传学领域的网络社区平台,汇聚全球表观遗传领域专家、学者以及医疗实践者,致力于打造兼专业与科普为一体的的表观遗传互动阵地。
目录
相关文章推荐
BioArt  ·  Genome Research | ... ·  2 天前  
生物制品圈  ·  阿斯利康抗PD-L1单抗癌症新药新适应症在华 ... ·  2 天前  
BioArt  ·  Science | ... ·  3 天前  
生信人  ·  别怕,单细胞的常规分析也能发5+ ·  5 天前  
生信人  ·  好的临床问题,意味着更少的分析 ·  6 天前  
51好读  ›  专栏  ›  23Plus

教你学会ChIP-seq分析 | 第五讲

23Plus  · 公众号  · 生物  · 2017-07-10 07:00

正文

写在前面

本次系列文章为大家带来的是生信菜鸟图案的经典文章合辑: 《教你学会ChIP-seq分析》 共九讲内容 带领你从相关文献解读、资料收集和公共数据下载开始,通过软件安装、数据比对、寻找并注释peak、寻找motif等ChIP-seq分析主要步骤入手学习,最后还会介绍相关可视化工具。


第五讲:测序数据比对

比对就很简单的了, 各种mapping工具层出不穷,我们一般常用的就是BWA和bowtie了,我这里就挑选bowtie2吧,反正别人已经做好了各种工具效果差异的比较,我们直接用就好了,代码如下:


  1. ## step5 : alignment to hg19/ using bowtie2 to do alignment

  2. ## ~/biosoft/bowtie/bowtie2-2.2.9/bowtie2-build ~/biosoft/bowtie/hg19_index /hg19.fa ~/biosoft/bowtie/hg19_index/hg19

  3. ## cat >run_bowtie2.sh

  4. ls *.fastq | while read id ;

  5. do

  6. echo $id

  7. #~/biosoft/bowtie/bowtie2-2.2.9/bowtie2 -p 8 -x ~/biosoft/bowtie/hg19_index/hg19 -U $id -S ${id%%.*}.sam 2>${id%%.*}.align.log;

  8. #samtools view -bhS -q 30 ${id%%.*}.sam > ${id%%.*}.bam ## -F 1548 https://broadinstitute.github.io/picard/explain-flags.html

  9. # -F 0x4 remove the reads that didn't match

  10. samtools sort $ {id%%.*}.bam ${id%%.*}.sort ## prefix for the output

  11. # samtools view -bhS a.sam | samtools sort -o - ./ > a.bam

  12. samtools index $ {id%%.*}.sorted.bam

  13. done


这个索引~/biosoft/bowtie/hg19_index/hg19需要自己提取建立好,见前文


初步比对的sam文件到底该如何过滤,我查了很多文章都没有给出个子丑寅卯,各执一词,我也没办法给大家一个标准,反正我测试了好几种,看起来call peaks的差异不大,就是得不到文章给出的那些结果!!


一般来说,初步比对的sam文件只能选取unique mapping的结果 ,所以我用了#samtools view -bhS -q 30,但是结果并没什么改变,有人说是peak caller这些工具本身就会做这件事,所以取决于你下游分析所选择的工具。


给大家看比对的日志吧:


  1. SRR1042593 .fastq

  2. 16902907 reads; of these:

  3. 16902907 ( 100.00 %) were unpaired; of these:

  4. 667998 ( 3.95 %) aligned 0 times

  5. 12467095 ( 73.76 %) aligned exactly 1 time

  6. 3767814 ( 22.29 %) aligned > 1 times

  7. 96.05 % overall alignment rate

  8. ......

  9. SRR1042598 .fastq

  10. 58068816 reads; of these:

  11. 58068816 ( 100.00 %) were unpaired; of these:

  12. 8433671 ( 14.52 %) aligned 0 times

  13. 37527468 ( 64.63 %) aligned exactly 1 time

  14. 12107677 ( 20.85 %) aligned > 1 times

  15. 85.48 % overall alignment rate

  16. [ samopen] SAM header is present: 93 sequences.

  17. SRR1042599 .fastq

  18. 24019489 reads; of these:

  19. 24019489 ( 100.00 %) were unpaired; of these:

  20. 1411095 ( 5.87 %) aligned 0 times

  21. 17528479 ( 72.98 %) aligned exactly 1 time

  22. 5079915 ( 21.15 %) aligned > 1 times

  23. 94.13 % overall alignment rate

  24. [ samopen] SAM header is present: 93 sequences.

  25. SRR1042600 .fastq

  26. 76361026 reads; of these:

  27. 76361026 ( 100.00 %) were unpaired; of these:

  28. 8442054 ( 11.06 %) aligned 0 times

  29. 50918615 ( 66.68 %) aligned exactly 1 time

  30. 17000357 ( 22.26 %) aligned > 1 times

  31. 88.94 % overall alignment rate

  32. [ samopen] SAM header is present: 93 sequences.


可以看到比对非常成功。

我这里就不用表格的形式来展现了,毕竟我又不是给客户写报告,大家就将就着看吧。


本系列历史文章列表

1 教你学会ChIP-seq分析 | 第一讲

2 教你学会ChIP-seq分析 | 第二讲

3 教你学会ChIP-seq分析 | 第三讲

4 教你学会ChIP-seq分析 | 第四讲







请到「今天看啥」查看全文