Biom.convert error


I am running Qiime2/2019.4 on an ubuntu system and I have an OTU table produced using vsearch. The file is in tsv format with rows representing OTUs and columnds representing samples with read counts for each OTU.
When I try to use biom.convert to convert the tsv file to biom format for use in qiime I get the following error:

Traceback (most recent call last):
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/biom/”, line 660, in load_table
table = parse_biom_table(fp)
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/biom/”, line 412, in parse_biom_table
t = Table.from_tsv(fp, None, None, lambda x: x)
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/biom/”, line 4631, in from_tsv
t_md_name) = Table._extract_data_from_tsv(lines, **kwargs)
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/biom/”, line 4747, in _extract_data_from_tsv
md_name = header[-1]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/bin/biom”, line 11, in
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/biom/cli/”, line 114, in convert
table = load_table(input_fp)
File “/sw/QFAB/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/biom/”, line 662, in load_table
raise TypeError("%s does not appear to be a BIOM file!" % f)
TypeError: LP_SitexSpecies.tsv does not appear to be a BIOM file!

Hi @Ilha_Byrne,
Welcome in the forum!

Can you share what version of qiime2 are you using and which command you run to convert the tsv to biom.


I am using qiime2/2019.4 and I used this command:
biom convert -i feature-table.tsv -o feature-table.biom --table-type=“OTU table” --to-hdf5

Hi @Ilha_Byrne,
Could you try to get the latest qiime2 and see if the command would work in there (it does look correct to me)?
Did you process the feature-table.tsv with any text editor which may have change/added invisible characters to the file (word excel or similar)?
Could you send few lines for the file to see how it looks?

Hi, so it worked for my otutable. But not when I try to do my taxonomy I get the same error again. I am using the latest version of qiime2 now.

I got it to work now! The headers needed to be changed and the extra columns removed.

Hi @Ilha_Byrne ,
glad it worked and thanks for sharing your solution
Happy qiimeing !