暗能星系

    • 登录
    • 搜索

    一致性序列

    刘茜
    2
    7
    20
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • I
      ice-melt 最后由 编辑

      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.bam
      

      2)从.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
      
      I 2 条回复 最后回复 回复 引用 0
      • I
        ice-melt @ice-melt 最后由 编辑

        @ice-melt

        序列一致性指的是什么
        https://zhuanlan.zhihu.com/p/55324279

        1 条回复 最后回复 回复 引用 0
        • I
          ice-melt @ice-melt 最后由 ice-melt 编辑

          @ice-melt

          问题记录

          使用 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 134
          
          

          issue2

          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格式

          I 1 条回复 最后回复 回复 引用 0
          • I
            ice-melt @ice-melt 最后由 ice-melt 编辑

            @ice-melt

            针对issue1,该问题也有可能由
            1) --no-unal 参数引起(去掉该参数运行正常)
            2)质量评分有问题,可考虑 --phred64参数

            1 条回复 最后回复 回复 引用 0
            • A
              anneng 最后由 编辑

              Difference Between Conserved and Consensus Sequence
              https://www.differencebetween.com/difference-between-conserved-and-consensus-sequence/

              1 条回复 最后回复 回复 引用 0
              • A
                anneng 最后由 anneng 编辑

                https://teaching.ncl.ac.uk/bms/wiki/index.php/Consensus_sequence
                802081e5-a06d-4de0-bbe2-3ea4cc17c6a5-image.png

                https://en.wikipedia.org/wiki/Promoter_(genetics)
                9e7d59d6-00ef-40e8-8be1-4dd0a21967fe-image.png

                1 条回复 最后回复 回复 引用 0
                • A
                  anneng 最后由 编辑

                  2f0f56d6-98e7-4ade-a941-76870dfa1c34-image.png

                  Genetics:A Conceptual Approach

                  1 条回复 最后回复 回复 引用 0
                  • First post
                    Last post
                  Powered by 暗能星系