Get the App
SLTechnology News&Howtos  ›  Development  › 

How to build a Classifier for qiime2

Shulou Source: shulou.com Published: 2022-06-01 04:39:20 10月04日 Update

This article mainly explains "how to build a classifier for qiime2". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to build a classifier for qiime2"!

Create or get a classifier

This method requires that the classifier be trained in advance based on the reference database. The QIIME 2 team suggested that special classifiers be established for different primer combinations. For some commonly used primer combinations, you can download them directly from the warehouse (http://kronos.pharmacology.dal.ca/public_files/taxa_classifiers/qiime2-2020.2_classifiers/). If not, you need to build your own classifier manually:

16s V4/V5 region (classifier_silva_132_99_16S_V4.V5_515F_926R.qza)

16s V3/V4 region (classifier_silva_132_99_16S_V3.V4_341F_805R.qza)

16s V6/V8 region (classifier_silva_132_99_16S_V6.V8_B969F_BA1406R.qza)

16s V6/V8 region targeting archaea (classifier_silva_132_99_16S_V6.V8_A956F_A1401R.qza)

16s V3/V4 region targeting cyanobacteria (classifier_silva_132_99_16S_V3.V4_CYA359F_CYA781R.qza)

18s V4 region (classifier_silva_132_99_18S_V4_E572F_E1009R.qza)

Full ITS-fungi only (classifier_sh_refs_qiime_ver8_99_s_02.02.2019_ITS.qza)

Full ITS-all eukaryotes (classifier_sh_refs_qiime_ver8_99_s_all_02.02.2019_ITS.qza)

In addition, when using these custom classifiers, we should carefully check whether they are executed correctly on the dataset, and it is particularly important to manually check the classifier's classification of ASV. In theory, the use of primer-specific classifiers can improve the effect of species annotation, but it is still recommended that you run the full-length 16s classifier for comparison when you run the custom 16s classifier for the first time.

Create your own classifier code example: here we take V3-V4 primers as an example:

338F (5 colors and ACGGGAGCAGCAGMUR 3'). 806R (5percent color GGACTACHVGGGTWTCTAATM 3')

# download database file (greengenes)

Wget-c ftp://greengenes.microbio.me/greengenes_release/gg_13_5/gg_13_8_otus.tar.gz

# decompression

Tar-zxvf gg_13_8_otus.tar.gz

# use 99_otus.fasta data in rep_set file and 99_OTU_taxonomy.txt data in taxonomy as reference species annotation

# Import reference sequence

Qiime tools import\

-type 'FeatureData [Sequence]'\

-- input-path gg_13_8_otus/rep_set/99_otus.fasta\

-- output-path 99_otus.qza

# Import species classification information

Qiime tools import\

-type 'FeatureData [Taxonomy]'\

-- input-format HeaderlessTSVTaxonomyFormat\

-- input-path gg_13_8_otus/taxonomy/99_otu_taxonomy.txt\

-- output-path ref-taxonomy.qza

# this time use 338F (5color color ACTCCTACGGGAGCAGCAGMur3') and. 806R (5percent color GGACTACHVGGGTWTCTAATM 3')

# It has been shown that taxonomic classification accuracy of 16s rRNA gene sequences improves when a Naive Bayes classifier is trained on only the region of the target sequences that was sequenced (Werner et al., 2012).

Qiime feature-classifier extract-reads\

-- i-sequences 99_otus.qza\

-- p-f-primer ACTCCTACGGGAGGCAGCAG\

-- p-r-primer GGACTACHVGGGTWTCTAAT\

-- o-reads ref-seqs.qza

# Train the classifier (Classifier)

# generate an experiment-specific classifier based on the selected designated area

Time qiime feature-classifier fit-classifier-naive-bayes\

-- i-reference-reads ref-seqs.qza\

-- i-reference-taxonomy ref-taxonomy.qza\

-- o-classifier classifier_gg_13_8_99_V3-V4.qza

# Classification of fungal ITS sequences

# In our experience, fungal ITS classifiers trained on the UNITE reference database do NOT benefit from extracting/trimming reads to primer sites. We recommend training UNITE classifiers on the full reference sequences. Furthermore, we recommend the "developer" sequences (located within the QIIME-compatible release download) because the standard versions of the sequences have already been trimmed to the ITS region (excluding portions of flanking rRNA genes that may be present in amplicons generated with standard ITS primers).

At this point, I believe you have a deeper understanding of "how to build a classifier in qiime2". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Classification data primers manual species reference content suggestions databases files methods comments learning inspection combination operation different practical deeper important Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Microsoft Shulou Technology OPPO Reno Shulou Information