error in q2 feature classifier

Good day

I have tried running q2-feature classifier many ways but it does not seem to work i keep 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.21.2). Please retrain your classifier for your current deployment to prevent data-corruption errors.

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

Could I please get some assistance, I have tried read similar topic issues but can still not resolve my issue. Please not I have the most recent classifier and I have tried many different versions of qiime2

Thanking you

Good morning Kinosha,

I think you are on the right track towards solving this error:

You are correct that the version is the issue. To solve this error, you need to install the exact same version of scikit-learn that was used to train the classifiers.

Because you have scikit-learn 0.21.2 installed, you download matching classifiers here.

Let me know if this works for you!
Colin

1 Like

Good day

Thank you for your help, I have however tried updating the classifier but still get the same error, do i perhaps need to run this command first.

conda install --override-channels -c defaults scikit-learn=0.21.2

I have tried with this classifier
Silva 132 99% OTUs from 515F/806R region of sequences (MD5: a0925e86cda18829f84f03dab01ff589 )

But still get the same error

Thanking you

Kinosha

Hello Kinosha,

Yes! That will make sure you have the right version of scikit-learn for the classifier you just downloaded.

Let me know if the conda command runs OK and if you can classify your reads after this!

Colin

Good day

I hoped this would work but I get the same error

I ran
conda install --override-channels -c d efaults scikit-learn=0.21.2
Collecting package metadata: done
Solving environment: done

All requested packages already installed.

Then I ran

(qiime2-2019.7) [[email protected]:~/qiime]$ qiime feature-classifier classify-sklea rn --i-reads dada2_rep_seq.qza --i-classifier /home/kinosha/qiime/silva-132-99- 515-806-nb-classifier.qza --o-classification taxonomy.qza

Plugin error from feature-classifier:

The scikit-learn version (0.19.1) used to generate this artifact does not matc h the current version of scikit-learn installed (0.21.2). Please retrain your cl assifier for your current deployment to prevent data-corruption errors.

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

I dont know if classifier is a problem

Silva 132 99% OTUs from 515F/806R region of sequences (MD5: a0925e86cda18829f84f03dab01ff589 )

I am not sure what to try now

Thanks

Kinosha

you did it all backwards: you already have 0.21.2 installed, but are attempting to use a classifier that was trained using sklearn 0.19.1, so that is the version you need to have installed.

If you want to do that, you should do this instead:
conda install --override-channels -c d efaults scikit-learn=0.19.1

HOWEVER, downgrading sklearn is probably a BAD IDEA, or may not be possible, since much of the other software and dependencies in QIIME 2 2019.7 rely on later versions of sklearn.

A few other suggestions:

  1. train your own classifier (see the tutorial in the QIIME 2 online tutorials).
  2. install an earlier version of QIIME 2 in a separate environment. Looks like version 2018.6 is the last version that used sklearn=0.19.1! :spider_web:
  3. at the very least clone your 2019.7 environment so that you have a separate environment that you can “tweak” as you like… that way if you accidentally break anything you will still have a pristine working version of 2019.7.
1 Like

Thank you both for all your help

1 Like