extracting amplicon region from alignment

Hi @leo_gm,

qiime feature-classifier extract-reads will only work on unaligned FeatureData[Sequence] types. That is, the classifier will only work with unaligned reads.

You have three options, you can:

1. degap the sequences

qiime rescript degap-seqs ...

To remove all gaps from the alignment, essentially unaligning the sequences. From here you can proceed to qiime feature-classifier extract-reads ... with your primer sequences.

2. trim alignment then degap

The second option is to enter in the forward and reverse alignment positions via the *-position-start flags of the amplicon region you wish to extract (V4 positions shown as an example). That is you are using the positions in the alignment rather than the primer sequences to extract the amplicon region. You can use the other options for this command to use the primers instead of the positions to extract the amplicon region, but I prefer using the positions directly.

qiime rescript degap-seqs trim-alignment \
     --p-position-start 13862 \ 
     --p-position-end 23445\

Then degap the sequences, as above, then proceed to the classifier.

3. RESCRIPt tutorial

The third option is to simply follow the RESCRIPt tutorial here, to make your own SILVA classifier.