error on qiime2.plugins import feature_classifier

I am using Qiime2.2019.4

trying to use feature_classifier to train classifier. here is the code lines I am using
qiime feature-classifier fit-classifier-naive-bayes \ --p-classify–chunk-size 200 \ --i-reference-reads ref-seqs.qza \ --i-reference-taxonomy silva132_99_ref-taxonomy.qza \ --o-classifier classifier.qza

I am getting this error

There was a problem with the command:
(1/1) Got unexpected extra arguments ( )

in the beginning, I got memory error and then I used the Chunk-size and reduced it to 200.
So my question is how to resolve this issue and if anybody can share their experience with solving memory issues. I am using Virtual box and assigned 12 GB of physical memory.

Thank you!

Leili

Welcome to the forum @Leila_Abkar!

You resolved this issue in the correct way.

I suspect you may be copying and pasting your command from another location and invisible characters are hitchhiking along, causing this error. One thing I notice is that your command contains backslashes ("\") even though your command is all on one line (usually we use backslashes in the tutorials and on the forum because this tells the computer to ignore the line breaks in the command so we can break up commands onto multiple lines for easy reading, but these are definitely not essential or recommended if you are inputting commands that are all on a single line).

SO here is what I recommend:

  1. re-type the entire command directly into your terminal (I know, it is tedious, but this error seems to come from copying and pasting from a document or webpage containing special characters. If this is from a document, make sure you use a plain text editor to write out and store your commands, not a word processor like MS Word).
  2. Add the --verbose flag to the end of your command to have any error messages be reported in full.
  3. If you still get an error, please share the entire error message with us.

Good luck!

The new output is now this:

Results from 2018-11 with pre-trained file after typing by hand.txt (156.3 KB)

Hi @Leila_Abkar,
You are still getting a memory error. Looks like you did not adjust the chunk size (called reads-per-batch in more recent releases of QIIME 2).

You are also running an old version of QIIME 2 — I recommend installing the latest release so that you are using the latest features.

Give that a try and let us know if that resolves your issue.

Thank you so much for your reply. I updated the qiime2 and the code am using are
qiime feature-classifier classify-sklearn \

–i-reads dada2_output/rep_seqs_filt.qza
–i-classifier classifier_silva_132_99_16S_V6.V8_A956F_A1401R.qza
–p-reads-per-batch 500
–output-dir taxa

still getting this error

Plugin error from feature-classifier:

The scikit-learn version (0.19.1) used to generate this artifact does not match the current version of scikit-learn installed (0.20.2). Please retrain your classifier for your current deployment to prevent data-corruption errors.

Debug info has been saved to /tmp/qiime2-q2cli-err-f70q7f7v.log

I would be very grateful if you could help me.

thanks

L

Hi @Leila_Abkar,
I am glad to hear that updating my have fixed this!

See this line of the error message:

you will need to retrain the classifier that you are using for compatibility. If you are using a pre-trained classifier, you will need to download the pre-trained classifier associated with the same version of QIIME 2 that you have installed.