"Killed" Error when fitting taxonomic classifier

Hello everyone, I am getting an issue while trying to build the taxonomic classifier with my 16S sequences from a meta genomic analysis, using the RESCRIPt method:

qiime rescript dereplicate *
** --i-sequences silva-138-ssu-nr99-seqs-filt.qza *

** --i-taxa silva-138-ssu-nr99-tax.qza **
** --p-rank-handles 'silva' **
** --p-mode 'uniq' **
** --o-dereplicated-sequences silva-138-ssu-nr99-seqs-derep-uniq.qza **
** --o-dereplicated-taxa silva-138-ssu-nr99-tax-derep-uniq.qza**

The above worked very well, but the following is the one that is killed by qiime2:

qiime feature-classifier fit-classifier-naive-bayes*
** --i-reference-reads silva-138-ssu-nr99-seqs-derep-uniq.qza*

** --i-reference-taxonomy silva-138-ssu-nr99-tax-derep-uniq.qza**
** --o-classifier silva-138-ssu-nr99-classifier.qza**
** --verbose**

The message I obtain is the following:

(qiime2-2022.2) vanina@Compu:~/Documents/qiime2/analisis_bac/taxonomy$ qiime feature-classifier fit-classifier-naive-bayes --i-reference-reads silva-138-ssu-nr99-seqs-derep-uniq.qza --i-reference-taxonomy silva-138-ssu-nr99-tax-derep-uniq.qza --o-classifier silva-138-ssu-nr99-classifier.qza --verbose
/home/vanina/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_feature_classifier/classifier.py:102: UserWarning: The TaxonomicClassifier artifact that results from this method was trained using scikit-learn version 0.24.1. It cannot be used with other versions of scikit-learn. (While the classifier may complete successfully, the results will be unreliable.)
warnings.warn(warning, UserWarning)
Killed

I re-installed scikit-learn but still getting the same error.

shall I use instead qiime feature-classifier classify-sklearn?

Thank you very much!!

Vanina

Hi @Vani_Maguire ,
I changed the title, since the error is coming from the second command (with feature-classifier), not the first. And this is where the error is occurring.

The "killed" error means that the process is failing to run, almost certainly because of memory constraints. I recommend checking the forum FAQs as a starting point for troubleshooting advice on this common error.

Good luck!

1 Like

Hello! thank you very much! yes, the error comes from the second part, but I really don't think the problem is due to a memory issue since I am using a brand new computer with plenty of free memory special for these analyses. I think the problem refers to the SCIKIT-LEARN package version I am using (as says the error message). I reinstalled it to a newest version but still doesn't work. Then I understood that the version needed is a previous one. Don't know how to install the previous one or whether there is another way to solve this problem.
Thank you very much!

Vanina

And yet this is almost certainly what that error indicates — you can check the forum archives for many similar issues and it is almost always memory or other system resources. You can also check your system resources while that job runs if you would like to verify.

No, the first message is a warning, not an error. That warning always displays to indicate that the output should not be used with different versions of scikit-learn.

Hello! Oh I understand what you are saying! yes, definitely the problem is because of memory. Yes, I have been reading other posts and everyone says the same with other available solutions. So I will try another way of assigning taxonomy to my dataset, instead of training the classifier.
Thank you very much for clearing this out to me!

Hi @Vani_Maguire ,
just to make sure: are you aware of the QIIME 2 data resources? We offer pre-trained classifiers for SILVA 138 there:
https://docs.qiime2.org/2022.2/data-resources/

But you also do not need to give up training a classifier, rather you can use some options to reduce the memory load — e.g., by using the reads-per-batch parameter (you have probably seen this described on other forum posts).

But yes q2-feature-classifier also has other taxonomic classification methods that do not require training a naive Bayes classifier.

Good luck!

Thank you very much! yes I will try to apply the pre-trained one from Qiime resources. If this doesnt work for any reason, I will try your second option in order to reduce consuming memory. I will keep you informed about the results! Very grateful for the information!

Vani

1 Like

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