extract-reads CLI versus API


I am currently using extract-reads plugin to play around with 16S sequences derived from whole genomes.

Using the CLI to extract the V4 region, I get the desired results

My CLI is as below and is pretty standard I would say.

qiime feature-classifier extract-reads
--i-sequences rep_seqs.qza
--p-n-jobs 2
--p-read-orientation 'forward'
--o-reads rep_seqs-515f-806r.qza

However using the API does not return any sequences.

Results (name = value)

reads = <artifact: FeatureData[Sequence] uuid: be200c8a-247a-4d51-bc3a-9c2f1ea413e2>

My command is below.

rep_seqs_v4 = extract_reads(sequences = rep_seqs,f_primer='GTGYCAGCMGCCGCGGTAA',r_primer='GGACTACNVGGGTWTCTAAT',read_orientation='forward')

I am not sure what is different?

I was careful that the rep_seqs would be the same in each instance.

I read in the fasta file using Artifact.import_data() and saved it out using rep_seqs.save('rep_seqs.qza')
So they should be the file in essence.

Hi @Maurice_Barrett,

The trick is to use:

rep_seqs_v4,  = extract_reads(sequences = rep_seqs,f_primer='GTGYCAGCMGCCGCGGTAA',r_primer='GGACTACNVGGGTWTCTAAT',read_orientation='forward')

Note the comma in: rep_seqs_v4, =



Yes! Sorry, I forgot about that! One can pull out the results with rep_seqs_v4.reads as well - for anybody else who is curious.
Thank you for your time @SoilRotifer

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