Can I train a region-specific classifier using unaligned SILVA 144 sequences and qiime feature-classifier extract-reads ?

Can I train a region-specific classifier using unaligned SILVA 144 sequences and qiime feature-classifier extract-reads ?

Hello everyone,

I am trying to train a Naive Bayes classifier for bacterial 16S rRNA V5–V6 amplicon sequences using SILVA 144 and QIIME 2 2026.10.

My proposed workflow is to download the unaligned SILVA 144 SSURef_NR99 sequences using RESCRIPt, convert RNA sequences to DNA sequences, and then extract the target region using qiime feature-classifier extract-reads:

qiime feature-classifier extract-reads \
    --i-sequences silva-144-nr99-dna.qza \
    --p-f-primer AACMGGATTAGATACCCKG \
    --p-r-primer AGGGTTGCGCTCGTTG \
    --p-n-jobs 30 \
    --o-reads silva-144-nr99-dna-V56.qza \
    --o-read-extraction-stats silva-144-nr99-V56-stats.qza

I also tried using aligned SILVA sequences with qiime alignment trim-alignment, following this tutorial:

Train a taxonomy classifier using SILVA aligned sequences

However, when running qiime alignment trim-alignment to extract the target region using the primer sequences, the memory consumption exceeded 1 TB, and the HPC system terminated the job.

Therefore, I would like to ask:

Is it scientifically and technically appropriate to use unaligned SILVA reference sequences with qiime feature-classifier extract-reads to extract my V5–V6 region and train a Naive Bayes classifier? Or is it necessary to use aligned SILVA sequences with qiime alignment trim-alignment instead?

I would appreciate your advice. Thank you!

Hi @zhonglun_cai,

Let's see if we can help.

This is exactly why, in the alignment tutorial, we've warned against using primers to extract the amplicon region:

Warning: We recomend providing explicit alignment positions. Although we provide the ability to supply PCR primers for alignment region extraction, this approach is VERY inefficient for large alignments.

We recommend using the alignment positions as listed in the table of the tutorial you linked (scroll to the right). It appears your V5V6 primer region is not listed, we can determine these and add the positions to the table. It might take a few days for us to get to it. Until then, use the unaligned files with extract-reads, see below.

On to your next question ...

Yes. In fact, this is how most people construct their own classifiers. See this tutorial. There are various ways you can construct your classifier, see here, and here for example... The main tutorial is not an SOP and is just generally showing the myriad ways in which you can use RESCRIPt. Several other tutorials are linked on the RESCRIPt GitHub page.

2 Likes

Thank you very much for your clarification! This is really helpful. I sincerely appreciate your time and help!

1 Like