<?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/%e9%a2%9c%e8%89%b2/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>kegg在线链接图的颜色设置</title>
		<link>http://www.bio-info-trainee.com/2061.html</link>
		<comments>http://www.bio-info-trainee.com/2061.html#comments</comments>
		<pubDate>Fri, 25 Nov 2016 10:17:59 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[杂谈-随笔]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[KEGG]]></category>
		<category><![CDATA[笔记]]></category>
		<category><![CDATA[颜色]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=2061</guid>
		<description><![CDATA[一般来说， 有了kegg的ID，就可以直接去官网查看具体的通路图片，但是需要把差 &#8230; <a href="http://www.bio-info-trainee.com/2061.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div>一般来说， 有了kegg的ID，就可以直接去官网查看具体的通路图片，但是需要把差异基因给标注上去，就有点麻烦了，我以前做过类似的工作，结果没有做笔记，这次相当于重新造了个轮子，好惨！</div>
<div>简单的KEGG图片，看下面的url：</div>
<div><a href="http://www.genome.jp/kegg-bin/show_pathway?hsa03040+hsa:10450">http://www.genome.jp/kegg-bin/show_pathway?hsa03040 </a></div>
<div><a href="http://www.genome.jp/kegg-bin/show_pathway?hsa05168+hsa:406">http://www.genome.jp/kegg-bin/show_pathway?hsa05168 </a></div>
<div>可以看出来<a href="http://www.genome.jp/kegg-bin/show_pathway?hsa03040+hsa:10450">只需要变化KEGG的ID即可。</a></div>
<div>如果要做下面的这个，上调基因用红色表示，下调基因用绿色表示：</div>
<p><span id="more-2061"></span></p>
<div><img src="file:///C:/Users/jimmy1314/AppData/Local/YNote/data/jmzeng1314@163.com/e1dfb46fed924302a0477917679dfe60/clipboard.png" alt="" data-media-type="image" data-attr-org-src-id="448475DA61C544F8BBF2D00228FE782F" /><a href="http://www.bio-info-trainee.com/wp-content/uploads/2016/11/clipboard.png"><img class="alignnone  wp-image-2065" src="http://www.bio-info-trainee.com/wp-content/uploads/2016/11/clipboard.png" alt="clipboard" width="800" height="453" /></a></div>
<div>需要重新理解kegg的API规则，比如：<a href="http://www.kegg.jp/kegg/docs/weblink.html">http://www.kegg.jp/kegg/docs/weblink.html</a></div>
<div>我就造出了下面的links：</div>
<div><a href="http://www.genome.jp/kegg-bin/show_pathway?map=hsa04115&amp;multi_query=CDKN1A+red%2Cblue%0DSESN3+red%2Cblue%0DIGFBP3+blue%2Cred%0DFAS+red%2Cblue%0DCD82+red%2Cblue%0DGADD45B+blue%2Cred%0DSERPINB5+red%2Cblue%0DZMAT3+blue%2Cred%0DCCNB3+red%2Cblue%0D">http://www.genome.jp/kegg-bin/show_pathway?map=hsa04115&amp;multi_query=CDKN1A+red%2Cblue%0DSESN3+red%2Cblue%0DIGFBP3+blue%2Cred%0DFAS+red%2Cblue%0DCD82+red%2Cblue%0DGADD45B+blue%2Cred%0DSERPINB5+red%2Cblue%0DZMAT3+blue%2Cred%0DCCNB3+red%2Cblue%0D</a></div>
<div><a href="http://www.genome.jp/kegg-bin/show_pathway?map=hsa04151&amp;multi_query=CDKN1A+red%2Cblue%0DLAMC3+red%2Cblue%0DCOL1A2+blue%2Cred%0DCREB1+blue%2Cred%0DEGF+red%2Cblue%0DFGFR3+blue%2Cred%0DGHR+red%2Cblue%0DGNG11+red%2Cblue%0DITGA2+red%2Cblue%0DITGA3+red%2Cblue%0DITGAV+red%2Cblue%0DLAMB3+red%2Cblue%0DMYC+blue%2Cred%0DPCK2+blue%2Cred%0DPPP2R5C+blue%2Cred%0DLPAR5+blue%2Cred%0DGNB4+blue%2Cred%0DSGK1+blue%2Cred%0DCREB3L2+blue%2Cred%0DTEK+red%2Cblue%0DTHBS2+blue%2Cred%0DPDGFD+blue%2Cred%0DOSMR+red%2Cblue%0D">http://www.genome.jp/kegg-bin/show_pathway?map=hsa04151&amp;multi_query=CDKN1A+red%2Cblue%0DLAMC3+red%2Cblue%0DCOL1A2+blue%2Cred%0DCREB1+blue%2Cred%0DEGF+red%2Cblue%0DFGFR3+blue%2Cred%0DGHR+red%2Cblue%0DGNG11+red%2Cblue%0DITGA2+red%2Cblue%0DITGA3+red%2Cblue%0DITGAV+red%2Cblue%0DLAMB3+red%2Cblue%0DMYC+blue%2Cred%0DPCK2+blue%2Cred%0DPPP2R5C+blue%2Cred%0DLPAR5+blue%2Cred%0DGNB4+blue%2Cred%0DSGK1+blue%2Cred%0DCREB3L2+blue%2Cred%0DTEK+red%2Cblue%0DTHBS2+blue%2Cred%0DPDGFD+blue%2Cred%0DOSMR+red%2Cblue%0D</a></div>
<div>当然，肯定不是手动的啦！！！</div>
<div>代码很简单</div>
<div>this_keggID 就是 04115 等等的KEGG的ID，数字格式的哦！</div>
<div>this_kegg_has_geneID &lt;- kegg2GeneID_list[[this_keggID]] ## 拿到这个KEGG的所有基因</div>
<div>this_kegg_has_geneSymbol &lt;- unique(geneAnno(this_kegg_has_geneID)$symbol) ## 把基因的entrez ID转换为gene 的symbol ，其中geneAnno是我自定义的！</div>
<div></div>
<div>## 跟我们的显著上下调基因取交集，其中diff_gene_list是以symbol为标记的</div>
<div>this_kegg_has_geneSymbol_diff &lt;- intersect(this_kegg_has_geneSymbol,diff_gene_list)</div>
<div>## UP GENE: DHX8+red%2Cblue%0D ##自己定义调色规则</div>
<div>## DOWN GENE:DHX8+blue%2Cred%0D</div>
<div>color = ifelse(vcx15_DEG[this_kegg_has_geneSymbol_diff,]$logFC &gt;0 ,'red%2Cblue%0D','blue%2Cred%0D')</div>
<div>## 根据交集的基因来拼接调色字符串咯</div>
<div>kegg_suffix &lt;- paste0(paste(this_kegg_has_geneSymbol_diff,color,sep='+'),collapse = '')</div>
<div>## 再把link给拼起来。</div>
<div>href=paste0("http://www.genome.jp/kegg-bin/show_pathway?map=hsa",</div>
<div>this_keggID,"&amp;multi_query=", kegg_suffix</div>
<div>)</div>
<div>整个过程做成一个循环就好啦！！</div>
<div>我开发的R包有集成这个功能：https://github.com/jmzeng1314/humanid</div>
<div>https://github.com/jmzeng1314/humanid/blob/master/R/add_kegg_up_down_link.R</div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/2061.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
