<?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; RMySQL</title>
	<atom:link href="http://www.bio-info-trainee.com/tag/rmysql/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>生物信息学学者学习mysql之路</title>
		<link>http://www.bio-info-trainee.com/1045.html</link>
		<comments>http://www.bio-info-trainee.com/1045.html#comments</comments>
		<pubDate>Fri, 16 Oct 2015 10:49:20 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[RMySQL]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=1045</guid>
		<description><![CDATA[我一直都知道mysql其实很有用的， 哪怕是在bioinformatics领域。 &#8230; <a href="http://www.bio-info-trainee.com/1045.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div>我一直都知道mysql其实很有用的， 哪怕是在bioinformatics领域。也断断续续的看过不少mysql教程，只是苦于没有机会应用。毕竟应用才是最好的学习方法，正好这些天需要用了，我就又梳理了一遍作为一个生物信息学学者，该如何学习mysql数据库。</div>
<div>先看中文教程：<a href="http://www.cnblogs.com/mr-wid/archive/2013/05/09/3068229.html">http://www.cnblogs.com/mr-wid/archive/2013/05/09/3068229.html</a></div>
<div>
<div>然后再搜搜一堆技巧</div>
<div><a href="https://dev.mysql.com/doc/refman/5.1/en/counting-rows.html">https://dev.mysql.com/doc/refman/5.1/en/counting-rows.html</a></div>
<div><a href="http://www.w3schools.com/sql/sql_func_count.asp">http://www.w3schools.com/sql/sql_func_count.asp</a></div>
<div><a href="https://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html">https://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html</a></div>
<div><a href="http://hahaxiao.techweb.com.cn/archives/477.html">http://hahaxiao.techweb.com.cn/archives/477.html</a></div>
<div>差不多就可以开始啦。</div>
<div>我们不拿数据库来做网页，所以需要的仅仅是查询公共数据库的数据，当然，一般人都会选择直接去网页可视化的查询，或者去ftp批量下载后自己写脚本来查询，我以前也是这样想的，所以感觉mysql没什么用，因为它能做的， 我写一个脚本都能做到。但是任何事物能发展到如此流行的程度毕竟还是有它的优点的。</div>
<div>而在我看来，mysql的优点就是，不需要存储大量的文件信息，随查随用，如果我们想把数据库备份到本地，就要建立一大堆的文件夹，存放各种refgene信息呀，entrez gene信息呀，转录本，外显子等等各个文件夹，每个文件夹下面还有一堆文件，而且还要分物种存储，总之就是很麻烦，但是在数据库就不一样啦。</div>
<div>比如我们可以连接UCSC的数据库 （前提是你的机器里面可以允许mysql这个命令，而且你可以联网）</div>
<div>mysql --user=genome --host=<a href="http://genome-mysql.cse.ucsc.edu/">genome-mysql.cse.ucsc.edu</a><span class="Apple-converted-space"> </span>-A</div>
<div>就这么简单， 你就用mysql远程登录了UCSC的数据库，可以show databases;或者use database hg19 ; 等等</div>
<div>里面有两百多个数据库，主要是多物种多版本，然后如果我们看hg19这个数据库，里面还有一万多个数据表，包含着hg19的全面信息。</div>
<div>还有很多其它的公共数据库可以练习<br />
来自于：<a href="https://www.biostars.org/p/474/#9095">https://www.biostars.org/p/474/#9095</a></p>
<p>for example, I would cite:</p>
<p>UCSC <a href="http://genome.ucsc.edu/FAQ/FAQdownloads#download29">http://genome.ucsc.edu/FAQ/FAQdownloads#download29</a><br />
ENSEMBL <a href="http://uswest.ensembl.org/info/data/mysql.html">http://uswest.ensembl.org/info/data/mysql.html</a><br />
GO <a href="http://www.geneontology.org/GO.database.shtml#mirrors">http://www.geneontology.org/GO.database.shtml#mirrors</a></p>
<p>1000 Genomes: since June 16, 2011: <a href="http://www.1000genomes.org/public-ensembl-mysql-instance">http://www.1000genomes.org/public-ensembl-mysql-instance</a></p>
<p>mysql -h mysql-db.1000genomes.org -u anonymous -P 4272</p>
<p>Flybase has direct access to its postgres chado database.<br />
<a href="http://flybase.org/forums/viewtopic.php?f=14&amp;t=114">http://flybase.org/forums/viewtopic.php?f=14&amp;t=114</a><br />
hostname: flybase.org port: 5432 username: flybase password: no password database name: flybase<br />
e.g. psql -h flybase.org -U flybase flybase</p>
<p>mysql -h database.nencki-genomics.org -u public<br />
mysql -h useastdb.ensembl.org -u anonymous -P 5306</p></div>
<div>你都可以登录进去看看里面有什么，也可以练习练习mysql的语法，但是增删改查种的查是可以用的</div>
<div></div>
<div>然后我们可以用R或者perl或者Python来连接数据库，也是蛮好用的， 我现在比较倾向于R</div>
<div>所以我就简单看了一下这个包的说明书，然后成功连接了</div>
<div>
<div>#Connect to the MySQL server using the command:</div>
<div>#mysql --user=genome --host=<a href="http://genome-mysql.cse.ucsc.edu/">genome-mysql.cse.ucsc.edu</a><span class="Apple-converted-space"> </span>-A</div>
<div>#The -A flag is optional but is recommended for speed</div>
<div>library(RMySQL)</div>
<div>my.host="<a href="http://genome-mysql.cse.ucsc.edu/">genome-mysql.cse.ucsc.edu</a>";</div>
<div>my.port="";</div>
<div>my.user="genome";</div>
<div>my.password="";</div>
<div>my.db="hg19";</div>
<div>#there are 203 databases,such as hg18,hg38,mm9,mm10,ce10</div>
<div>con &lt;- dbConnect(MySQL(), host=my.host, user=my.user,dbname=my.db)</div>
<div>dbListTables(con) # there are 11016 tables in this hg19 database;</div>
<p>是不是很简单呀，只有你认真的学习，其实这些应用的东西都还是蛮简单的。</p></div>
<div>下面这本书也比较好，就讲了R或者perl或者Python来连接数据库，很全面</p>
<div><a href="http://bioinformatics.risha.me/category/mysql/">http://bioinformatics.risha.me/category/mysql/</a></div>
</div>
<div>当然，如果想看mysql在bioinformatics方面的应用，下面还有很多学习资料</div>
<div><a href="http://www.biomedcentral.com/1471-2105/11/342">http://www.biomedcentral.com/1471-2105/11/342</a></p>
<div><a href="http://bioinformatics.oxfordjournals.org/content/28/14/1947.full.pdf">http://bioinformatics.oxfordjournals.org/content/28/14/1947.full.pdf</a></div>
<div><a href="https://rostlab.org/owiki/images/7/73/Protocol_goldberg.pdf">https://rostlab.org/owiki/images/7/73/Protocol_goldberg.pdf</a></div>
<div><a href="http://webdoc.nyumc.org/nyumc/files/sun-lab/attachments/CPBI.Ch9.Biol.DB.pdf">http://webdoc.nyumc.org/nyumc/files/sun-lab/attachments/CPBI.Ch9.Biol.DB.pdf</a></div>
<div><a href="http://www.bsi.umn.edu/resources/perl3.pdf">http://www.bsi.umn.edu/resources/perl3.pdf</a></div>
<div><a href="http://www.cs.toronto.edu/~leijiang/ta/mie453/tutorial/tut5/">http://www.cs.toronto.edu/~leijiang/ta/mie453/tutorial/tut5/</a></div>
<div></div>
<div>这个课程比较全面：Biological Databases in Bioinformatics (BioE 594)</div>
<div><a href="http://bioinformatics.bioe.uic.edu/online/BioE594_db.shtml">http://bioinformatics.bioe.uic.edu/online/BioE594_db.shtml</a></div>
<div></div>
</div>
<div>进阶版还可以看看具体事例，GO数据库的设计：<a href="http://geneontology.org/page/lead-database-schema">http://geneontology.org/page/lead-database-schema</a></div>
<div>从这个来看，python要比perl 好很多<a href="http://www.personal.psu.edu/iua1/courses/files/2010/week15.pdf">http://www.personal.psu.edu/iua1/courses/files/2010/week15.pdf</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/1045.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
