extracting amplicon region from alignment

Hi i have a problem using the reverse-transcribe, i have an AllignedRNASequence that i want to pass to DNASequence to do:

qiime feature-classifier extract-reads --i-sequences silva-138.1-fullaling.qza --p-f-primer CCTACGGGNGGCWGCAG --p-r-primer GACTACHVGGGTATCTAATCC --p-min-length 50 --o-reads silva-138.1-fullaling-trained.qza

I already saw the [OPTIONS] of the function but they put the following:
Inputs:
--i-rna-sequences ARTIFACT FeatureData[AlignedRNASequence¹ |
RNASequence²] RNA Sequences to reverse transcribe to DNA. [required]

Outputs:
--o-dna-sequences ARTIFACT FeatureData[AlignedSequence¹ | Sequence²]
Reverse-transcribed DNA sequences. [required]

I have problems understanding the requirements of the output, the AlignedSequence | Sequence part

I you have any idea of how can i resolve this, i would be grateful.

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.

-Cheers!

2 Likes

Thanks again, i will read the article carefully.

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