Qiime import error "No transformation from <class ....DNAFASTAFormat to <class ....QIIME1DemuxDirFmt

I needed to remove some contaminating sequences from my “rep-seq.qza”. So I “exported” the file to an .fna file and removed the appropriate sequences. I want to “import” this .fna file into .qza format so I can make a tree. However I am getting an error.
Here is my input code:
qiime tools import --input-path /home/alaina/Desktop/Plants/qiime2/clean_otus/plants_clean_97denovo.fna --type SampleData[Sequences] --input-format DNAFASTAFormat --output-path plants_clean_rep_seq

Here is the error message:

Traceback (most recent call last):
  File "/home/alaina/miniconda3/envs/qiime2/lib/python3.5/site-packages/q2cli/tools.py", line 140, in import_data
    view_type=input_format)
  File "/home/alaina/miniconda3/envs/qiime2/lib/python3.5/site-packages/qiime2/sdk/result.py", line 240, in import_data
    return cls._from_view(type_, view, view_type, provenance_capture)
  File "/home/alaina/miniconda3/envs/qiime2/lib/python3.5/site-packages/qiime2/sdk/result.py", line 264, in _from_view
    recorder=recorder)
  File "/home/alaina/miniconda3/envs/qiime2/lib/python3.5/site-packages/qiime2/core/transform.py", line 59, in make_transformation
    (self._view_type, other._view_type))
Exception: No transformation from <class 'q2_types.feature_data._format.DNAFASTAFormat'> to <class 'qiime2.plugin.model.directory_format.QIIME1DemuxDirFmt'>

An unexpected error has occurred:

  No transformation from <class 'q2_types.feature_data._format.DNAFASTAFormat'> to <class 'qiime2.plugin.model.directory_format.QIIME1DemuxDirFmt'>

See above for debug info.

I am using QIIME2-2018.11 on Ubuntu, which I downloaded an installed from the file qiime2-2018.11-py35-linux-conda.yml .

This command had worked when I imported a silva 16S.fna file, which was much larger. I’m still not sure why it didn’t work to import a fasta file that QIIME2 generated initially.

Thank you for any help and advice!

Hey @scubalaina!

The issue here is just the type, that should be FeatureData[Sequences] instead of SampleData[Sequences].

That’s why QIIME 2 is trying to transform to the older QIIME1DemuxDirFmt and fails to find one. You are inadvertantly asking it to convert a fasta file of IDs to a fasta file where there’s an ID scheme relating to samples in some way and we do not have a transformer for that :slight_smile:

1 Like

Thank you! It worked!