<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[一致性序列]]></title><description><![CDATA[<h1>Consensus sequence(最常见的碱基)</h1>
<p dir="auto"><a href="http://www.metagenomics.wiki/tools/samtools/consensus-sequence" rel="nofollow ugc">http://www.metagenomics.wiki/tools/samtools/consensus-sequence</a></p>
<p dir="auto"><a href="https://samtools.github.io/bcftools/howtos/consensus-sequence.html" rel="nofollow ugc">https://samtools.github.io/bcftools/howtos/consensus-sequence.html</a></p>
<h2>步骤</h2>
<p dir="auto">1)根据参比基因序列比对短读序列</p>
<pre><code class="language-bash"># Create bowtie2 database
bowtie2-build REFERENCE.fasta REF_DB

# bowtie2 mapping
bowtie2 -x REF_DB -U SAMPLE.fastq --no-unal -S SAMPLE.sam

# samtools:  sort .sam file and convert to .bam file
samtools view -bS SAMPLE.sam | samtools sort - -o SAMPLE.bam
</code></pre>
<p dir="auto">2)从<code>.bam</code>文件中获得consensus 序列</p>
<pre><code class="language-bash"># 获得一致性序列，vcfutils.pl 是 bcftools程序的一个脚本
samtools mpileup -uf REFERENCE.fasta SAMPLE.bam | bcftools call -c | vcfutils.pl vcf2fq &gt; SAMPLE_cns.fastq 

# 将 .fastq 转换为 .fasta ，设置碱基质量 lower than 20 to N
seqtk seq -aQ64 -q20 -n N SAMPLE_cns.fastq &gt; SAMPLE_cns.fasta
</code></pre>
<h2></h2>
<pre><code class="language-bash"> 
# call variants
bcftools mpileup -Ou -f reference.fa alignments.bam | bcftools call -mv -Oz -o calls.vcf.gz
bcftools index calls.vcf.gz

# normalize indels
bcftools norm -f reference.fa calls.vcf.gz -Ob -o calls.norm.bcf

# filter adjacent indels within 5bp
bcftools filter --IndelGap 5 calls.norm.bcf -Ob -o calls.norm.flt-indels.bcf
</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/301/一致性序列</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 09:37:56 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/topic/301.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 May 2021 08:06:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 一致性序列 on Sat, 08 Jan 2022 18:20:49 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1641666014890-2f0f56d6-98e7-4ade-a941-76870dfa1c34-image.png" alt="2f0f56d6-98e7-4ade-a941-76870dfa1c34-image.png" class=" img-responsive img-markdown" /></p>
<p dir="auto">Genetics:A Conceptual Approach</p>
]]></description><link>http://an.forum.genostack.com/post/1072</link><guid isPermaLink="true">http://an.forum.genostack.com/post/1072</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Sat, 08 Jan 2022 18:20:49 GMT</pubDate></item><item><title><![CDATA[Reply to 一致性序列 on Sat, 08 Jan 2022 17:51:50 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://teaching.ncl.ac.uk/bms/wiki/index.php/Consensus_sequence" rel="nofollow ugc">https://teaching.ncl.ac.uk/bms/wiki/index.php/Consensus_sequence</a><br />
<img src="/assets/uploads/files/1641663486142-802081e5-a06d-4de0-bbe2-3ea4cc17c6a5-image.png" alt="802081e5-a06d-4de0-bbe2-3ea4cc17c6a5-image.png" class=" img-responsive img-markdown" /></p>
<p dir="auto"><a href="https://en.wikipedia.org/wiki/Promoter_(genetics)" rel="nofollow ugc">https://en.wikipedia.org/wiki/Promoter_(genetics)</a><br />
<img src="/assets/uploads/files/1641664308505-9e7d59d6-00ef-40e8-8be1-4dd0a21967fe-image.png" alt="9e7d59d6-00ef-40e8-8be1-4dd0a21967fe-image.png" class=" img-responsive img-markdown" /></p>
]]></description><link>http://an.forum.genostack.com/post/1071</link><guid isPermaLink="true">http://an.forum.genostack.com/post/1071</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Sat, 08 Jan 2022 17:51:50 GMT</pubDate></item><item><title><![CDATA[Reply to 一致性序列 on Sat, 08 Jan 2022 17:37:49 GMT]]></title><description><![CDATA[<p dir="auto">Difference Between Conserved and Consensus Sequence<br />
<a href="https://www.differencebetween.com/difference-between-conserved-and-consensus-sequence/" rel="nofollow ugc">https://www.differencebetween.com/difference-between-conserved-and-consensus-sequence/</a></p>
]]></description><link>http://an.forum.genostack.com/post/1070</link><guid isPermaLink="true">http://an.forum.genostack.com/post/1070</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Sat, 08 Jan 2022 17:37:49 GMT</pubDate></item><item><title><![CDATA[Reply to 一致性序列 on Sat, 08 May 2021 02:48:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://an.forum.genostack.com/uid/3">@ice-melt</a></p>
<p dir="auto">针对issue1，该问题也有可能由<br />
1） <code>--no-unal</code> 参数引起（去掉该参数运行正常）<br />
2）质量评分有问题，可考虑 <code>--phred64</code>参数</p>
]]></description><link>http://an.forum.genostack.com/post/614</link><guid isPermaLink="true">http://an.forum.genostack.com/post/614</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Sat, 08 May 2021 02:48:38 GMT</pubDate></item><item><title><![CDATA[Reply to 一致性序列 on Sat, 08 May 2021 02:48:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://an.forum.genostack.com/uid/3">@ice-melt</a></p>
<h1>问题记录</h1>
<p dir="auto">使用 bowtie2 遇到的问题</p>
<h2>issue1</h2>
<pre><code class="language-bash">bowtie2 -x /ceph_disk3/lx/temp/ref_idx/mngs_fmdv_genomic_db -1 /ceph_disk3/lx/temp/ref_idx/tt/r1.fastq -2 /ceph_disk3/lx/temp/ref_idx/tt/r2.fastq  --no-unal -S SAMPLE.sam 

