Qiime2 18S workflow

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

1 Like

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, and train an 18S classifier as shown here.

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:

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.

2 Likes

Dear Sir,

I am having problems with the classifier i downloaded from Data resources — QIIME 2 2019.7.0 documentation. 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 "3n_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

Hello Michelle,

If you downloaded the classifier from the data resources page, 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, also linked above.

I would recommend using the classifier from the data resources page. I know this one is in the right format! :wink:

Colin

1 Like

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:

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

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

1 Like

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

Good morning,

You are correct, this is a memory error. Great dete ctive work! :female_detective:

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

1 Like

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