classify-sklearn memory error

Hi, I have been trying to train the classifier in the V3-V4 region (16S_341F CCTACGGGNGGCWGCAG 16S_806R GACTACHVGGGTATCTATCC) using the following command:

qiime feature-classifier fit-classifier-naive-bayes --i-reference-reads ref_seqs_16S_V3-V4.qza --i-reference-taxonomy 99_otus_16S_taxonomy.qza --o-classifier classifier_16S_V3-V4.qza --verbose 

However, it always ends with a memory error and the process is killed. I have read through the internet that a possible alternative is to set --p-reads-per-batch argument to a lower value than the one by default, but I think this argument is no longer available. Do you know how could I solve this issue?

My version of qiime is qiime2-2022.11. Thank you in advance for your time and assistance,


Please provide the details about error. In that case it might be either RAM or disk space, and then instructions will differ.


Hi Valentyn,

I get no error messages, it just says killed when the process is stopped. However, I ran in parallel htop and I noticed that qiime crashes when the memory gets to 100% of usage (I think it refers to physical memory)

Ok, this refers to physical memory indeed. Try to reduce parameter "--p-classify--chunk-size", default is 20,000.
This should help.


1 Like

It worked!! Thank you very much for your help Valentyn!

1 Like

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