Error q2-metaphlan2:biom.exception.TableException: Cannot delimit self if I don’t have data…

I am working with qiime2-2018.11 environment in conda (Anaconda v4.6.2). My server is CentOS v6.8. I recently installed q2-metaphlan2 using the instructions found here. I even ran the ‘Testing installation’ part successfully. Now imported data and created an artifact file using:

qiime tools import \
--type 'SampleData[PairedEndSequencesWithQuality]' \
--input-path manifest \
--output-path paired-end-demux.qza \
--input-format PairedEndFastqManifestPhred33

After this I just summarized the data using:

qiime demux summarize \
--i-data paired-end-demux.qza \
--o-visualization demux.qzv

All’s good until this point. Now I’m trying to get a biom table from the imported data using q2-metaphlan2 using:

qiime q2-metaphlan2 profile-paired-fastq \
--i-raw-data paired-end-demux.qza \
--o-biom-table paired-end-demux-profile \
--p-nproc 6 \

…and convert the table to a tsv file using:

biom convert \
--input-fp paired-end-demux-biom-table-exported/feature-table.biom \
--output-fp feature-table.tsv \

On this step I get the following error:

Traceback (most recent call last):
File “/root/anaconda3/envs/qiime2-2018.11/bin/biom”, line 11, in
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/biom/cli/”, line 129, in convert
table_type, process_obs_metadata, tsv_metadata_formatter)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/biom/cli/”, line 185, in _convert
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/biom/”, line 4844, in to_tsv
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/biom/”, line 1581, in delimited_self
raise TableException(“Cannot delimit self if I don’t have data…”)
biom.exception.TableException: Cannot delimit self if I don’t have data…
/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/numpy/core/ RuntimeWarning: Degrees of freedom <= 0 for slice
/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/numpy/core/ RuntimeWarning: invalid value encountered in true_divide
arrmean, rcount, out=arrmean, casting=‘unsafe’, subok=False)
/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/numpy/core/ RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Num samples: 0
Num observations: 0
Total count: 0
Table density (fraction of non-zero values): 0.000

My first thought was there is no data in the artifact file (paired-end-demux.qza) but the .qzv shows data as expected.

I have searched this forum and googled this error (in bold) to no success. Any ideas would be greatly appreciated.

Good afternoon,

Would you be willing to post the feature-table.biom that was the output from running metaphlan?

I think your instincts to look for an empty file was perfect, and I’m wondering if the .biom table is empty and the metaphlan command failed. Here is why I’m thinking it could be that:

Num samples: 0
Num observations: 0
Total count: 0
Table density (fraction of non-zero values): 0.000

Let me know what you find, or if you have already fixed this issue.


Hey Colin,

I have attached the feature-table.biome file. Although I do not know how can I see the contents of this file. A text editor just displays gibberish.

I gave this issue some thought and tried another way of doing it. So I used metaphlan2 directly by using the command inputData.fastq --input_type fastq > profile.txt following the bioBakery tutorial for metaphlan2. This 'inputData' is 1 fastq file instead of a cumulative import that I had done in the past to obtain 'paired-end-demux.qza'. It gave me a blank bowtie2 output and a resultant profile.txt to be:

#SampleID Metaphlan2 Analysis
unclassified 100.0

This makes me believe that the 'mpa_v20_m200' reference database that comes default with bowtie2 does not have the sequences in the input file. This makes no sense because when I did a taxonomic analysis using the Greengenes and Silva classifiers from here, I did get the 7 levels of taxonomic classifications.

This is my first project in this space and if my questions seem naive kindly pardon me! (1.2 KB)

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