readytowear SILVA 138 Training Error

Thanks to your genius [email protected] Nicholas_Bokulich I found a better way to analyze my data which is 16S rRNA sequencing Microbial DNA from mouse fecal samples(PCR amplification targeted the V3–V4 region of the 16s rDNA.).So I decided to re-analyze my 16S data.

#1.The bacterial reference sequence which is specific for this study is obtained by qiime feature-classifier extract-reads extraction from the 16S full-length sequence in the silva database.

qiime feature-classifier extract-reads \
--i-sequences silva-138-99-full_seqs.qza \
--o-reads silva-138-99-full_seqs-v3v4-seqs.qza

#2.Then , I'm trying to train the silva-138-99-full_seqs-v3v4-seqs reference database with the animal-distal-gut.qza as the class-weight within qiime feature-classifier fit-classifier-naive-bayes. This is when an error occurs.

I modify the command provided on the readytowear GitHub page as below:

qiime feature-classifier fit-classifier-naive-bayes \
–i-reference-reads silva-138-99-full_seqs-v3v4-seqs.qza \
–i-reference-taxonomy readytowear/data/silva_138/full_length/ref-tax.qza \
–i-class-weight readytowear/data/silva_138/full_length/animal-distal-gut.qza \
--o-classifier silva-138-99-full_seqs-v3v4-seqs-animal-distal-gut.qza

The following error message occurs:
Number of priors must match number of classes.

Does this mean I have to make my filter to make the taxonomy classes identical in both files(silva-138-99-full_seqs-v3v4-seqs.qza&animal-distal-gut.qza)?
Is that right?

ps.The version of Qiime which I use is qiime2-2020.11

1 Like

that's correct! the reference sequences, taxonomy, and weights all need to have matching IDs.

the plugin RESCRIPt has an action for filtering a taxonomy, so you can use that to remove IDs not in the sequences.

you will need to re-create the animal distal gut weights after doing that (and there is a script in the readytowear repository showing how to do this).

Alternatively, you could just train a full-length 16S classifier with those weights. A full-length classifier loses a little bit of accuracy vs. an amplicon specific classifier, but the different is minimal so this would be the way to go if you want to just do a quick test.

Good luck!

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