RESCRIPt AttributeError: ‘DNAFASTAFormat’ object has no attribute ‘view

hm… I am not a plant biologist but this additional information makes me think that this solution is unlikely. i.e., I am skeptical that you can use short reads of plastid 16S rRNA genes to get subspecies-level resolution.

Yeah, I'm not super confident that this will work, but I wanted to pursue it just in case.

I'm trying to work through the RESCRIPt tutorial you linked to. The downloading of sequences seems to work fine, but I'm getting an error when I try to filter out the short sequences. I'm just copying and pasting the commands from the tutorial.

qiime rescript get-ncbi-data
--p-query '33175[BioProject] OR 33317[BioProject]'
--p-n-jobs 5
--o-sequences ncbi-refseqs-unfiltered.qza
--o-taxonomy ncbi-refseqs-taxonomy-unfiltered.qza

qiime rescript filter-seqs-length-by-taxon
--i-sequences ncbi-refseqs-unfiltered.qza
--i-taxonomy ncbi-refseqs-taxonomy-unfiltered.qza
--p-labels Archaea Bacteria
--p-min-lens 900 1200
--o-filtered-seqs ncbi-refseqs.qza
--o-discarded-seqs ncbi-refseqs-tooshort.qza
--verbose

I get the following error.

Traceback (most recent call last):
File "/home/bscherer/miniconda3/envs/qiime2/lib/python3.6/site-packages/q2cli/commands.py", line 327, in call
results = action(**arguments)
File "</home/bscherer/miniconda3/envs/qiime2/lib/python3.6/site-packages/decorator.py:decorator-gen-167>", line 2, in filter_seqs_length_by_taxon
File "/home/bscherer/miniconda3/envs/qiime2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound_callable
output_types, provenance)
File "/home/bscherer/miniconda3/envs/qiime2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 383, in callable_executor
output_views = self._callable(**view_args)
File "/home/bscherer/miniconda3/envs/qiime2/lib/python3.6/site-packages/rescript/filter_length.py", line 56, in filter_seqs_length_by_taxon
seq_ids = {i.metadata['id'] for i in sequences.view(DNAIterator)}
AttributeError: 'DNAFASTAFormat' object has no attribute 'view'

Thanks again for all your help thus far!

Hi @bpscherer,

I am wondering if there is something wrong with your environment? I just ran your commands on my laptop using my qiime2-2020.11 environment:

qiime rescript get-ncbi-data \
  --p-query '33175[BioProject] OR 33317[BioProject]' \
  --p-n-jobs 3 \
  --o-sequences ncbi-refseqs-unfiltered.qza \
  --o-taxonomy ncbi-refseqs-taxonomy-unfiltered.qza \
  --verbose

These output files were produced:

Saved FeatureData[Sequence] to: ncbi-refseqs-unfiltered.qza
Saved FeatureData[Taxonomy] to: ncbi-refseqs-taxonomy-unfiltered.qza

Then I ran:

qiime rescript filter-seqs-length-by-taxon \
  --i-sequences ncbi-refseqs-unfiltered.qza \
  --i-taxonomy ncbi-refseqs-taxonomy-unfiltered.qza \
  --p-labels Archaea Bacteria \
  --p-min-lens 900 1200 \
  --o-filtered-seqs ncbi-refseqs.qza \
  --o-discarded-seqs ncbi-refseqs-tooshort.qza \
  --verbose

These outputs were produced:

Saved FeatureData[Sequence] to: ncbi-refseqs.qza
Saved FeatureData[Sequence] to: ncbi-refseqs-tooshort.qza

Here are screen shots of the provenance:

-Mike

1 Like

Ahh, it was indeed that I was using an old version of QIIME. I updated and everything seems good now. Thank you!

2 Likes

Thank you for letting us know @bpscherer. Which version of QIIME was this issue occurring? I think we now require at least version 2020.8 or later.

-Cheers!
-Mike

A post was merged into an existing topic: Has anyone used chloroplast “contaminants” to do host phylogeography?