Importing metagenome_contrib.tsv.gz to qiime2 format

138 views
Skip to first unread message

Sreevatshan Srinivasan

unread,
Apr 14, 2021, 10:50:45 AM4/14/21
to picrust-users
Hello Gavin,

  Hope you are doing good. I had generated the EC and KO files in standalone version. I would like to import metegenome contribution of both files to qiime2 format (.qza). I had tried to import the file thru biom format but it show an error like this,

File "/home/picrust2/miniconda3/lib/python3.8/site-packages/biom/table.py", line 5025, in _extract_data_from_tsv
    values = list(map(dtype, fields[1:-1]))
ValueError: could not convert string to float: 'EC:1.1.1.1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/biom/parse.py", line 672, in load_table
    table = parse_biom_table(fp)
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/biom/parse.py", line 416, in parse_biom_table
    t = Table.from_tsv(file_obj, None, None, lambda x: x)
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/biom/table.py", line 4875, in from_tsv
    t_md_name) = Table._extract_data_from_tsv(lines, **kwargs)
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/biom/table.py", line 5029, in _extract_data_from_tsv
    raise TypeError(msg % (lineno, badidx+1, badval))
TypeError: Invalid value on line 1, column 1, value EC:1.1.1.1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/picrust2/miniconda3/bin/biom", line 8, in <module>
    sys.exit(cli())
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/biom/cli/table_converter.py", line 114, in convert
    table = load_table(input_fp)
  File "/home/picrust2/miniconda3/lib/python3.8/site-packages/biom/parse.py", line 674, in load_table
    raise TypeError("%s does not appear to be a BIOM file!" % f)
TypeError: EC_pred/pred_metagenome_contrib.tsv.gz does not appear to be a BIOM file!

Biom version is 2.1.10. Hope to hear from you soon..!

Best,

Sreevatshan

Gavin Douglas

unread,
Apr 14, 2021, 1:05:04 PM4/14/21
to 'cervant...@licifug.ugto.mx' via picrust-users
Hey Sreevatshan,


That table actually isn't a BIOM table and as far as I know there's no way to import it to QIIME 2 currently unfortunately. You would need to use a software like R to analyze that table.


Cheers,

Gavin

--
You received this message because you are subscribed to the Google Groups "picrust-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picrust-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picrust-users/4b7fbe19-0005-4c11-a1ab-aaf94848020cn%40googlegroups.com.

Sreevatshan Srinivasan

unread,
Apr 14, 2021, 1:19:27 PM4/14/21
to picrust-users
Hello Gavin,

thank you for the quick reply could you recommend any R package for analysis of the contribution file.?

Best,

Sreevatshan

Gavin Douglas

unread,
Apr 15, 2021, 9:38:22 AM4/15/21
to picrus...@googlegroups.com
Hey Sreevatshan,

There aren’t any R packages specifically to analyze this format, sorry! You would need to use custom code.

One thing is that because the table is in “long-format” (i.e., each abundance  value is on a separate line) it is amenable to being plotted with ggplot2. But you would need to first subset the table first to a relatively small number of values you would want to plot, because those tables can be massive. Similarly, with a subsetted table you could also view the data on BURITTO, which is on a standalone website.


All the best,

Gavin

kunle Raimi

unread,
May 14, 2021, 9:43:17 AM5/14/21
to picrust-users
Dear Gavin 

Thanks for your time always.

Kindly assist me. Am running the picrusts2 script : "picrust2_pipeline.py -s clustered-sequences.fasta -i feature-table.biom -o picrust2_out_pipeline -p 1 --metagenome_contrib" to generate the metagenome contribution but its returning error

Error: error: unrecognized arguments: --metagenome_contrib

Hope to receive a solution soon.

Kunle

Gavin Douglas

unread,
May 14, 2021, 11:07:06 AM5/14/21
to picrus...@googlegroups.com
Hi there,

That command has been obsolete for a few versions - that functionality is performed by “—stratified” by default now. You can see the latest command syntax in the latest version of the tutorial on the wiki.


Cheers,

Gavin

Kilaza Samson

unread,
May 14, 2021, 11:54:03 AM5/14/21
to picrus...@googlegroups.com
Hi, i think STAMP can analyse such data output.

Reply all
Reply to author
Forward
0 new messages