training classifier for single-end reads

Hello Everypone,

Can I train my classifier for single-end reads with only forward primer available? The general method showed error in “qiime feature-classifier extract-reads” step and asked for reverse primer sequence also.

TIA :slight_smile:

1 Like

what do you mean by with only forward primer available?
1- you have not trimed your forward primer by dada2 or deblur?
2- you want to work with only forward reads?

Please clarify it. :rose:

Hi @Shivani2211,
In order to train your classifier to the specific region targeted by your primer(s) we just need to properly extract that region first before the training step. Before we do that, I’ll just point out that this is not really necessary. It MAY improve your classification slightly but you may get just as good classification if you were to use the pre-traind full length classifiers. I know @Nicholas_Bokulich did a series of benchmarks on this topic (paper here) that would suggest extracting the region increases accuracy, though I think all those benchmarks were done on slightly longer paired-end reads. He would certainly know much better in this regard but he’s currently out of the office so let’s just move on with your original question and actually try this.
As you noticed already the extract-reads plugin requires as input both your forward and reverse primers. If you sequenced both directions and tossed away your reverse reads you can still include your reverse primers here but then make sure to use the --p-trunc-len parameter to truncate the reads to the max length of your query sequences. If you only sequenced forward reads then you can still put in a reverse read of that region as if you did use paired-end sequencing then truncate appropriately again. Ultimately, as long as your extracted reference reads are equal or longer than your query sequences, and cover them completely you’ll be ok. Hope that makes sense and good luck!


Hi Mehrbod,
I have only single-end reads, so only forward primer available. As you mentioned here, how to decide the reverse reads to put in that region?

Hi @Shivani2211,
You can just look up the literature for an example of when your forward primer was paired with a reverse primer and use that. That choice is somewhat arbitrary since we just need to be able to extract some region then we’ll be truncating it back to your forward primers length anyways.

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