# Qiime2 18S workflow

**URL:** https://forum.qiime2.org/t/qiime2-18s-workflow/12175
**Category:** User Support
**Created:** [October 25, 2019, 8:01am UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175 "2019-10-25T08:01:18Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![michelle0828](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/958977/32.png) [@michelle0828](https://forum.qiime2.org/u/michelle0828)
#### Post date: [October 25, 2019, 8:01am UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/1 "2019-10-25T08:01:18Z")

</div>

Dear Sir,

Hello. I kinda understand how to analyze my 16S metagenome data using the workflow provided in tutorial. However, I am now stuck at my 18S analysis. Do know where can i read/obtain a 18S QIIME2 workflow analysis? and where can i obtain an updated version of the classifier? Thank you sir and hoping for your reply.

Kind regards,  
Michelle

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [October 25, 2019, 1:51pm UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/2 "2019-10-25T13:51:37Z")

</div>



---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [October 25, 2019, 1:58pm UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/3 "2019-10-25T13:58:37Z")

</div>

Hello Michelle,

Great question! Welcome to the Qiime 2 forums! :qiime2:

The good news is that SILVA includes both 16S and 18S reads. This means that you can download the silva database as shown [here](https://docs.qiime2.org/2019.7/data-resources/), and train an 18S classifier as shown [here](https://docs.qiime2.org/2019.7/tutorials/feature-classifier/).

Other than changing the taxonomy assignment step, the process is the same for 16S and 18S.

If you are looking for a full tutorial on 18S data, you could consider this:

> [@QIIME2 snakemake workflow tutorial - 18S/16S tag-sequencing](https://forum.qiime2.org/t/qiime2-snakemake-workflow-tutorial-18s-16s-tag-sequencing/11334):
>
> Tutorial: Run qiime2 for 18S or 16S tag-sequencing using snakemake Sarah Hu Summary: This tutorial was written with qiime2-2019.4 for 18S tag-sequencing (but can be adopted for any metabarcoding. Below tutorial uses an 18S dataset to go from raw fastq files to a complete ASV tutorial. I will continue to update this tutorial and add to it on the GitHub repos listed below. Tag-sequencing pipeline to generate ASVs - [GitHub - shu251/tagseq-qiime2-snakemake: Pipeline to run qiime2 with snakemake](https://github.com/shu251/tagseq-qiime2-snakemake) …

Let us know if you have any questions!  
Colin

P.S. I've made this thread public so that other people can help answer questions and new users can find it in the future.

---

<div class="post-metadata">

### Author: ![michelle0828](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/958977/32.png) [@michelle0828](https://forum.qiime2.org/u/michelle0828)
#### Post date: [October 28, 2019, 11:01am UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/4 "2019-10-28T11:01:23Z")

</div>

Dear Sir,

I am having problems with the classifier i downloaded from [Data resources — QIIME 2 2019.7.0 documentation](https://docs.qiime2.org/2019.7/data-resources/). When i run it with qiime, i used this commands

(qiime2-2019.7) michelle@michelle:~/Desktop/fungi$ qiime feature-classifier classify-sklearn \

> --i-classifier silva-132-99-nb-classifier.qza   
> --i-reads rep-seqs.qza   
> --o-classification taxonomy.qza  
> Usage: qiime feature-classifier classify-sklearn [OPTIONS]

Classify reads by taxon using a fitted classifier.

Inputs:  
--i-reads ARTIFACT FeatureData[Sequence]  
The feature data to be classified. [required]  
--i-classifier ARTIFACT  
TaxonomicClassifier The taxonomic classifier for classifying the reads.  
[required]  
Parameters:  
--p-reads-per-batch INTEGER  
Range(0, None) Number of reads to process in each batch. If "auto",  
this parameter is autoscaled to min( number of query  
sequences / n-jobs, 20000). [default: 0]  
--p-n-jobs INTEGER The maximum number of concurrently worker processes.  
If -1 all CPUs are used. If 1 is given, no parallel  
computing code is used at all, which is useful for  
debugging. For n-jobs below -1, (n\_cpus + 1 + n-jobs)  
are used. Thus for n-jobs = -2, all CPUs but one are  
used. [default: 1]  
--p-pre-dispatch TEXT "all" or expression, as in "3_n\_jobs". The number of  
batches (of tasks) to be pre-dispatched.  
[default: '2_n\_jobs']  
--p-confidence VALUE Float % Range(0, 1, inclusive\_end=True) | Str %  
Choices('disable') Confidence threshold for limiting taxonomic depth.  
Set to "disable" to disable confidence calculation,  
or 0 to calculate confidence but not apply it to  
limit the taxonomic depth of the assignments.  
[default: 0.7]  
--p-read-orientation TEXT Choices('same', 'reverse-complement', 'auto')  
Direction of reads with respect to reference  
sequences. same will cause reads to be classified  
unchanged; reverse-complement will cause reads to be  
reversed and complemented prior to classification.  
"auto" will autodetect orientation based on the  
confidence estimates for the first 100 reads.  
[default: 'auto']  
Outputs:  
--o-classification ARTIFACT FeatureData[Taxonomy]  
[required]  
Miscellaneous:  
--output-dir PATH Output unspecified results to a directory  
--verbose / --quiet Display verbose output to stdout and/or stderr  
during execution of this action. Or silence output if  
execution is successful (silence is golden).  
--citations Show citations and exit.  
--help Show this message and exit.

```
                There was a problem with the command:                     

```

(1/1) Invalid value for "--i-classifier": 'silva-132-99-nb-classifier.qza' is  
not a QIIME 2 Artifact (.qza)

.....It says the classifier is not a QIIME 2 artifact. Ive read the tutorial on training classifiers. Its says two elements are required for training the classifier: the reference sequences and the corresponding taxonomic classifications. However, when i download the files from SILVA only two files appeared silva-132-99-nb-classifier.qza and silva-132-99-nb-classifier.qza.part. I didnt see any fasta and rep-seqs files which are required. Can you help me with my problem sir? Thank you and hoping for your reply.

Kind regards,  
Michelle

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [October 28, 2019, 1:40pm UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/5 "2019-10-28T13:40:20Z")

</div>

Hello Michelle,

If you downloaded the classifier from the [data resources page](https://docs.qiime2.org/2019.7/data-resources/), it should already be in the correct format.

However, if you downloaded database itself from SILVA, then you will need to train that classifier as shown on [here](https://docs.qiime2.org/2019.7/tutorials/feature-classifier/), also linked above.

I would recommend using the classifier from the [data resources page](https://docs.qiime2.org/2019.7/data-resources/). I know this one is in the right format! 😉

Colin

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [October 28, 2019, 2:59pm UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/6 "2019-10-28T14:59:00Z")

</div>

Hi @michelle0828 --- this error is likely from one of two reasons: either there is a path issue (the file can't be found), or, the file isn't completely downloaded. Please run the following and let us know the results:

```bash
qiime tools validate silva-132-99-nb-classifier.qza

```

> [@michelle0828](#):
>
> I didnt see any fasta and rep-seqs files which are required

This is correct --- the method you are running above (`qiime feature-classifier classify-sklearn`) uses a _pretrained classifier_, which is one step downstream from the "raw" database files. Learn more about the process here in this tutorial: [Training feature classifiers with q2-feature-classifier — QIIME 2 2019.7.0 documentation](https://docs.qiime2.org/2019.7/tutorials/feature-classifier/)

---

<div class="post-metadata">

### Author: ![michelle0828](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/958977/32.png) [@michelle0828](https://forum.qiime2.org/u/michelle0828)
#### Post date: [October 29, 2019, 8:17am UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/9 "2019-10-29T08:17:47Z")

</div>

Hello sir, ive read in one post about similar problem as mine. I tried again using --verbose.

(qiime2-2019.7) michelle@michelle:~/Desktop/fungi$ qiime feature-classifier classify-sklearn \

> --i-classifier silva-132-99-nb-classifier.qza   
> --i-reads rep-seqs.qza   
> --o-classification taxonomy.qza   
> --verbose  
> Traceback (most recent call last):  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py", line 327, in **call**  
> results = action(\*\*arguments)  
> File "\</home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-347\>", line 2, in classify\_sklearn  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 229, in bound\_callable  
> spec.view\_type, recorder)  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/result.py", line 289, in \_view  
> result = transformation(self.\_archiver.data\_dir)  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/core/transform.py", line 70, in transformation  
> new\_view = transformer(view)  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2\_feature\_classifier/\_taxonomic\_classifier.py", line 72, in \_1  
> pipeline = joblib.load(os.path.join(dirname, 'sklearn\_pipeline.pkl'))  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 598, in load  
> obj = \_unpickle(fobj, filename, mmap\_mode)  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 526, in \_unpickle  
> obj = unpickler.load()  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/pickle.py", line 1050, in load  
> dispatchkey[0]  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 352, in load\_build  
> self.stack.append(array\_wrapper.read(self))  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 195, in read  
> array = self.read\_array(unpickler)  
> File "/home/michelle/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 141, in read\_array  
> array = unpickler.np.empty(count, dtype=self.dtype)  
> numpy.core.\_exceptions.MemoryError: Unable to allocate array with shape (895606784,) and data type float64

Plugin error from feature-classifier:

Unable to allocate array with shape (895606784,) and data type float64

See above for debug info.

-----Is it a memory error sir? What can I do now to solve this problem? Thank you so much and hoping for your reply. Thanksss

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [October 29, 2019, 1:25pm UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/10 "2019-10-29T13:25:30Z")

</div>

Good morning,

You are correct, this is a memory error. Great dete ctive work! 🕵️‍♀️

Memory errors are often caused by not having enough memory to run a given command on your system. How much memory / RAM does your system have?

Colin

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [November 29, 2019, 7:25pm UTC](https://forum.qiime2.org/t/qiime2-18s-workflow/12175/11 "2019-11-29T19:25:31Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
