一致性序列
-
Consensus sequence(最常见的碱基)
http://www.metagenomics.wiki/tools/samtools/consensus-sequence
https://samtools.github.io/bcftools/howtos/consensus-sequence.html
步骤
1)根据参比基因序列比对短读序列
# 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.bam2)从
.bam文件中获得consensus 序列# 获得一致性序列,vcfutils.pl 是 bcftools程序的一个脚本 samtools mpileup -uf REFERENCE.fasta SAMPLE.bam | bcftools call -c | vcfutils.pl vcf2fq > SAMPLE_cns.fastq # 将 .fastq 转换为 .fasta ,设置碱基质量 lower than 20 to N seqtk seq -aQ64 -q20 -n N SAMPLE_cns.fastq > SAMPLE_cns.fasta# 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 -
序列一致性指的是什么
https://zhuanlan.zhihu.com/p/55324279 -
问题记录
使用 bowtie2 遇到的问题
issue1
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 134issue2
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问题是抽取的序列输出成fasta格式了,这里比对需要fastq格式
-
针对issue1,该问题也有可能由
1)--no-unal参数引起(去掉该参数运行正常)
2)质量评分有问题,可考虑--phred64参数 -
Difference Between Conserved and Consensus Sequence
https://www.differencebetween.com/difference-between-conserved-and-consensus-sequence/ -
-

Genetics:A Conceptual Approach

