importing taxonomy from a biom table

Hi All,

I was trying to follow along in a similar manner, and kraken-biom worked, however, only the first import worked. FeatureData[Taxonomy] failed with:

qiime tools import \
>   --input-path kraken_test/all_test.biom \
>   --type 'FeatureTable[Frequency]' \
>   --input-format BIOMV210Format \
>   --output-path qiime_test/feature-table.qza
Imported kraken_test/all_test.biom as BIOMV210Format to qiime_test/feature-table.qza
(qiime2-2020.8) butlerr@ghiprd02:/data/butlerr/rosmap/pfc_rnaseq$ qiime tools import \
>   --input-path kraken_test/all_test.biom \
>   --type 'FeatureTable[Taxonomy]' \
>   --input-format BIOMV210Format \
>   --output-path qiime_test/feature-table.qza
Traceback (most recent call last):
  File "/data/butlerr/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/builtin/tools.py", line 158, in import_data
    view_type=input_format)
  File "/data/butlerr/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/result.py", line 241, in import_data
    validate_level='max')
  File "/data/butlerr/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/result.py", line 255, in _from_view
    output_dir_fmt = pm.get_directory_format(type)
  File "/data/butlerr/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py", line 313, in get_directory_format
    % semantic_type)
TypeError: Semantic type FeatureTable[Taxonomy] does not have a compatible directory format.

An unexpected error has occurred:

  Semantic type FeatureTable[Taxonomy] does not have a compatible directory format.

See above for debug info.

My biom appears to have taxonomy data:

biom summarize-table -i kraken_test/all_test.biom
Num samples: 10
Num observations: 789
Total count: 28,035,130
Table density (fraction of non-zero values): 0.251

Counts/sample summary:
 Min: 1,821,856.000
 Max: 3,323,213.000
 Median: 3,105,461.000
 Mean: 2,803,513.000
 Std. dev.: 500,295.408
 Sample Metadata Categories: None provided
 Observation Metadata Categories: taxonomy
...

@jessica_h, did your taxonomy data import without issue?

Versions:

q2cli version 2020.8.0
kraken-biom version 1.0.1, http://github.com/smdabdoub/kraken-biom
biom, version 2.1.8
Kraken version 2.0.9-beta

Hi @Robert_Butler,
The issue here is a typo. Here's the line:

you want FeatureData[Taxonomy]

Good luck!

Thanks @Nicholas_Bokulich!
Is it also incorrect to save the feature table and taxonomy to the same file? I ask because in the next step (filtering by taxonomy) I get an error:

 qiime taxa filter-table \
>   --i-table qiime_test/feature-table.qza \
>   --i-taxonomy qiime_test/feature-table.qza \
>   --p-exclude eukaryota \
>   --o-filtered-table qiime_test/feature-table.qza
Usage: qiime taxa filter-table [OPTIONS]

  This method filters features from a table based on their taxonomic
...
  --examples             Show usage examples and exit.
  --citations            Show citations and exit.
  --help                 Show this message and exit.

                    There was a problem with the command:
 (1/1) Invalid value for '--i-table': Expected an artifact of at least type
  FeatureTable[Frequency]. An artifact of type FeatureData[Taxonomy] was
  provided.

That's right... you are overwriting the file in your case, and the taxonomy and table should be saved as separate artifacts (this is different from biom, which stores the taxonomy along with the abundance data; in QIIME 2 these are kept separate to avoid ambiguity).

Looks like this was some "copy pasta" in the example you were working off of, and I have fixed it, thanks for catching.

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