<?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; 富集</title>
	<atom:link href="http://www.bio-info-trainee.com/tag/%e5%af%8c%e9%9b%86/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>转录组-GO和KEGG富集的R包clusterProfiler</title>
		<link>http://www.bio-info-trainee.com/370.html</link>
		<comments>http://www.bio-info-trainee.com/370.html#comments</comments>
		<pubDate>Thu, 19 Mar 2015 13:41:04 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[生信组学技术]]></category>
		<category><![CDATA[转录组软件]]></category>
		<category><![CDATA[GO]]></category>
		<category><![CDATA[KEGG]]></category>
		<category><![CDATA[富集]]></category>
		<category><![CDATA[通路]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=370</guid>
		<description><![CDATA[PS： 请不要在问我关于这个包的任何问题，直接联系Y叔，我就两年前用过一次而已， &#8230; <a href="http://www.bio-info-trainee.com/370.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>PS： 请不要在问我关于这个包的任何问题，直接联系Y叔，我就两年前用过一次而已，再也没有用</strong></span>过。</p>
<p>Y叔的包更新太频繁了，这个教程已经作废，请不要再照抄了，可以去我们论坛看新的教程：<a href="http://www.biotrainee.com/thread-1084-1-1.html">http://www.biotrainee.com/thread-1084-1-1.html</a></p>
<p>一：下载安装该R包</p>
<p>clusterProfiler是业界很出名的YGC写的R包，非常通俗易懂，也很好用，可以直接根据cuffdiff等找差异的软件找出的差异基因entrez ID号直接做好富集的所有内容；<span id="more-370"></span></p>
<p>Bioconductor网站上面有关于它的介绍，按照上面说的方式来安装即可</p>
<p><a href="http://www.bioconductor.org/packages/release/bioc/html/clusterProfiler.html">http://www.bioconductor.org/packages/release/bioc/html/clusterProfiler.html</a><!--more--></p>
<p>source("http://bioconductor.org/biocLite.R");biocLite("clusterProfiler")</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO和KEGG富集的R包clusterProfiler414.png"><img class="alignnone size-full wp-image-371" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO和KEGG富集的R包clusterProfiler414.png" alt="转录组-GO和KEGG富集的R包clusterProfiler414" width="512" height="229" /></a></p>
<p>二、输入数据</p>
<p>diff_gene.entrez文件，是通过各种差异基因软件找出来的差异基因的entrez ID号列表，每一个ID号一行，几百个差异基因就几百行</p>
<p>三、R语言代码</p>
<blockquote><p>setwd("C:\\Users\\Administrator\\Desktop\\ref")</p>
<p>a=read.table("diff_gene.entrez")</p>
<p>require(DOSE)</p>
<p>require(clusterProfiler)</p>
<p>gene=as.character(a[,1])</p>
<p>ego &lt;- enrichGO(gene=gene,organism="human",ont="CC",pvalueCutoff=0.01,readable=TRUE)</p>
<p>ekk &lt;- enrichKEGG(gene=gene,organism="human",pvalueCutoff=0.01,readable=TRUE)</p>
<p>write.csv(summary(ekk),"KEGG-enrich.csv",row.names =F)</p>
<p>write.csv(summary(ego),"GO-enrich.csv",row.names =F)</p></blockquote>
<p>四、输出文件解读</p>
<p>看得懂R语言的都知道，这个代码输出了两个文件KEGG-enrich.csv和GO-enrich.csv，就是我们的GO和KEGG富集的结果，其中内容如下</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO和KEGG富集的R包clusterProfiler1003.png"><img class="alignnone size-full wp-image-372" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO和KEGG富集的R包clusterProfiler1003.png" alt="转录组-GO和KEGG富集的R包clusterProfiler1003" width="618" height="290" /></a></p>
<p>上述表格为差异基因的Gene Ontology富集分析结果表格。</p>
<p>GO ID: Gene Ontology数据库中唯一的标号信息</p>
<p>Description ：Gene Ontology功能的描述信息</p>
<p>GeneRatio：差异基因中与该Term相关的基因数与整个差异基因总数的比值</p>
<p>BgRation：所有（ bg）基因中与该Term相关的基因数与所有（ bg）基因的比值</p>
<p>pvalue: 富集分析统计学显著水平，一般情况下， P-value &lt; 0.05 该功能为富集项</p>
<p>p.adjust 矫正后的P-Value</p>
<p>qvalue：对p值进行统计学检验的q值</p>
<p>Count：差异基因中与该Term相关的基因数</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO和KEGG富集的R包clusterProfiler1433.png"><img class="alignnone size-full wp-image-373" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO和KEGG富集的R包clusterProfiler1433.png" alt="转录组-GO和KEGG富集的R包clusterProfiler1433" width="727" height="91" /></a></p>
<p>上述表格为差异基因的KEGG Pathway富集分析结果表格。</p>
<p>ID： KEGG 数据库中通路唯一的编号信息。</p>
<p>Description ：Gene Ontology功能的描述信息</p>
<p>GeneRatio：差异基因中与该Term相关的基因数与整个差异基因总数的比值</p>
<p>BgRation：所有（ bg）基因中与该ID相关的基因数与所有（ bg）基因的比值</p>
<p>pvalue: 富集分析统计学显著水平，一般情况下， P-value &lt; 0.05 该功能为富集项</p>
<p>p.adjust 矫正后的P-Value</p>
<p>qvalue：对p值进行统计学检验的q值</p>
<p>Count：差异基因中与该Term相关的基因数</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/370.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>转录组-GO通路富集-WEGO网站使用</title>
		<link>http://www.bio-info-trainee.com/359.html</link>
		<comments>http://www.bio-info-trainee.com/359.html#comments</comments>
		<pubDate>Thu, 19 Mar 2015 13:20:28 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[基础数据库]]></category>
		<category><![CDATA[生信基础]]></category>
		<category><![CDATA[转录组软件]]></category>
		<category><![CDATA[GO通路]]></category>
		<category><![CDATA[wego]]></category>
		<category><![CDATA[富集]]></category>
		<category><![CDATA[注释]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=359</guid>
		<description><![CDATA[一，所谓的网站，其实就是一个网页版的可视化软件接口而已 看看网站主页，看看它需要 &#8230; <a href="http://www.bio-info-trainee.com/359.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>一，所谓的网站，其实就是一个网页版的可视化软件接口而已</p>
<p>看看网站主页，看看它需要什么数据</p>
<p><a href="http://wego.genomics.org.cn/cgi-bin/wego/index.pl">http://wego.genomics.org.cn/cgi-bin/wego/index.pl</a></p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用181.png"><img class="alignnone size-full wp-image-360" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用181.png" alt="转录组-GO通路注释-WEGO网站使用181" width="554" height="296" /></a></p>
<p>二，所需要的数据</p>
<p>1，human.all.go.entrez，需要自己制作，每个基因名entrez ID号，对应着一堆GO通路，人有两万多个基因，所以应该有两万多行的文件。</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用247.png"><img class="alignnone size-full wp-image-361" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用247.png" alt="转录组-GO通路注释-WEGO网站使用247" width="554" height="434" /></a></p>
<p>2，差异基因的GO通路，需要用cuffdiff得到差异基因名，然后用然后用脚本做成下面的样子。记住，上面的那个人类的背景GO文件也是一样的格式，基因名是entrez ID号，与GO通路用制表符隔开，然后每个基因所对应的GO直接用空格隔开。格式要求很准确才行。</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用379.png"><img class="alignnone size-full wp-image-362" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用379.png" alt="转录组-GO通路注释-WEGO网站使用379" width="554" height="245" /></a></p>
<p>&nbsp;</p>
<p>三，上传数据，出图</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用391.png"><img class="alignnone size-full wp-image-363" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用391.png" alt="转录组-GO通路注释-WEGO网站使用391" width="554" height="398" /></a></p>
<p>点击plot画图即可，就可以出来了一个GO通路富集图</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用420.png"><img class="alignnone size-full wp-image-364" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/转录组-GO通路注释-WEGO网站使用420.png" alt="转录组-GO通路注释-WEGO网站使用420" width="554" height="422" /></a></p>
<p>顺便贴上wego上传数据制作的几个脚本，脚本这种东西都很难看，随便意思一下啦，用一下脚本处理就可以得到wego需要上传的数据了</p>
<p>1，得到差异基因名，并且转换为entrez ID号<br />
grep yes gene_exp.diff |cut -f 3 |sort -u &gt;diff.gene.name<br />
cat diff.gene.name  ../Homo_sapiens.gene_info  |perl -alne '{$hash{$_}=1;print $F[1] if exists $hash{$F[2]}}' |sort -u &gt;diff.gene.entrez<br />
2，根据找到的差异基因的entrez ID号来找到它的GO信号，输出文件给wego网站<br />
cat diff.gene.entrez ../gene2go |perl -alne '{$hash{$_}=1;print "$F[1]\t$F[2]" if exists $hash{$F[1]}}' |perl -alne '{$hash{$F[0]}.="$F[1] "}END{print "$_\t$hash{$_}" foreach keys %hash}' &gt;diff.gene.entrez.go<br />
3，得到entrez ID号跟ensembl ID号的转换hash表<br />
perl -alne '{if (/Ensembl:(ENSG\d+)/) {print "$1=&gt;$F[1]"} }' Homo_sapiens.gene_info &gt;entrez.ensembl<br />
4，得到人类entrez ID的go背景<br />
grep '^9606' gene2go |perl -alne '{$hash{$F[1]}.="$F[2] "}END{print "$_\t$hash{$_}" foreach sort keys %hash}' &gt;human.all.go.entrez<br />
5，把人类entrez ID的go背景转换成ensembl的go背景<br />
cat entrez.ensembl human.all.go.entrez |perl -F"=&gt;" -alne  '{$hash{$F[1]}=$F[0];print "$hash{$F[0]}\t$F[1]" if exists $hash{$F[0]}}' &gt;human.all.go.ensembl</p>
<p>在我的群里面共享了所有的代码及帖子内容，欢迎加群201161227，生信菜鸟团！</p>
<p>http://www.bio-info-trainee.com/?p=1</p>
<p>线下交流-生物信息学<br />
同时欢迎下载使用我的手机安卓APP</p>
<p>http://www.cutt.com/app/down/840375</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/359.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
