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

metaphlan2
(H) #1

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 \
--verbose

…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 \
--to-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
sys.exit(cli())
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py”, 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/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/biom/cli/table_converter.py”, 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/table_converter.py”, line 185, in _convert
metadata_formatter=obs_md_fmt_f)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/biom/table.py”, line 4844, in to_tsv
observation_column_name)
File “/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/biom/table.py”, 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/_methods.py:135: RuntimeWarning: Degrees of freedom <= 0 for slice
keepdims=keepdims)
/root/anaconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/numpy/core/_methods.py:105: 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/_methods.py:127: 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.

0 Likes

(Colin Brislawn) #2

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.

Colin

0 Likes

(H) #3

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 metaphlan2.py 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!

feature-table.zip (1.2 KB)

0 Likes

(system) closed #4

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

0 Likes