# Training Classifier with Dada2 fasta refdb

**URL:** https://forum.qiime2.org/t/training-classifier-with-dada2-fasta-refdb/23912
**Category:** Library Support
**Tags:** taxonomy, feature-classifier, rescript
**Created:** [August 16, 2022, 6:58pm UTC](https://forum.qiime2.org/t/training-classifier-with-dada2-fasta-refdb/23912 "2022-08-16T18:58:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lastewart](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lastewart/32/15258_2.png) [@lastewart](https://forum.qiime2.org/u/lastewart)
#### Post date: [August 16, 2022, 6:58pm UTC](https://forum.qiime2.org/t/training-classifier-with-dada2-fasta-refdb/23912/1 "2022-08-16T18:58:18Z")

</div>

Hi,  
I have a single reference database (fasta) file for 12S that I have been using for my Dada2 pipeline in R (see first few lines of file format below). It is the same format as this [PR2 version](https://github.com/pr2database/pr2database/releases/download/v4.14.0/pr2_version_4.14.0_SSU_dada2.fasta.gz).

> Eukaryota;Animalia;Chordata;Euteleostomi;Actinopterygii;Tetraodontiformes;Molidae;Mola;Mola  
> TCTATCAACTCTAGCCTAACTTACACATGCAAGTATCCGCACCCCTGTGAGAATGCCCCACAGTTTCCCGGAAGGAAACAAGGAGCTGGTATCAGGCACAATATAGCCCAAGACACCTTGCTTAGCCACACCCTCAAGGGACCTCAGCAGTGATAAACATTAAGCCATAAGTGAAAACTTGACTTAGTCAAGGCTAGG

I would like to use this for taxonomic assignment in Qiime2, but I am having trouble figuring out how to import both taxonomy and sequences when they are in a single file. I am using the RESCRIPt plugin, and have tried with the following commands, but they are not exactly correct for my data (\*sequences are not all exact length):

qiime tools import   
--input-path 12s.fasta   
--output-path 12s.qza   
--type 'FeatureData[AlignedSequence]'

qiime feature-classifier fit-classifier-naive-bayes   
--i-reference-reads 12s.fasta   
--i-reference-taxonomy 12s.qza   
--o-classifier silva-138.1-ssu-nr99-classifier.qza

I looked through the forum posts, and the RESCRIPt Github documentation for building databases [here](https://github.com/bokulich-lab/RESCRIPt#using-rescript), but it doesn't seem to be the correct information I need. Can someone point me to the correct information, or how to do this?

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [August 16, 2022, 7:03pm UTC](https://forum.qiime2.org/t/training-classifier-with-dada2-fasta-refdb/23912/2 "2022-08-16T19:03:44Z")

</div>

Hi @lastewart,

There is a 12S rRNA marker gene example for metazoa provided [here](https://github.com/bokulich-lab/db-benchmarks-2020/blob/master/notebooks/Make-12S-rRNA-gene-db.ipynb).

If you are interested in making an amplicon specific version, you can try combining this approach with the current pre-release of the [extract-seq-segments](https://forum.qiime2.org/t/using-rescripts-extract-seq-segments-to-expand-a-reference-sequence-set/23618) action.

-Mike
