<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>生信菜鸟团 &#187; PeakRanger</title>
	<atom:link href="http://www.bio-info-trainee.com/tag/peakranger/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bio-info-trainee.com</link>
	<description>欢迎去论坛biotrainee.com留言参与讨论，或者关注同名微信公众号biotrainee</description>
	<lastBuildDate>Sat, 28 Jun 2025 14:30:13 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.33</generator>
	<item>
		<title>用PeakRanger软件来对CHIP-seq数据call peaks</title>
		<link>http://www.bio-info-trainee.com/1747.html</link>
		<comments>http://www.bio-info-trainee.com/1747.html#comments</comments>
		<pubDate>Tue, 05 Jul 2016 15:19:19 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[基础软件]]></category>
		<category><![CDATA[CHIP-seq]]></category>
		<category><![CDATA[Peak]]></category>
		<category><![CDATA[PeakRanger]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=1747</guid>
		<description><![CDATA[此文专门讲这个软件如何用，但是跟我以前写的软件说明书又不大一样，主要是因为我用M &#8230; <a href="http://www.bio-info-trainee.com/1747.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>此文专门讲这个软件如何用，但是跟我以前写的软件说明书又不大一样，主要是因为我用MACS2这个软件call peaks并没有达到预期的结果，所以就多使用了几个软件，其中PeakRanger尤其值得一提，安装特别简单，而且处理数据的速度特别快，结果也非常容易理解，更重要的是它给出一个网页版的报告，<span style="color: #ff0000;">里面有所有找到的符合要求的peaks的可视化图片！！！！</span><span id="more-1747"></span></p>
<p>该软件有linux二进制版本，所以直接下载解压即可使用，具体代码如下：</p>
<blockquote><p>## Download and install PeakRanger<br />
cd ~/biosoft<br />
mkdir PeakRanger &amp;&amp; cd PeakRanger<br />
wget https://sourceforge.net/projects/ranger/files/PeakRanger-1.18-Linux-x86_64.zip/<br />
## Length: 1517587 (1.4M) [application/octet-stream]<br />
unzip PeakRanger-1.18-Linux-x86_64.zip<br />
~/biosoft/PeakRanger/bin/peakranger -h</p></blockquote>
<p>下面的笔记是我做自学CHIP-seq数据分析系列教程的，所以中英文夹杂，大家将就着看吧，里面很多链接，大家可以进去自己学习</p>
<p>### step6.8 peak calling by PeakRanger<br />
# PeakRanger is a multi-purporse software suite for analyzing next-generation sequencing (NGS) data. The suite contains the following tools:<br />
# Used by modENCODE, iPlant and many others<br />
# Not just for calling narrow and broad peaks<br />
# Runs fast, together with sleek program options<br />
To measure the significance of the enriched regions, PeakRanger uses binormial distribution to model the relative enrichment of sample over control.<br />
A p value is generated as a result. Users can thus select highly significant peaks by using a smaller -p.<br />
In addition, users can filter peaks by the '-q' option, which controls the FDR of peaks.<br />
For each p-value, the Benjamini-Hochberg procedure is applied to calculate the FDR.<br />
# http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/refGene.txt.gz ## gunzip refGene.txt.gz ; mv refGene.txt hg19refGene.txt<br />
#### software : http://ranger.sourceforge.net/ go to the root path of the unzipped package and type:make<br />
#### readme: http://ranger.sourceforge.net/manual1.18.html<br />
# http://www.broadinstitute.org/~anshul/projects/encode/preprocessing/peakcalling/peakranger/bin/MANUAL</p>
<p><span style="color: #ff0000;">### ~/biosoft/PeakRanger/bin/peakranger -h  ##我的软件已经安装完毕</span><br />
<span style="color: #ff6600;">nr estimate data quality</span><br />
<span style="color: #ff6600;"> lc calculate library complexity</span><br />
<span style="color: #ff6600;"> wig generate wiggle files</span><br />
<span style="color: #ff6600;"> wigpe generate wiggle files for paired reads</span><br />
<span style="color: #ff6600;"> ranger peak calling for sharp peaks</span><br />
<span style="color: #ff6600;"> ccat peak calling for broad peaks</span><br />
<span style="color: #ff6600;"> bcp peak calling for complex broad peaks</span></p>
<p>## 上面是该软件的几个用法，它直接各种格式的比对文件，我这里给的bed格式的，就是把sam转为bam再转为bed，，大家没必要那么复杂， 直接用bam格式即可</p>
<p>~/biosoft/PeakRanger/bin/peakranger nr <span style="color: #ff0000;">--format bed</span> SRR1042593.clean_bed SRR1042594.clean_bed<br />
~/biosoft/PeakRanger/bin/peakranger <span style="color: #ff0000;">ccat</span> --format bed SRR1042593.clean_bed SRR1042594.clean_bed \<br />
Xu_MUT_rep1_ccat_report --report --gene_annot_file hg19refGene.txt <span style="color: #ff0000;">-q 0.05 -t 4</span></p>
<p>很快就出结果，找到的peak非常多，但是需要过滤<br />
844K Jun 30 09:32 Xu_MUT_rep1_ccat_report_details<br />
637K Jun 30 09:32 Xu_MUT_rep1_ccat_report_region.bed<br />
798K Jun 30 09:32 Xu_MUT_rep1_ccat_report_summit.bed<br />
需要重点看到就是details文件，格式如下：很容易理解<br />
#region_chr region_start region_end nearby_genes(6kbp) region_ID region_summits region_fdr region_strand region_treads region_creads<br />
chr1 121482750 121486000 ccat_fdrPassed_0_fdr_0.001 121485025 0.001 + 551 642<br />
chr1 115296600 115302500 CSDE1 ccat_fdrFailed_0_fdr_0.646 115301075 0.646 + 58 217<br />
chr1 114351100 114356850 PTPN22,RSBN1 ccat_fdrFailed_3_fdr_0.646 114355425 0.646 + 48 112</p>
<p>很容易使用，但是具体条件参数，就需要自己看说明书啦<br />
Guide: Peak Calling for ChIP-Seq :　http://epigenie.com/guide-peak-calling-for-chip-seq/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/1747.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>自学CHIP-seq分析第六讲~寻找peaks</title>
		<link>http://www.bio-info-trainee.com/1745.html</link>
		<comments>http://www.bio-info-trainee.com/1745.html#comments</comments>
		<pubDate>Tue, 05 Jul 2016 12:17:31 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[tutorial]]></category>
		<category><![CDATA[BayesPeak]]></category>
		<category><![CDATA[CHIP-seq]]></category>
		<category><![CDATA[macs2]]></category>
		<category><![CDATA[PeakRanger]]></category>
		<category><![CDATA[peaks]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=1745</guid>
		<description><![CDATA[CHIP-seq测序的本质还是目标片段捕获测序，跟WES不同的是，它不是通过固定 &#8230; <a href="http://www.bio-info-trainee.com/1745.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div>
<p>CHIP-seq测序的本质还是目标片段捕获测序，跟WES不同的是，它不是通过固定的芯片探针来固定的捕获基因组上面特定序列，而是根据你选择的IP不同，你细胞或者机体状态不同，捕获到的序列差异很大！而我们研究的重点，就是捕获到的差异。而我们对CHIP-seq测序数据寻找peaks的本质就是得到所有测序数据比对在全基因组之后在正个基因组上面的测序深度里面寻找比较突出的。比如对WES数据来说，各个外显子，或者外显子的5端到3端，理论上测序深度应该是一致的，都是50X~200X，画一个测序深度曲线，应该是近似于一条直线。对我们的CHIP-seq测序数据来说，在所捕获的区域上面，理论上测序深度是绝对不一样的，应该是近似于一个山峰。而那些覆盖度高的地方，山顶，就是我们的IP所结合的热点，也就是我们想要找的peaks，在IGV里面看到大致是下面这样：</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2016/07/chipseq-0-peakdetection-large-IGV.png"><img class="alignnone size-full wp-image-1756" src="http://www.bio-info-trainee.com/wp-content/uploads/2016/07/chipseq-0-peakdetection-large-IGV.png" alt="chipseq-0-peakdetection-large-IGV" width="786" height="478" /></a></p>
<p>可以看到测序的reads分布是绝对的不均匀的！我们通常说的CHIP-seq测序的IP，可以是各个组蛋白的各个修饰位点对应的抗体，或者是各种转录因子的抗体，等等</p>
<p>如何定义热点呢？通俗地讲，热点是这样一些位置，这些位置多次被测得的read所覆盖（我们测的是一个细胞群体，read出现次数多，说明该位置被TF结合的几率大）。那么，read数达到多少才叫多？这就要用到统计检验喽。假设TF在基因组上的分布是没有任何规律的，那么，测序得到的read在基因组上的分布也必然是随机的，某个碱基上覆盖的read的数目应该服从二项分布。</p>
<p>具体统计学原理直接看原创吧：<a href="http://www.plob.org/2014/05/08/7227.html">http://www.plob.org/2014/05/08/7227.html</a></p>
</div>
<p><span id="more-1745"></span>为了达到作者文献里面的结果，我换了8个软件：<b><span style="color: #ff0000;">MACS2</span></b>/HOMER/SICERpy/PePr/SWEMBL/SISSRs/<b>BayesPeak/PeakRanger，我这里就不一一介绍peaks caller软件的安装以及使用了，因为MACS2是最常用的，我就简单贴一下我关于MACS2的学习代码：</b></p>
<blockquote>
<div><b>## step6 : peak calling<br />
### step6.1: with MACS2<br />
## 我先看了看说明书：<br />
macs2 callpeak -t TF_1.bam -c Input.bam -n mypeaks<br />
We used the following options:<br />
-t: This is the only required parameter for MACS, refers to the name of the file with the ChIP-seq data<br />
-c: The control or mock data file<br />
-n: The name string of the experiment<br />
MAC2 creates 4 files (mypeaks peaks.narrowPeak, mypeaks summits.bed, mypeaks peaks.xls and mypeaks model.r)<br />
# MACS首先的工作是要确定一个模型，这个模型最关键的参数就是峰宽d。这个d就是bw(band width)，而它的一半就是shiftsize。</b></div>
<div><b><b>### 然后根据文章确定了下载的测序数据的分类<br />
GSM1278641 Xu_MUT_rep1_BAF155_MUT        SRR1042593<br />
GSM1278642 Xu_MUT_rep1_Input        SRR1042594<br />
GSM1278643 Xu_MUT_rep2_BAF155_MUT        SRR1042595<br />
GSM1278644 Xu_MUT_rep2_Input        SRR1042596<br />
GSM1278645 Xu_WT_rep1_BAF155        SRR1042597<br />
GSM1278646 Xu_WT_rep1_Input        SRR1042598<br />
GSM1278647 Xu_WT_rep2_BAF155        SRR1042599<br />
GSM1278648 Xu_WT_rep2_Input         SRR1042600<br />
## 这里有个很奇怪的问题，input的测序数据居然比IP的测序数据多？？？<br />
848M Jun 28 14:31 SRR1042593.bam<br />
2.7G Jun 28 14:52 SRR1042594.bam<br />
716M Jun 28 14:58 SRR1042595.bam<br />
2.9G Jun 28 15:20 SRR1042596.bam<br />
1.1G Jun 28 15:28 SRR1042597.bam<br />
2.6G Jun 28 15:48 SRR1042598.bam<br />
1.2G Jun 28 15:58 SRR1042599.bam<br />
3.5G Jun 28 16:26 SRR1042600.bam<br />
## 我没有想明白为什么<br />
## http://www2.uef.fi/documents/1698400/2466431/Macs2/f4d12870-34f9-43ef-bf0d-f5d087267602<br />
## http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3120977/</b></b>我首先用的是下面这些代码<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042594.bam -t SRR1042593.bam -f BAM -B -g hs -n Xu_MUT_rep1 2&gt;Xu_MUT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042596.bam -t SRR1042595.bam -f BAM -B -g hs -n Xu_MUT_rep2 2&gt;Xu_MUT_rep2.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042598.bam -t SRR1042597.bam -f BAM -B -g hs -n Xu_WT_rep1 2&gt;Xu_WT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042600.bam -t SRR1042599.bam -f BAM -B -g hs -n Xu_WT_rep2 2&gt;Xu_WT_rep2.masc2.log &amp;<br />
得到的peaks少的可怜，我第一次检查，以为是因为自己没有sort 比对的bam文件导致<br />
## forget to sort the bam files:<br />
## 首先把bam文件sort好，构建了inde，然后继续运行！<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042594.sorted.bam -t SRR1042593.sorted.bam -f BAM -B -g hs -n Xu_MUT_rep1 2&gt;Xu_MUT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042596.sorted.bam -t SRR1042595.sorted.bam -f BAM -B -g hs -n Xu_MUT_rep2 2&gt;Xu_MUT_rep2.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042598.sorted.bam -t SRR1042597.sorted.bam -f BAM -B -g hs -n Xu_WT_rep1 2&gt;Xu_WT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042600.sorted.bam -t SRR1042599.sorted.bam -f BAM -B -g hs -n Xu_WT_rep2 2&gt;Xu_WT_rep2.masc2.log &amp;<br />
##此时得到peaks跟上面为sort的bam文件得到的peaks一模一样，看来不是这个原因</p>
</div>
<div>##然后我怀疑是不是作者上传数据的时候把input和IP标记反了，所以我认为的调整过来</div>
<div><b><b>## Then change the control and treatment<br />
nohup time ~/.local/bin/macs2 callpeak -t SRR1042594.sorted.bam -c SRR1042593.sorted.bam -f BAM -B -g hs -n Xu_MUT_rep1 2&gt;Xu_MUT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -t SRR1042596.sorted.bam -c SRR1042595.sorted.bam -f BAM -B -g hs -n Xu_MUT_rep2 2&gt;Xu_MUT_rep2.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -t SRR1042598.sorted.bam -c SRR1042597.sorted.bam -f BAM -B -g hs -n Xu_WT_rep1 2&gt;Xu_WT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -t SRR1042600.sorted.bam -c SRR1042599.sorted.bam -f BAM -B -g hs -n Xu_WT_rep2 2&gt;Xu_WT_rep2.masc2.log &amp;</b></b></div>
<div><b><b>##结果，压根就没有peaks了！！！！看了作者并没有搞错<br />
</b></b></p>
<div><b>##接下来我怀疑是自己用samtools view -bhS -q 30   处理了sam文件，这个标准太严格了！！</b></div>
<div><b>## </b></div>
<p><b>## then just use the sam files.<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042594.sam -t SRR1042593.sam -f SAM -B -g hs -n Xu_MUT_rep1 2&gt;Xu_MUT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042596.sam -t SRR1042595.sam -f SAM -B -g hs -n Xu_MUT_rep2 2&gt;Xu_MUT_rep2.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042598.sam -t SRR1042597.sam -f SAM -B -g hs -n Xu_WT_rep1 2&gt;Xu_WT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042600.sam -t SRR1042599.sam -f SAM -B -g hs -n Xu_WT_rep2 2&gt;Xu_WT_rep2.masc2.log &amp;<br />
## 也没有多几个peaks，最后我只能想到是我的p值太严格了<br />
## then chang the criteria for p values :</p>
<p>https://github.com/taoliu/MACS/</p>
<p>nohup time ~/.local/bin/macs2 callpeak -c SRR1042594.sam -t SRR1042593.sam -f SAM -p 0.01 -g hs -n Xu_MUT_rep1 2&gt;Xu_MUT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042596.sam -t SRR1042595.sam -f SAM -p 0.01 -g hs -n Xu_MUT_rep2 2&gt;Xu_MUT_rep2.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042598.sam -t SRR1042597.sam -f SAM -p 0.01 -g hs -n Xu_WT_rep1 2&gt;Xu_WT_rep1.masc2.log &amp;<br />
nohup time ~/.local/bin/macs2 callpeak -c SRR1042600.sam -t SRR1042599.sam -f SAM -p 0.01 -g hs -n Xu_WT_rep2 2&gt;Xu_WT_rep2.masc2.log &amp;<br />
##我大大减小了P值的标准，结果是输出一大堆的peaks<br />
18919 Xu_MUT_rep1_peaks.xls<br />
36277 Xu_MUT_rep2_peaks.xls<br />
32494 Xu_WT_rep1_peaks.xls<br />
56080 Xu_WT_rep2_peaks.xls<br />
问题是这些peaks根本就都是假阳性！！！<br />
我手动的check了几个之前严格过滤条件下的peaks，的确可以看到测序深度是两个山峰形状的曲线<br />
## check some peaks 手动的 ## chr1 121484235 121485608<br />
## masc results :<br />
samtools depth -r chr10:42385331-42385599 SRR1042593.sorted.bam<br />
samtools depth -r chr10:42385331-42385599 SRR1042594.sorted.bam<br />
samtools depth -r chr20:45810382-45810662 SRR1042593.sorted.bam<br />
samtools depth -r chr20:45810382-45810662 SRR1042594.sorted.bam<br />
##我也check了paper里面得到的peak，但是在我的比对文件里面，肉眼看起来根本不像，所以我很纠结~~~~<br />
paper results:<br />
chr20 45796362 46384917<br />
chr1 121482722 121485861<br />
samtools depth -r chr1:121482722-121485861 SRR1042593.sorted.bam<br />
samtools depth -r chr1:121482722-121485861 SRR1042594.sorted.bam<br />
samtools depth -r chr20:45796362-46384917 SRR1042593.sorted.bam<br />
samtools depth -r chr20:45796362-46384917 SRR1042594.sorted.bam </b></p>
</div>
</blockquote>
<div>很不幸，最后还是没能达到作者的结果，我没搞清楚是为什么，我还用了<b>BayesPeak/PeakRanger这两个软件，结果也不咋地。</b></div>
<div></div>
<div>peak finder软件大全： <a href="http://wodaklab.org/nextgen/data/peakfinders.html">http://wodaklab.org/nextgen/data/peakfinders.html</a></div>
<div>
<div>Peak Calling for ChIP-Seq :　<a href="http://epigenie.com/guide-peak-calling-for-chip-seq/">http://epigenie.com/guide-peak-calling-for-chip-seq/</a></div>
</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/1745.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
