<?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; SHRiMP</title>
	<atom:link href="http://www.bio-info-trainee.com/tag/shrimp/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>用 SHRiMP 来比对color space的数据</title>
		<link>http://www.bio-info-trainee.com/1858.html</link>
		<comments>http://www.bio-info-trainee.com/1858.html#comments</comments>
		<pubDate>Thu, 04 Aug 2016 02:08:43 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[基础软件]]></category>
		<category><![CDATA[color space]]></category>
		<category><![CDATA[SHRiMP]]></category>
		<category><![CDATA[solid]]></category>
		<category><![CDATA[比对]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=1858</guid>
		<description><![CDATA[无意中接触了AB 5500xl Genetic Analyzer这个测序仪的数据 &#8230; <a href="http://www.bio-info-trainee.com/1858.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div>无意中接触了AB 5500xl Genetic Analyzer这个测序仪的数据，就是传说中的solid格式，也就是color space的测序数据 ，虽然拿到的测序数据也是fastq格式的， 4行代表一条read，但是第二行已经不是在是碱基序列啦，而是color的编码。Colors may be encoded either as numbers (<code>0</code>=blue, <code>1</code>=green, <code>2</code>=orange, <code>3</code>=red) or as characters <code>A/C/G/T</code> (<code>A</code>=blue, <code>C</code>=green, <code>G</code>=orange, <code>T</code>=red).我们通常称为csfastq格式。</div>
<div>对于这种数据的处理，一般的比对软件是hold 不住的，我查了一下，SHRiMP，sequel和BFAST ，bowtie，是可以处理这种csfastq格式数据的比对的， 我这里简单使用了最出名的SHRiMP 。</div>
<p><span id="more-1858"></span></p>
<div>安装过程如下：</div>
<div>
<blockquote>
<div>## <a href="http://compbio.cs.toronto.edu/shrimp/">http://compbio.cs.toronto.edu/shrimp/</a></div>
<div>cd ~/biosoft</div>
<div>mkdir SHRiMP &amp;&amp;  cd SHRiMP</div>
<div>wget <a href="http://compbio.cs.toronto.edu/shrimp/releases/SHRiMP_2_2_3.lx26.x86_64.tar.gz">http://compbio.cs.toronto.edu/shrimp/releases/SHRiMP_2_2_3.lx26.x86_64.tar.gz</a></div>
<div>tar zxvf SHRiMP_2_2_3.lx26.x86_64.tar.gz</div>
<div>cd SHRiMP_2_2_3</div>
<div>export SHRIMP_FOLDER=$PWD</div>
</blockquote>
</div>
<div>## 如果需要永久使用就添加到.bashrc，如果只是用一次，就export即可。</div>
<div>软件说明书详细介绍了该软件的用法：<a href="http://compbio.cs.toronto.edu/shrimp/README">http://compbio.cs.toronto.edu/shrimp/README</a></div>
<div><span style="color: #ff0000;"><b>如果你的参考基因组很小，那么直接使用就好了。</b></span></div>
<div>
<div>如果是普通的小基因组和小的color space测序序列</div>
<div>
<blockquote>
<pre>$SHRIMP_FOLDER/bin/gmapper-cs <b><span style="color: #ff0000;">test.csfasta</span></b> \
  <span style="color: #ff0000;">reference.fa </span>\
  -N 4 -o 5 -h 80% &gt;map.test.out 2&gt;map.test.log</pre>
</blockquote>
</div>
<div>具体参数意义，大家看软件说明书吧。</div>
<div></div>
<div>或者对于miRNA来说</div>
<blockquote>
<div>##　　We project the database with:</div>
<div>$SHRIMP_FOLDER/utils/project-db.py --seed 00111111001111111100,00111111110011111100,00111111111100111100,00111111111111001100,00111111111111110000 \</div>
<div> --h-flag --shrimp-mode ls miRBase/hairpin.human.fa</div>
<div>##</div>
<div>$SHRIMP_FOLDER/bin/gmapper-ls -L  hairpin.human-ls SRR1542716.fastq <b><span style="color: #ff0000;"> --qv-offset 33</span></b>   \</div>
<div>-o 1 -H -E -a -1 -q -30 -g -30 --qv-offset 33 --strata -N 8  &gt;map.out 2&gt;map.log</div>
</blockquote>
</div>
<p><b><span style="color: #ff0000;">如果你的参加基因太大，超过了你的内存限制，那么就需要技巧了。</span></b></p>
<div>代码也不难，如下：</div>
<div>
<blockquote>
<pre>$SHRIMP_FOLDER/utils/split-db.py --ram-size 14 --prefix hg18 hg18.fa</pre>
<pre>$SHRIMP_FOLDER/utils/project-db.py --shrimp-mode ls hg18-14gb-*.fa</pre>
<pre> for i in 1 2 3 4; do \
      $SHRIMP_FOLDER/bin/gmapper-ls -L hg18-14gb-12_12_12_12seeds-${i}of4-ls \
      reads.500kx2.36bp.ls.fa \
      -N 8 -p opp-in -I 50,500 -m 20 -i -25 -g -40 -e -10 -E \
      &gt;map.db${i}of4.sam 2&gt;map.db${i}of4.log
    done
  [...]
 ls map.db*.sam</pre>
<pre>$SHRIMP_FOLDER/bin/mergesam reads.500kx2.36bp.ls.fa map.db?of4.sam &gt; map.sam</pre>
</blockquote>
<p>最后的map.sam文件就是我们 比对结果啦！</p>
</div>
<div>sam文件我就不解释啦！</div>
<div> 因为把参考基因组分开，还是很麻烦，而且耗时的，我并没有那样做，我的机器1T的内存，我不觉得有什么基因组会超出我的内存限制</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/1858.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>自学miRNA-seq分析第三讲~公共测序数据下载</title>
		<link>http://www.bio-info-trainee.com/1703.html</link>
		<comments>http://www.bio-info-trainee.com/1703.html#comments</comments>
		<pubDate>Sat, 25 Jun 2016 09:08:43 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[miRNA-seq]]></category>
		<category><![CDATA[ncbi]]></category>
		<category><![CDATA[SHRiMP]]></category>
		<category><![CDATA[sratoolkit]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=1703</guid>
		<description><![CDATA[前面已经讲到了该文章的数据已经上传到NCBI的SRA数据中心，所以直接根据索引号 &#8230; <a href="http://www.bio-info-trainee.com/1703.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>前面已经讲到了该文章的数据已经上传到NCBI的SRA数据中心，所以直接根据索引号下载，然后用SRAtoolkit转出我们想要的fastq测序数据即可。下载的数据一般要进行质量控制，可视化展现一下质量如何，然后根据大题测序质量进行简单过滤。所以需要提前安装一些软件来完成这些任务，包括： sratoolkit /fastx_toolkit /fastqc/bowtie2/hg19/miRBase/SHRiMP</p>
<p>下面是我用新服务器下载安装软件的一些代码记录，因为fastx_toolkit /fastqc我已经安装过，就不列代码了，还有miRBase的下载，我在前面第二讲里面提到过，传送门：<a href="http://www.bio-info-trainee.com/1697.html">自学miRNA-seq分析第二讲~学习资料的搜集</a><span id="more-1703"></span></p>
<blockquote>
<div>## pre-step: download sratoolkit /fastx_toolkit_0.0.13/fastqc/bowtie2/hg19/miRBase/SHRiMP</div>
<div>## <a href="http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software">http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software</a></div>
<div>## <a href="http://www.ncbi.nlm.nih.gov/books/NBK158900/">http://www.ncbi.nlm.nih.gov/books/NBK158900/</a></div>
<div> ## 我这里特意挑选的二进制版本程序下载的，这样直接解压就可以用，但是需要挑选适合自己的操作系统的程序。</div>
<div>cd ~/biosoft</div>
<div>mkdir sratoolkit &amp;&amp;  cd sratoolkit</div>
<div>wget <a href="http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.6.3/sratoolkit.2.6.3-centos_linux64.tar.gz">http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.6.3/sratoolkit.2.6.3-centos_linux64.tar.gz</a></div>
<div>##</div>
<div>##  Length: 63453761 (61M) [application/x-gzip]</div>
<div>##  Saving to: "sratoolkit.2.6.3-centos_linux64.tar.gz"</div>
<div>tar zxvf <strong>sratoolkit.2.6.3-centos_linux64.tar.gz</strong></div>
<div></div>
<div>cd ~/biosoft</div>
<div>mkdir bowtie &amp;&amp;  cd bowtie</div>
<div>wget <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.9/bowtie2-2.2.9-linux-x86_64.zip/download">https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.9/bowtie2-2.2.9-linux-x86_64.zip/download</a></div>
<div>#Length: 27073243 (26M) [application/octet-stream]</div>
<div>#Saving to: "download"</div>
<div> mv download  bowtie2-2.2.9-linux-x86_64.zip</div>
<div> unzip <strong>bowtie2-2.2.9-linux-x86_64.zip</strong></div>
<div></div>
<div>## <a href="http://compbio.cs.toronto.edu/shrimp/">http://compbio.cs.toronto.edu/shrimp/</a></div>
<div>mkdir SHRiMP &amp;&amp;  cd SHRiMP</div>
<div>wget <a href="http://compbio.cs.toronto.edu/shrimp/releases/SHRiMP_2_2_3.lx26.x86_64.tar.gz">http://compbio.cs.toronto.edu/shrimp/releases/SHRiMP_2_2_3.lx26.x86_64.tar.gz</a></div>
<div>tar zxvf<strong> SHRiMP_2_2_3.lx26.x86_64.tar.gz </strong></div>
<div>cd SHRiMP_2_2_3</div>
<div>export SHRIMP_FOLDER=$PWD  ## 这个软件使用的时候比较奇葩，需要设置到环境变量，不能简单的调用全路径</div>
</blockquote>
<div>SHRiMP这个软件比较小众，我也是第一次听说过，本来我计划是能用bowtie搞定，就不麻烦了，但是第一次比对出了一个bug，就是下载的miRNA序列里面的U没有转换成T，所以导致比对率非常之低，所以我不得不根据文章里面记录的软件SHRiMP 来做比对，最后发现比对率完全没有改善，搞得我都在怀疑是不是作者乱来了。</div>
<div>下面是下载数据，质量控制的代码，希望大家可以照着运行一下：</div>
<div>
<blockquote>
<div>## step1 : download raw data</div>
<div>mkdir miRNA_test &amp;&amp; cd miRNA_test</div>
<div>echo {14..19} |sed 's/ /\n/g' |while read id; \</div>
<div>do  wget "<a href="ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByStudy/sra/SRP/SRP045/SRP045420/SRR15427$id/SRR15427$id.sra">ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByStudy/sra/SRP/SRP045/SRP045420/SRR15427$id/SRR15427$id.sra</a>"  ;\</div>
<div>done</div>
<div></div>
<div>## step2 :  change sra data to fastq files.</div>
<div>## 主要是用shell脚本来批量下载</div>
<div>ls *sra |while read id; do ~/biosoft/sratoolkit/sratoolkit.2.6.3-centos_linux64/bin/fastq-dump $id;done</div>
<div>rm *sra</div>
<div></div>
<div>##  33M --&gt; 247M</div>
<div>#Read 1866654 spots for SRR1542714.sra</div>
<div>#Written 1866654 spots for SRR1542714.sra</div>
<div></div>
<div></div>
<div>## step3 : download the results from paper</div>
<div>## <a href="http://www.bio-info-trainee.com/1571.html">http://www.bio-info-trainee.com/1571.html</a></div>
<div>## <a href="ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE1nnn/GSE1009/suppl/GSE1009_RAW.tar">ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE1nnn/GSE1009/suppl/GSE1009_RAW.tar</a></div>
<div></div>
<div>mkdir paper_results &amp;&amp; cd paper_results</div>
<div>wget <a href="ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE60nnn/GSE60292/suppl/GSE60292_RAW.tar">ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE60nnn/GSE60292/suppl/GSE60292_RAW.tar</a></div>
<div>## tar xvf GSE60292_RAW.tar</div>
<div>ls *gz |while read id ; do (echo $id;zcat $id | cut -f 2 |perl -alne '{$t+=$_;}END{print $t}');done</div>
<div>ls *gz |xargs gunzip</div>
<div></div>
<div></div>
<div></div>
<div>## step4 : quality assessment</div>
<div></div>
<div>ls *fastq | while read id ; do ~/biosoft/fastqc/FastQC/fastqc $id;done</div>
<div>## Sequence length 8-109</div>
<div>## %GC 52</div>
<div>## Adapter Content passed</div>
<div></div>
<div>## write a script : :: cat &gt;filter.sh</div>
<div></div>
<div>ls *fastq |while read id</div>
<div>do</div>
<div>echo $id</div>
<div>~/biosoft/fastx_toolkit_0.0.13/bin/fastq_quality_filter<strong> -v -q 20 -p 80 -Q33</strong>  -i $id -o tmp ;</div>
<div>~/biosoft/fastx_toolkit_0.0.13/bin/fastx_trimmer <strong>-v -f 1 -l 27</strong> <strong>-i tmp  -Q33 -z</strong> -o ${id%%.*}_clean.fq.gz ;</div>
<div>done</div>
<div>rm tmp</div>
<div></div>
<div>##<strong> discarded 12%~~49%%</strong></div>
<div>ls *_clean.fq.gz | while read id ; do ~/biosoft/fastqc/FastQC/fastqc $id;done</div>
<div></div>
<div>mkdir QC_results</div>
<div>mv *zip *html QC_results</div>
</blockquote>
</div>
<div>这个代码是我自己根据文章的理解写出的，因为我本身不擅长miRNA数据分析，所以在进行QC的时候参数选择可能并不是那么友好，如果有高手能指正就最好了，可以直接打我电话告诉我，或者发邮箱给我，邮箱用户名是jmzeng1314，是163邮箱。</div>
<div>
<div>~/biosoft/fastx_toolkit_0.0.13/bin/fastq_quality_filter<strong> -v -q 20 -p 80 -Q33</strong>  -i $id -o tmp ;</div>
<div>~/biosoft/fastx_toolkit_0.0.13/bin/fastx_trimmer <strong>-v -f 1 -l 27</strong> <strong>-i tmp  -Q33 -z</strong> -o ${id%%.*}_clean.fq.gz ;</div>
<div>最后得到的clean.fq.gz系列文件，就是我需要进行比对的序列啦。</div>
<div></div>
<div></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/1703.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
