美文网首页
2018-04-20宏基因组实战qiime2-201802(六)

2018-04-20宏基因组实战qiime2-201802(六)

作者: 小郑的学习笔记 | 来源:发表于2018-04-20 22:17 被阅读0次

    物种分类

    第一步,下载注释
    看官方文档的介绍

    We’ll do that using a pre-trained Naive Bayes classifier and the q2-feature-classifier plugin. This classifier was trained on the Greengenes 13_8 99% OTUs, where the sequences have been trimmed to only include 250 bases from the region of the 16S that was sequenced in this analysis (the V4 region, bound by the 515F/806R primer pair).

    注意了,这里说明了用这种注释的前提条件,因为不是所有实验条件都一样的
    比如我的材料就不是用 V4 区域,所以要自己制作一个qiime2 的classifier
    文档里面的NOTE也提到了

    Taxonomic classifiers perform best when they are trained based on your specific sample preparation and sequencing parameters, including the primers that were used for amplification and the length of your sequence reads. Therefore in general you should follow the instructions in Training feature classifiers with q2-feature-classifier to train your own taxonomic classifiers. We provide some common classifiers on our data resources page, including Silva-based 16S classifiers, though in the future we may stop providing these in favor of having users train their own classifiers which will be most relevant to their sequence data.

    我自己下载train了一个

    自己的classifier

    接着做

    官网代码

    qiime feature-classifier classify-sklearn \
      --i-classifier gg-13-8-99-515-806-nb-classifier.qza \
      --i-reads rep-seqs.qza \
      --o-classification taxonomy.qza
    
    qiime metadata tabulate \
      --m-input-file taxonomy.qza \
      --o-visualization taxonomy.qzv
    
    
    qiime taxa barplot \
      --i-table table.qza \
      --i-taxonomy taxonomy.qza \
      --m-metadata-file sample-metadata.tsv \
      --o-visualization taxa-bar-plots.qzv
    
    

    基本上也是按照流程跑

    最后得到物种分类柱状图

    Differential abundance testing with ANCOM

    差异丰度分析

    1. We’ll start by creating a feature table that contains only the gut samples
    qiime feature-table filter-samples \
      --i-table table.qza \
      --m-metadata-file sample-metadata.tsv \
      --p-where "BodySite='gut'" \
      --o-filtered-table gut-table.qza
    
    1. ANCOM不允许有零

    ANCOM operates on a FeatureTable[Composition] QIIME 2 artifact, which is based on frequencies of features on a per-sample basis, but cannot tolerate frequencies of zero.

    所以要

    qiime composition add-pseudocount \
      --i-table gut-table.qza \
      --o-composition-table comp-gut-table.qza
    
    1. 然后我们取subject 分组进行差异统计

    We can then run ANCOM on the Subject column to determine what features differ in abundance across the gut samples of the two subjects.

    qiime composition ancom \
      --i-table comp-gut-table.qza \
      --m-metadata-file sample-metadata.tsv \
      --m-metadata-column Subject \
      --o-visualization ancom-Subject.qzv
    

    按照不同的水平分析

    We’re also often interested in performing a differential abundance test at a specific taxonomic level. To do this, we can collapse the features in our FeatureTable[Frequency] at the taxonomic level of interest, and then re-run the above steps. In this tutorial, we collapse our feature table at the genus level (i.e. level 6 of the Greengenes taxonomy).

    qiime taxa collapse \
      --i-table gut-table.qza \
      --i-taxonomy taxonomy.qza \
      --p-level 6 \
      --o-collapsed-table gut-table-l6.qza
    
    qiime composition add-pseudocount \
      --i-table gut-table-l6.qza \
      --o-composition-table comp-gut-table-l6.qza
    
    qiime composition ancom \
      --i-table comp-gut-table-l6.qza \
      --m-metadata-file sample-metadata.tsv \
      --m-metadata-column Subject \
      --o-visualization l6-ancom-Subject.qzv
    
    

    一步到位,这里的p-level就是可以设置的水平参数

    接下来就得到各种分析结果

    相关文章

      网友评论

          本文标题:2018-04-20宏基因组实战qiime2-201802(六)

          本文链接:https://www.haomeiwen.com/subject/pnhykftx.html