<?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; annotate</title>
	<atom:link href="http://www.bio-info-trainee.com/tag/annotate/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>gene的各种ID转换终结者-bioconductor系列包</title>
		<link>http://www.bio-info-trainee.com/1089.html</link>
		<comments>http://www.bio-info-trainee.com/1089.html#comments</comments>
		<pubDate>Thu, 29 Oct 2015 08:13:02 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[annotate]]></category>
		<category><![CDATA[bioconductor]]></category>
		<category><![CDATA[org.Hs.eg.db]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=1089</guid>
		<description><![CDATA[经常会有人问这样的问题I have list of 10,000 Entrez  &#8230; <a href="http://www.bio-info-trainee.com/1089.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>经常会有人问这样的问题I have list of <strong>10,000 Entrez IDs</strong> and i want to convert the multiple Entrez IDs into the respective gene names. Could someone suggest me the way to do this?等等类似的基因转换，能做的基因转换的方法非常多，以前不懂编程的时候，都是用各种网站，而最常用的就是ensembl的biomart了，它支持的ID非常多，高达几百种，好多ID我到现在都不知道是什么意思。</p>
<p>现在学会编程了，我比较喜欢的是R的一些包，是bioconductor系列，一般来说，其中有biomart，org.Hs.eg.db，annotate，等等。关于biomart我就不再讲了，我前面的博客至少有七八篇都提到了它。本次我们讲讲简单的， 我就以把gene entrez ID转换为gene symbol 为例子把。</p>
<p>当然，首先要安装这些包，并且加载。</p>
<p>if("org.Hs.eg.db" %in% rownames(installed.packages()) == FALSE) {source("http://bioconductor.org/biocLite.R");biocLite("org.Hs.eg.db")}<br />
suppressMessages(library(org.Hs.eg.db))  我比较喜欢这样加载包</p>
<p>library(annotate) #一般都是这样加载包</p>
<p>如果是用org.Hs.eg.db包，首先你只需要读取你的待转换ID文件，构造成一个向量，tmp，然后只需要symbols &lt;- org.Hs.egSYMBOL[as.character(tmp)]就可以得到结果了，返回的symbols是一个对象，需要用toTable这个函数变成数据框。但是这样转换容易出一些问题，比如如果你的输入数据tmp，里面含有一些无法转换的gene entrez ID，就会报错。</p>
<p>而且它支持的ID转换很有限，具体看看它的说明书即可：https://www.bioconductor.org/packages/release/data/annotation/manuals/org.Hs.eg.db/man/org.Hs.eg.db.pdf</p>
<p>org.Hs.eg.db<br />
org.Hs.eg_dbconn<br />
org.Hs.egACCNUM<br />
org.Hs.egALIAS2EG<br />
org.Hs.egCHR<br />
org.Hs.egCHRLENGTHS<br />
org.Hs.egCHRLOC<br />
org.Hs.egENSEMBL<br />
org.Hs.egENSEMBLPROT<br />
org.Hs.egENSEMBLTRANS<br />
org.Hs.egENZYME<br />
org.Hs.egGENENAME<br />
org.Hs.egGO<br />
org.Hs.egMAP<br />
org.Hs.egMAPCOUNTS<br />
org.Hs.egOMIM<br />
org.Hs.egORGANISM<br />
org.Hs.egPATH<br />
org.Hs.egPMID<br />
org.Hs.egREFSEQ<br />
org.Hs.egSYMBOL<br />
org.Hs.egUCSCKG<br />
org.Hs.egUNIGENE<br />
org.Hs.egUNIPROT</p>
<p>如果是用annotate包，首先你还是需要读取你的待转换ID文件，构造成一个向量，tmp，然后用getSYMBOL(as.character(tmp), data='org.Hs.eg')这样直接就返回的还是以向量，只是在原来向量的基础上面加上了names属性。说明书：http://www.bioconductor.org/packages/3.3/bioc/manuals/annotate/man/annotate.pdf</p>
<p>然后你可以把转换好的向量写出去，如下：</p>
<p>1 A1BG<br />
2 A2M<br />
3 A2MP1<br />
9 NAT1<br />
10 NAT2<br />
12 SERPINA3<br />
13 AADAC<br />
14 AAMP<br />
15 AANAT<br />
16 AARS</p>
<p>PS：如果是芯片数据，需要把探针的ID转换成gene，那么一般还需要加载特定芯片的数据包才行：</p>
<p>platformDB &lt;- paste(eset.mas5@annotation, ".db", sep="") #这里需要确定你用的是什么芯片<br />
cat("the annotation is ",platformDB,"\n")<br />
if(platformDB %in% rownames(installed.packages()) == FALSE) {source("http://bioconductor.org/biocLite.R");tmp=try(biocLite(platformDB))}<br />
library(platformDB, character.only=TRUE)<br />
probeset &lt;- featureNames(eset.mas5)<br />
rowMeans &lt;- rowMeans(exprSet)</p>
<p>library(annotate) # lookUp函数是属于annotate这个包的<br />
EGID &lt;- as.numeric(lookUp(probeset, platformDB, "ENTREZID"))</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/1089.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
