Minpath error qiime2picrust2

116 views
Skip to first unread message

Nabil Quraishi

unread,
Jan 5, 2019, 9:14:58 AM1/5/19
to picrust-users
Hi,
I have used the qiime2 picrust2 plugin for metagenome predictions and its worked well. I am now trying to run minpath using the ko_metagenome.qza that was generated. I have converted it to a tsv file with the first column as #OTUID (denotes KOs) and the subsequent columns are samples. I have a KO mapping file. When I run run_minpath.py I get this error: Error: required column "function" not found in input metagenome table

Changing the first column ID to function results in a different error KeyError: "['Sample1'] not in index"

How do I resolve this please?
Thanks,

Gavin Douglas

unread,
Jan 5, 2019, 12:04:26 PM1/5/19
to picrus...@googlegroups.com

Hi there,


Could you post the exact command you're running and the head of the files that that you're inputting?


Thanks,

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 post to this group, send email to picrus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nabil Quraishi

unread,
Jan 5, 2019, 12:12:45 PM1/5/19
to picrust-users
Thanks for your reply.
Command:
run_minpath.py -i q2-picrust2_output/ko_metagenome/ko.txt \
-o q2-picrust2_output/ko_metagenometsv/pathways_out \
--intermediate picrust/q2-picrust2_output/ko_metagenometsv/minpath_working \
-m picrust/q2-picrust2_output/keggpathwaymap.txt \
-p 10

Attached the head of the input file - this was generated by converting the ko_metagenome.qza generated by the pipeline to a tsv file through QIIME export.
I have even tried changing the heading to combinations of function, sequence, sampleid, but this didnt work.

Thanks,
Nabil
KOclip.JPG

Nabil Quraishi

unread,
Jan 6, 2019, 12:24:11 PM1/6/19
to picrust-users
Hi,
Minpath gives the same error with the test data pred_metagenome_unstrat.tsv in the Picrust folder. If i rename the first column as function, I still get this error - KeyError: "[]" not in index

Would be grateful if there are any solutions or work arounds. Thanks

Gavin Douglas

unread,
Jan 7, 2019, 8:42:47 AM1/7/19
to picrus...@googlegroups.com
Hi there,

What version are you using and do all the tests pass (warnings are ok) if you run “pytest” in the main picrust2 folder?


Gavin

Nabil Quraishi

unread,
Jan 7, 2019, 11:10:36 AM1/7/19
to picrust-users
I'm using the current version of Picrust - reinstalled it again. Pytest works perfectly fine with no warnings. I even tried to run using the main picrust pipeline  (rather than the qiime2 plugin, epa-ng and gapps installed with files in placement folder). It just gives the same Keyerror. Could I send you part of my datafile please to see if you are able to get it to work?

Gavin Douglas

unread,
Jan 7, 2019, 11:20:00 AM1/7/19
to picrus...@googlegroups.com
Sure feel free to send it to me privately. Please send me the mapping file you’re using as well since that may be related to this error.

Best,

Gavin

Gavin Douglas

unread,
Jan 7, 2019, 3:49:35 PM1/7/19
to picrus...@googlegroups.com
Thanks for sending me your file. You need to add the option “—no_regroup” to not use the default regrouping file, which was causing your table to be empty. This was impossible to figure out from the reported error alone though so I will be sure to make this clearer in the next release. Sorry for the inconvenience.


Best,

Gavin

Nabil Quraishi

unread,
Jan 7, 2019, 6:05:52 PM1/7/19
to picrust-users
Thanks Gavin, that error no longer appears but instead I get a new one:
 File "/home/ubuntu/drive/downloads/picrust2/picrust2/run_minpath.py", line 827, in pathway_abun_and_coverage
    pathway_abun = sum(subset_reaction_abun) / len(subset_reaction_abun)
ZeroDivisionError: division by zero

:(

Nabil Quraishi

unread,
Jan 7, 2019, 6:44:40 PM1/7/19
to picrust-users
Don't worry, fixed it. It was a problem with the mapping file - won't take spaces! Massive thanks for your help Gavin.

Gavin Douglas

unread,
Jan 7, 2019, 7:36:24 PM1/7/19
to picrus...@googlegroups.com

Good to hear, no problem!

Reply all
Reply to author
Forward
0 new messages