Use of uninitialized value $bt2_args[0] in join or string at /home/bioinfo/miniconda2/envs/mpa/bin/bowtie2 line 423.
Use of uninitialized value $bt2_args[1] in join or string at /home/bioinfo/miniconda2/envs/mpa/bin/bowtie2 line 423.
Use of uninitialized value $_[0] in string eq at /home/bioinfo/miniconda2/envs/mpa/bin/bowtie2 line 360.
Use of uninitialized value $_[1] in string eq at /home/bioinfo/miniconda2/envs/mpa/bin/bowtie2 line 360.
Use of uninitialized value in exists at /home/bioinfo/miniconda2/envs/mpa/bin/bowtie2 line 81.
Use of uninitialized value in exists at /home/bioinfo/miniconda2/envs/mpa/bin/bowtie2 line 81.
Use of uninitialized value $bt2_args[0] in join or string at /home/bioinfo/miniconda2/envs/mpa/bin/bowtie2 line 459.
Use of uninitialized value $bt2_args[1] in join or string at /home/bioinfo/miniconda2/envs/mpa/bin/bowtie2 line 459.
Saw ASCII character 10 but expected 33-based Phred qual.
terminate called after throwing an instance of 'int'
Aborted (core dumped)
(ERR): bowtie2-align exited with value 134

</code></pre>
<h2>issue2</h2>
<pre><code class="language-bash">bowtie2 -S SAMPLE.sam -x /ceph_disk3/lx/temp/ref_idx/mngs_fmdv_genomic_db -U /ceph_disk3/lx/temp/ref_idx/tt/r1.fastq

Saw ASCII character 10 but expected 33-based Phred qual.
terminate called after throwing an instance of 'int'
Aborted (core dumped)
(ERR): bowtie2-align exited with value 134
</code></pre>
<p dir="auto">问题是抽取的序列输出成fasta格式了，这里比对需要fastq格式</p>
]]></description><link>http://an.forum.genostack.com/post/612</link><guid isPermaLink="true">http://an.forum.genostack.com/post/612</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Sat, 08 May 2021 02:48:12 GMT</pubDate></item><item><title><![CDATA[Reply to 一致性序列 on Fri, 07 May 2021 08:07:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://an.forum.genostack.com/uid/3">@ice-melt</a></p>
<p dir="auto">序列一致性指的是什么<br />
<a href="https://zhuanlan.zhihu.com/p/55324279" rel="nofollow ugc">https://zhuanlan.zhihu.com/p/55324279</a></p>
]]></description><link>http://an.forum.genostack.com/post/611</link><guid isPermaLink="true">http://an.forum.genostack.com/post/611</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Fri, 07 May 2021 08:07:47 GMT</pubDate></item></channel></rss>