qiime2 / q2-feature-table

QIIME 2 plugin supporting operations on feature tables.
BSD 3-Clause "New" or "Revised" License
2 stars 37 forks source link

BIOM import failed, TypeError: No format: BIOMV210Format #304

Closed peterjc closed 8 months ago

peterjc commented 8 months ago

Bug Description Biom import examples fails.

Steps to reproduce the behavior

  1. Installed as follows:
$ wget https://data.qiime2.org/distro/core/qiime2-2023.7-py38-linux-conda.yml
$ conda env create -n qiime2-2023.7 --file qiime2-2023.7-py38-linux-conda.yml
$ conda activate qiime2-2023.7
  1. Follow https://docs.qiime2.org/2023.7/tutorials/importing/#biom-v2-1-0 (documentation matching the version installed, the example is still the same on 2024.2):
$ wget https://data.qiime2.org/2023.7/tutorials/importing/feature-table-v210.biom
$ qiime tools import \
  --input-path feature-table-v210.biom \
  --type 'FeatureTable[Frequency]' \
  --input-format BIOMV210Format \
  --output-path feature-table-2.qza
  1. Rather than creating file feature-table-2.qza get an error message:
Traceback (most recent call last):
  File "/mnt/shared/scratch/pcock/apps/conda/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/sdk/util.py", line 92, in parse_format
    format_record = pm.formats[format_str]
KeyError: 'BIOMV210Format'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/xxx/conda/envs/qiime2-2023.7/lib/python3.8/site-packages/q2cli/builtin/tools.py", line 266, in import_data
    artifact = qiime2.sdk.Artifact.import_data(type, input_path,
  File "/mnt/xxx/conda/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/sdk/result.py", line 293, in import_data
    view_type = qiime2.sdk.parse_format(view_type)
  File "/mnt/xxx/conda/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/sdk/util.py", line 94, in parse_format
    raise TypeError("No format: %s" % format_str)
TypeError: No format: BIOMV210Format

An unexpected error has occurred:

  No format: BIOMV210Format

See above for debug info.

Expected behavior

Output of a file feature-table-2.qza

Screenshots

N/A

Computation Environment

Comments

  1. I am currently trying to install 2024.02 tiny, but ...
peterjc commented 8 months ago

Conda took a very long time, but I have now updated to 2024.2,

$ wget https://data.qiime2.org/distro/tiny/qiime2-tiny-2024.2-py38-linux-conda.yml
$ conda env create -n qiime2-tiny-2024.2 --file qiime2-tiny-2024.2-py38-linux-conda.yml
$ conda activate qiime2-tiny-2024.2

Now the example seems to work:

$ qiime tools import \
>   --input-path feature-table-v210.biom \
>   --type 'FeatureTable[Frequency]' \
>   --input-format BIOMV210Format \
>   --output-path feature-table-2.qza
Imported feature-table-v210.biom as BIOMV210Format to feature-table-2.qza
peterjc commented 8 months ago

Probably the same root issue, but with 2024.2 the qiime tools list-types and qiime tools list-formats --importable now work too - while under my 2023.7 install, they do not:

$ conda activate qiime2-2023.7
(qiime2-2023.7) $ qiime tools list-formats --importable
(qiime2-2023.7) $ qiime tools list-types
$ conda deactivate

(No output)

gregcaporaso commented 8 months ago

Thanks @peterjc. Looks like you have it working now, so I'm going to close this issue. If you need help, best to post on the QIIME 2 Forum. We have a lot more folks monitoring and providing tech support there than on the issue trackers.