<?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%8d%95%e7%ab%af%e5%8f%8c%e7%ab%af/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>一个RNA-seq的反思</title>
		<link>http://www.bio-info-trainee.com/2275.html</link>
		<comments>http://www.bio-info-trainee.com/2275.html#comments</comments>
		<pubDate>Thu, 12 Jan 2017 10:51:22 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[转录组软件]]></category>
		<category><![CDATA[全半角]]></category>
		<category><![CDATA[单端双端]]></category>
		<category><![CDATA[默认参数]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=2275</guid>
		<description><![CDATA[熟悉我的人都知道RNA-seq是我的拿手好戏啦！ 但是，今天处理了一个公共数据， &#8230; <a href="http://www.bio-info-trainee.com/2275.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div>熟悉我的人都知道RNA-seq是我的拿手好戏啦！</div>
<div>但是，今天处理了一个公共数据，比对率低的惊人！</div>
<div>是测序数据质量不好？</div>
<div>难道grcm38与mm10有差别？</div>
<div>还是比对工具的默认参数不行？</div>
<div>请看下去，看看老司机是如何翻车的！</div>
<div></div>
<p><span id="more-2275"></span></p>
<div>数据比较新，是理所当然的认为测序数据肯定是OK的：<a href="https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE81916">https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE81916</a></div>
<div><a href="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/12.png"><img class="alignnone size-full wp-image-2276" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/12.png" alt="1" width="303" height="97" /></a></div>
<div>下载sra数据，转换为fastq我就不讲解了！</div>
<div>Written 30468155 spots for SRR3589959.sra</div>
<div>Written 52972617 spots for SRR3589960.sra</div>
<div>Written 36763726 spots for SRR3589961.sra</div>
<div>Written 43802631 spots for SRR3589962.sra</div>
<div>我用的是hisat2工具来比对，一般情况下我就用默认参数啦！</div>
<div>reference=/home/jianmingzeng/reference/index/hisat/grcm38/genome</div>
<div>~/biosoft/HISAT/current/hisat2 -p 5 -x $reference -U SRR3589959.fastq -S control_1.sam 2&gt;control_1.log</div>
<div>~/biosoft/HISAT/current/hisat2 -p 5 -x $reference -U SRR3589960.fastq -S control_2.sam 2&gt;control_2.log</div>
<div>~/biosoft/HISAT/current/hisat2 -p 5 -x $reference -U SRR3589961.fastq -S Akap95_1.sam 2&gt;Akap95_1.log</div>
<div>~/biosoft/HISAT/current/hisat2 -p 5 -x $reference -U SRR3589962.fastq -S Akap95_2.sam 2&gt;Akap95_2.log</div>
<div>ls *sam |while read id;do (nohup samtools sort -n -@ 5 -o ${id%%.*}.Nsort.bam $id &amp;);done</div>
<div>但是让我意外的是比对率出奇的低~~~</div>
<div>0.48% overall alignment rate</div>
<div>0.62% overall alignment rate</div>
<div>0.48% overall alignment rate</div>
<div>0.49% overall alignment rate</div>
<div></div>
<div>起初我怀疑是参考基因组用错了，但是我查看了GEO里面的介绍，的确是mouse的ESC，所以我用grcm38没有问题呀！</div>
<div>然后我怀疑是测序数据质量的问题，但是质量再差也不会导致如此低的比对率呀~~~</div>
<div>所以我还是用fastqc检查了一下：</div>
<div><img class="alignnone size-full wp-image-2277" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/22.png" alt="2" width="882" height="596" /></div>
<div></div>
<div>果然，质量值好到爆！！！！</div>
<div></div>
<div>而且我抽取了几条序列去blat一下，发现也可以比对呀，而且很明显是跨越intron的比对，超级经典的RNA-seq数据呀!!!</p>
<div><strong><span style="color: #ff0000;">( 其实我这个blat结果也没有看仔细，正常的reads不应该被截成比对到基因组的正负链的，这其实预示着我把PE序列拼接了。)</span></strong></div>
</div>
<div><img class="alignnone size-full wp-image-2278" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/31.png" alt="3" width="745" height="347" /></div>
<div>那么就是我hisat2这个步骤的问题咯,我首先怀疑是不是我下载hisat的index搞错了，虽然看起来我命名是grcm38，但是有可能是我下载错误！我打开了sam文件看了看开头：</div>
<div><img class="alignnone size-full wp-image-2279" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/41.png" alt="4" width="254" height="350" /></div>
<div>貌似的确是mouse基因组的染色体长度呀！很诡异，而且我清楚的记得，我下载的就是mouse的基因的索引呀！</div>
<div><img class="alignnone size-full wp-image-2280" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/51.png" alt="5" width="629" height="133" /></div>
<div><a href="https://ccb.jhu.edu/software/hisat2/index.shtml">https://ccb.jhu.edu/software/hisat2/index.shtml</a></div>
<div><img class="alignnone size-full wp-image-2281" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/61.png" alt="6" width="304" height="151" /></div>
<div>难道grcm38与mm10有差别？</div>
<div>我就先用bowtie2测试一下mm10吧，毕竟我还没有hisat2的mm10的index呀！</div>
<div>head -1000 SRR3589959.fastq &gt;tmp.fq</div>
<div>~/biosoft/bowtie/bowtie2-2.2.9/bowtie2 -p 6 -x ~/reference/index/bowtie/mm10 -U tmp.fq -S tmp.sam</div>
<div>结果我挑出来的这1000条序列，全军覆没了，0.00% overall alignment rate，我傻眼了！</div>
<div>没办法呀，逼着我换hg19参考基因组看看：</div>
<div>~/biosoft/bowtie/bowtie2-2.2.9/bowtie2 -p 6 -x ~/reference/index/bowtie/hg19 -U tmp.fq -S tmp.hg19.sam</div>
<div>仍然是全军覆没了，0.00% overall alignment rate，继续傻眼！</div>
<div></div>
<div>
<div>回过头看了看fastqc的报告，发现前面10个碱基的确有问题的！<strong>如果只是对RNA-seq进行定量，可能需要trim掉，但是，我以前从来不trim，照样不影响比对呀</strong></div>
<div><img class="alignnone size-full wp-image-2282" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/71.png" alt="7" width="872" height="621" /></div>
<div>不过，暂时看到这个问题，我就试着解决一下吧，先从这个思路来，</p>
<div>而且比对工具里面本来就有这个选项，没必要自己来trim的！具体参数见：<a href="https://ccb.jhu.edu/software/hisat2/manual.shtml">https://ccb.jhu.edu/software/hisat2/manual.shtml</a></div>
<div></div>
<div>-5/--trim5 &lt;int&gt; trim &lt;int&gt; bases from 5'/left end of reads (0)</div>
<div>-3/--trim3 &lt;int&gt; trim &lt;int&gt; bases from 3'/right end of reads (0)</div>
<div></div>
</div>
</div>
<div>所以我加上了-p 6 -5 10 -3 10 --local 参数，比对人，可以拿到35.60% overall alignment rate，比对mouse，可以拿到98.80% overall alignment rate ，我勒个去，<span style="color: #ff0000;"><strong>问题出来了，看起来好像是应该trim掉呀。以前的万能默认参数不行了！！！！</strong></span></div>
<div>但是有个问题，虽然我用local模式都比对上了，但是首先100bp的reads我切成了80，而且都是40M，40S，说明只有reads的一般成功比对到了参考基因组序列呀！！！！</div>
<div></div>
<div>我然后用同样的参数，我测试了hisat2工具，但是hisat2里面压根就没有local的选项，<span style="color: #ff0000;"><strong>仅仅是trim一下，对比对的改善毫无意义，所以重点在于--local这个参数，但它只是表象，本质还是这个测序数据出问题了！</strong></span></div>
<div>数据为什么会出问题呢?</div>
<div>我再回过头看了看测序数据的fastqc报告，我勒个去，这么重要的图我居然忽略掉了，再联想到前面的40M，40S我瞬间明白了，这肯定是一个双端测序，被我搞成 了单端测序数据！</div>
<div><img class="alignnone size-full wp-image-2283" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/8.png" alt="8" width="918" height="653" /></div>
<div>而且我再去GEO介绍上面看，上面赫然写着PAIRED！！！！我死也想不明白，我明明是加了--split-3 参数呀，为什么sra转换成fastq会出这么明显的错误呢？</div>
<div><img class="alignnone size-full wp-image-2284" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/9.png" alt="9" width="303" height="136" /></div>
<div>然后我检查我的脚本，马勒戈壁，我自己从我博客里面复制了我的代码，</div>
<div><img class="alignnone size-full wp-image-2285" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/10.png" alt="10" width="367" height="126" /></div>
<div><span style="color: #ff0000;"><strong>唯一值得你看的就是这个图</strong></span></div>
<div><span style="color: #ff0000;"><strong>是-- 不是— ，全角半角害死人呀，而且这个参数不识别它居然不报错，而是忽略我 参数！！！</strong></span></div>
<div><span style="color: #ff0000;"><strong>是-- 不是— ，全角半角害死人呀，而且这个参数不识别它居然不报错，而是忽略我 参数！！！</strong></span></div>
<div><span style="color: #ff0000;"><strong>是-- 不是— ，全角半角害死人呀，而且这个参数不识别它居然不报错，而是忽略我 参数！！！</strong></span></div>
<div>更要命的是我把wget跟fastq-dump一起运行的，而wget会给出一大堆的log日志，我都懒得看，结果，把fastq-dump的报错日志给掩盖了。</div>
<div><img class="alignnone size-full wp-image-2286" src="http://www.bio-info-trainee.com/wp-content/uploads/2017/01/111.png" alt="11" width="667" height="182" /></div>
<div>这就是老司机翻车的全部故事，希望你们引以为戒！</div>
<div>因为前面一直处理的是单端的数据，所以这个错误没有被发现。</div>
<div>我痛恨我博客的脚本了，而且我痛恨--这样的参数设置！</div>
<div>下面是我修改后的代码！！！</div>
<div>cut -f 3 config.txt |while read id ; do wget $id 2&gt;/dev/null ;done</div>
<div>ls *sra |while read id; do ~/biosoft/sratoolkit/sratoolkit.2.6.3-centos_linux64/bin/fastq-dump --gzip --split-3 $id;done</div>
<div>老司机现在很伤心，一天的功夫白费了。</div>
<div></div>
<div>因为我已经把sra数据删除了，想重来一次的机会都不给我~~~</div>
<div>又要重新下载一次，好惨啊！！！！</div>
<div></div>
<div></div>
<div>总结一下吧：</div>
<div>QC这一步骤非常重要，不能太马虎！</div>
<div>原始数据不要随意删除，给自己一次重新来过的机会。</div>
<div></div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/2275.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
