Error in import function - FeatureTable import into .qza from tsv file

Hello!

I am trying to import a text file into a qza format using the following code:

qiime tools import \
  --input-path processedPathwayAbundance.txt \
  --input-format TSVTaxonomyFormat \
  --type 'FeatureTable[RelativeFrequency]' \
  --output-path processedPathwayAbundance.qza

The output message is:

(qiime2-2019.10) [20-05-07 20:47 [email protected]:~/Documents/Projects/GABA/data/songbird ] $ qiime tools import \
>   --input-path processedPathwayAbundance.txt \
>   --input-format TSVTaxonomyFormat \
>   --type 'FeatureTable[RelativeFrequency]' \
>   --output-path processedPathwayAbundance.qza
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/q2cli/builtin/tools.py", line 158, in import_data
    view_type=input_format)
  File "/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/result.py", line 241, in import_data
    validate_level='max')
  File "/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/result.py", line 266, in _from_view
    recorder=recorder)
  File "/Users/promidas/miniconda3/envs/qiime2-2019.10/lib/python3.6/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.TSVTaxonomyFormat'> to <class 'qiime2.plugin.model.directory_format.BIOMV210DirFmt'>

An unexpected error has occurred:

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

See the above for debug info.

Could you please tell me what’s the problem and how to fix it?

Hi @prdas!

Can you tell us more about what you are trying to import? I ask, because according to your import command, you are telling QIIME 2 that you are import Taxonomic feature data - is that the case?

I suspect you actually just have a TSV biom table (not a TSV of taxonomy data), in which case we will need to update the import command (and probably perform a pre-processing step), but, I will wait to hear back from you. Maybe you can provide the first ~5 lines of the file you are trying to import, and tell us a bit about it? Thanks!

:qiime2:

I am trying to upload the feature ID table, with features on the rows and sample names on the columns.

Hi @prdas - you should be able to import this data, but, first you will need to convert the biom table. Also, you might not have a great semantic type to match these pathway abundances, but you can “fake it” using a FeatureTable[Frequency] (note, this isn’t generally recommended, but, I don’t know of a better semantic type option at present).

First, convert your biom TSV to a biom HDF5 file:

http://biom-format.org/documentation/biom_conversion.html

biom convert -i processedPathwayAbundance.txt -o processedPathwayAbundance.biom --table-type="OTU table" --to-hdf5

Then, import:

qiime tools import \
  --input-path processedPathwayAbundance.biom \
  --type 'FeatureTable[Frequency]' \
  --input-format BIOMV210Format \
  --output-path feature-table.qza

Keep us posted! :qiime2:

Yes, the provided solution worked perfectly. Thanks :slight_smile:

1 Like

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