<?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; blast</title>
	<atom:link href="http://www.bio-info-trainee.com/tag/blast/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>一步一步运行软件系列合集</title>
		<link>http://www.bio-info-trainee.com/619.html</link>
		<comments>http://www.bio-info-trainee.com/619.html#comments</comments>
		<pubDate>Fri, 10 Apr 2015 14:30:49 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[杂谈-随笔]]></category>
		<category><![CDATA[blast]]></category>
		<category><![CDATA[inparanoid]]></category>
		<category><![CDATA[phyML]]></category>
		<category><![CDATA[plink]]></category>
		<category><![CDATA[进化树]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=619</guid>
		<description><![CDATA[这些是很久以前写的一些教程，是关于进化树构建和全基因组关联分析的！ gwas-p &#8230; <a href="http://www.bio-info-trainee.com/619.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>这些是很久以前写的一些教程，是关于进化树构建和全基因组关联分析的！</p>
<p>gwas-plink分析教程.pdf<br />
plink的统计基础.ppt<br />
一步一步构建系统进化树.pdf<br />
一步一步运行blast.pdf<br />
一步一步运行inparanoid蛋白聚类.pdf<br />
一步一步运行PLINK-part1.pdf<br />
一步一步运行plink-part2.pdf<br />
用PhyML构建系统发育树.pptx<br />
进化树的构建分子原理.pdf</p>
<p>都在云盘(http://pan.baidu.com/s/1jIvwRD8 )里面，群空间（201161227）里面也有！</p>
<p>暂时应该不会写这些教程了，因为没有项目，实在没有动力去做那么多事情</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/619.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>旧版本blast详解</title>
		<link>http://www.bio-info-trainee.com/452.html</link>
		<comments>http://www.bio-info-trainee.com/452.html#comments</comments>
		<pubDate>Tue, 24 Mar 2015 09:20:43 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[基础数据库]]></category>
		<category><![CDATA[基础软件]]></category>
		<category><![CDATA[blast]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=452</guid>
		<description><![CDATA[其实我现在一般都用的是blast++了，也专门写了篇日志介绍它！ 但是看到一些就 &#8230; <a href="http://www.bio-info-trainee.com/452.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>其实我现在一般都用的是blast++了，也专门写了篇日志介绍它！</p>
<p>但是看到一些就的服务器上面只有blast，所以就搜了一些它的用法。</p>
<p>主要参考 http://www.bio.ku.dk/nuf/resources/BLAST_index.htm</p>
<p>很简单的两个步骤</p>
<p>首先建库<span style="font-family: Verdana; font-size: small;">formatdb -i Cad16_aa.fasta -p T -o F</span></p>
<p>就是把 Cad16_aa.fasta这个序列文件变成blast专用的库，-p选项中的T是代表蛋白库</p>
<p>然后就比对咯，比对程序有六个，需要用-p来选择</p>
<p><span style="font-family: Verdana; font-size: small;">blastall -p blastx -d nr -i 19A.fa -o 19A.outm -v 1 -b 1 -m 8</span></p>
<p>上面这个命令就是选择了blastx这个比对程序，数据库是nr ，输入的查询序列是 19A.fa</p>
<p>然后我们输出格式的m8，这个格式很重要，我们还可以设置-a控制cpu数量，和-e控制阈值</p>
<div align="left">
<table border="0" width="650" cellspacing="1">
<tbody>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#C0C0C0" width="618">
<p align="left"><span style="font-family: Verdana; font-size: large;">BLAST programs</span></p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="74"><span style="font-family: Verdana; font-size: small;"><b>blastp</b></span></td>
<td align="left" valign="top" width="544"><span style="font-family: Verdana; font-size: small;"><b>Protein</b> query &gt; <b>Protein </b>database</span></td>
</tr>
<tr>
<td align="left" valign="top" width="74"><span style="font-family: Verdana; font-size: small;"><b>blastn</b></span></td>
<td align="left" valign="top" width="544"><span style="font-family: Verdana; font-size: small;"><b>Nucleotide</b> query &gt; <b>Nucleotide</b> database</span></td>
</tr>
<tr>
<td align="left" valign="top" width="74"><span style="font-family: Verdana; font-size: small;"><b>blastx</b></span></td>
<td align="left" valign="top" width="544"><span style="font-family: Verdana; font-size: small;"><b>Nucleotide</b> query &gt; <b>Protein</b> database (via translated query)</span></td>
</tr>
<tr>
<td align="left" valign="top" width="74"><span style="font-family: Verdana; font-size: small;"><b>tblastn</b></span></td>
<td align="left" valign="top" width="544"><span style="font-family: Verdana; font-size: small;"><b>Protein</b> query &gt; <b>Nucleotide</b> database (via translated database)</span></td>
</tr>
<tr>
<td align="left" valign="top" width="74"><span style="font-family: Verdana; font-size: small;"><b>tblastx</b></span></td>
<td align="left" valign="top" width="544"><span style="font-family: Verdana; font-size: small;"><b>Nucleotide</b> query &gt; <b>Nucleotide</b> database (via translated query and database) </span></td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-family: Verdana; font-size: small;"> </span></p>
<div align="left">
<table border="0" width="650" cellspacing="1">
<tbody>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#C0C0C0" width="618">
<p align="left"><span style="font-family: Verdana; font-size: large;">Formatting database for local BLAST</span></p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="32"><span style="font-family: Verdana; font-size: small;">-</span></td>
<td align="left" valign="top" width="586"><span style="font-family: Verdana; font-size: small;">Show a list of all arguments.</span></td>
</tr>
<tr>
<td align="left" valign="top" width="32"><span style="font-family: Verdana; font-size: small;">-i</span></td>
<td align="left" valign="top" width="586"><span style="font-family: Verdana; font-size: small;">Input file(s) for formatting. Optional.</span></td>
</tr>
<tr>
<td align="left" valign="top" width="32"><span style="font-family: Verdana; font-size: small;">-p</span></td>
<td align="left" valign="top" width="586"><span style="font-family: Verdana; font-size: small;">Type of file [T/F]. T = protein, F = nucleotide. Default = T.</span></td>
</tr>
<tr>
<td align="left" valign="top" width="32"><span style="font-family: Verdana; font-size: small;">-o</span></td>
<td align="left" valign="top" width="586"><span style="font-family: Verdana; font-size: small;">Parse option [T/F]. T = Parse SeqId and create indexes, F = Do not parse or create indexes.</span></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" width="618"></td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/452.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hg19基因组的分析</title>
		<link>http://www.bio-info-trainee.com/425.html</link>
		<comments>http://www.bio-info-trainee.com/425.html#comments</comments>
		<pubDate>Sat, 21 Mar 2015 14:48:43 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[基础数据库]]></category>
		<category><![CDATA[blast]]></category>
		<category><![CDATA[hg19]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[比对]]></category>
		<category><![CDATA[短序列]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=425</guid>
		<description><![CDATA[下载地址我就不贴了，随便谷歌一下即可！ Genome Reference Con &#8230; <a href="http://www.bio-info-trainee.com/425.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><b>下载地址我就不贴了，随便谷歌一下即可！</b></p>
<p><b>Genome Reference Consortium Human  ---》  GRCh3</b></p>
<p><b>Feb. 2009 (hg19, GRCh37)</b><b>这个是重点</b></p>
<p>Mar 2006 assembly = hg18 = NCBI36.</p>
<p>May 2004 assembly = hg17 = NCBI35.</p>
<p>July 2003 assembly = hg16 = NCBI34</p>
<p>以前的老版本就不用看啦，现在其实都已经有hg38出来啦，GRCh38 (NCBI) and hg38(UCSC)</p>
<p>参考：<a href="http://age.wang.blog.163.com/blog/static/119252448201092284725460/">http://age.wang.blog.163.com/blog/static/119252448201092284725460/</a></p>
<p><a href="http://www.ncbi.nlm.nih.gov/projects/genome/assembly/grc/human/">http://www.ncbi.nlm.nih.gov/projects/genome/assembly/grc/human/</a></p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析570.png"><img class="alignnone size-full wp-image-426" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析570.png" alt="Hg19基因组的分析570" width="481" height="228" /></a></p>
<p>人的hg19基因组是3G的大小，因为一个英文字符是一个字节，所以也是30亿bp的碱基。</p>
<p>包括22条常染色体和X,Y性染色体及M线粒体染色体。</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析643.png"><img class="alignnone size-full wp-image-427" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析643.png" alt="Hg19基因组的分析643" width="437" height="326" /></a></p>
<p>查看该文件可以看到，里面有很多的N，这是基因组里面未知的序列，用N占位，但是觉得部分都是A.T.C.G这样的字符，大小写都有，分别代表不同的意思。</p>
<p>然后我用linux的命令统计了一下里面这个文件的行数，</p>
<p>perl -lne 'END { print $. }'  hg19.fa</p>
<p>awk 'END { print NR }'  hg19.fa</p>
<p>wc -l hg19.fa</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析834.png"><img class="alignnone size-full wp-image-428" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析834.png" alt="Hg19基因组的分析834" width="554" height="253" /></a></p>
<p>然后我写了一个脚本统计每条染色体的长度，42秒钟完成任务！</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析1125.png"><img class="alignnone size-full wp-image-429" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析1125.png" alt="Hg19基因组的分析1125" width="512" height="419" /></a></p>
<p>看来这个服务器的性能还是蛮强大的，读取文件非常快！</p>
<p>[perl]</p>
<p>while(&lt;&gt;){</p>
<p>        chomp;</p>
<p>        if  (/&gt;/){</p>
<p>if  (exists $hash_chr{$key} ){</p>
<p>$len = length $hash_chr{$key};</p>
<p>print &quot;$key   =&gt;   $len\n&quot;;</p>
<p>}</p>
<p>undef %hash_chr;</p>
<p>$key=$_;</p>
<p>}</p>
<p>else {</p>
<p>$hash_chr{$key}.=$_;</p>
<p>}</p>
<p>}</p>
<p>[/perl]</p>
<p>&nbsp;</p>
<p>然后我用seed统计了一下hg19的词频（我不知道生物信息学里面的专业描述词语是什么）</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析1171.png"><img class="alignnone size-full wp-image-430" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析1171.png" alt="Hg19基因组的分析1171" width="554" height="260" /></a></p>
<p>我的程序耗费了42分钟才跑完，感觉我写的程序应该是没有问题的，让我吃惊的是总共竟然只有105万条独特的10bp短序列。然后我算了一下4的10次方，(⊙o⊙)…悲剧，原来只有1048576，之所以出现这种情况，是因为里面有N这个字符串，不仅仅是A.T.C.G四个字符。我用grep -v N seed10.txt |wc -l命令再次统计了一下，发现居然就是1048576，也就是说，任意A.T.C.G四个字符组成的10bp字符串短序列在人的基因组里面都可以找到！！！</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析1407.png"><img class="alignnone size-full wp-image-431" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/Hg19基因组的分析1407.png" alt="Hg19基因组的分析1407" width="501" height="275" /></a></p>
<p>然后我测试了一下，还是真是这样的，真是一个蛮有意思的现象。虽然我无法解释为什么，但是根据这个结果我们可以得知连续的A或者T在人类基因组里面高频出现，而连续的G或者C却很少！</p>
<p>如果我们储存这个10bp字符串的同时，也储存着它们在基因组的位置，那么就可以根据这个seed来进行比对，这就是blast的原理之一！</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/425.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NCBI的blast++软件使用说明书</title>
		<link>http://www.bio-info-trainee.com/44.html</link>
		<comments>http://www.bio-info-trainee.com/44.html#comments</comments>
		<pubDate>Sat, 07 Mar 2015 12:49:33 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[基础软件]]></category>
		<category><![CDATA[blast]]></category>
		<category><![CDATA[ncbi]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=44</guid>
		<description><![CDATA[NCBI的blast++软件的使用 目录 一：下载安装该软件 二：准备数据 三： &#8230; <a href="http://www.bio-info-trainee.com/44.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><b>NCBI的blast++软件的使用</b></p>
<p><b>目录</b></p>
<p><b>一：下载安装该软件</b></p>
<p><b>二：准备数据</b></p>
<p><b>三：运行命令</b></p>
<p><b>四：输出文件解读</b></p>
<p><b>正文</b></p>
<p><b>一：下载安装该软件</b></p>
<p>在NCBI的ftp站点里面可以找到blast++的下载链接</p>
<p>wget  ftp://ftp.ncbi.nlm.nih.gov/blast/executables/LATEST/ncbi-blast-2.2.30+-x64-linux.tar.gz<span id="more-44"></span></p>
<p>我们一般选择适合我们操作系统的二进制版本，解压即可使用</p>
<p><img class="alignnone size-full wp-image-45" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/NCBI的blast使用414.png" alt="NCBI的blast使用414" width="261" height="313" /></p>
<p>可以把它们添加到PATH，前提是有root权限，或者把该目录添加到PATH也行。</p>
<p>cp  *  /home/jmzeng/my-bin/bin/</p>
<p>我把my-bin添加到了我的PATH，所以可以直接使用这些程序了<br />
<b>二：准备数据</b></p>
<p>只需要fasta文件的数据即可，query和target都可以是该fasta文件，可以随便找两个fa文件做测试</p>
<p><b>三：运行命令</b></p>
<p>1，建库，用makeblastdb，标准是</p>
<p>makeblastdb -in db.fasta -dbtype prot -parse_seqids -out dbname</p>
<p><i>具体参数看help里面的，但是我们一般用这几个就够了的</i></p>
<p><img class="alignnone size-full wp-image-46" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/NCBI的blast使用953.png" alt="NCBI的blast使用953" width="499" height="130" /></p>
<p>我的例子 ：对200M的蛋白文件</p>
<p>makeblastdb -in uniprot_sprot.trinotate_v2.0.pep -dbtype prot -parse_seqids -out sprot</p>
<p><img class="alignnone size-full wp-image-47" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/NCBI的blast使用1255.png" alt="NCBI的blast使用1255" width="504" height="115" /></p>
<p>输出的文件如下，基本不需要看，反正调用的时候只用sprot这个</p>
<p><img class="alignnone size-full wp-image-48" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/NCBI的blast使用1489.png" alt="NCBI的blast使用1489" width="203" height="88" /></p>
<p>对8G的uniref90，</p>
<p>makeblastdb -in uniprot_uniref90.trinotate_v2.0.pep -dbtype prot -parse_seqids -out uniref90</p>
<p><img class="alignnone size-full wp-image-49" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/03/NCBI的blast使用1794.png" alt="NCBI的blast使用1794" width="513" height="113" /></p>
<p>2，比对分为好几种，blastn, blastp,blastx，tblastn，tblastx</p>
<ul>
<li>blastp -query seq.fasta -out seq.blast -db dbname -outfmt 6 -evalue 1e-5 -num_descriptions 10 -num_threads 8</li>
<li>blastn -query seq.fasta -out seq.blast -db dbname -outfmt 6 -evalue 1e-5 -num_descriptions 10 -num_threads 8</li>
<li>blastx -query seq.fasta -out seq.blast -db dbname -outfmt 6 -evalue 1e-5 -num_descriptions 10 -num_threads 8</li>
</ul>
<p>参数说明:</p>
<ul>
<li><i>-query： 输入文件路径及文件名</i></li>
<li><i>-out：输出文件路径及文件名</i></li>
<li><i>-db：格式化了的数据库路径及数据库名</i></li>
<li><i>-outfmt：输出文件格式，总共有12种格式，6是tabular格式对应BLAST的m8格式</i></li>
<li><i>-evalue：设置输出结果的e-value值</i></li>
<li><i>-num_descriptions：tabular格式输出结果的条数</i></li>
<li><i>-num_threads：线程数</i></li>
</ul>
<p><b>四：输出文件解读</b></p>
<p>重点是-outfmt 6，也就是之前版本的m 8格式</p>
<p><i>结果中从左到右每一列的意义分别是：</i></p>
<ul>
<li><i>[00] Query id</i></li>
<li><i>[01] Subject id</i></li>
<li><i>[02] % identity</i></li>
<li><i>[03] alignment length</i></li>
<li><i>[04] mismatches</i></li>
<li><i>[05] gap openings</i></li>
<li><i>[06] q. start</i></li>
<li><i>[07] q. end</i></li>
<li><i>[08] s. start</i></li>
<li><i>[09] s. end</i></li>
<li><i>[10] e-value</i></li>
<li><i>[11] bit score</i></li>
</ul>
<p><i> </i></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/44.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
