# Cannot regroup into kegg pathway in Humann3

**URL:** <https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213>\
**Category:** HUMAnN\
**Created:** [June 8, 2021, 1:22am UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213 "2021-06-08T01:22:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![MinJi\_Kim](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/minji_kim/32/782_2.png) [@MinJi\_Kim](https://forum.biobakery.org/u/MinJi_Kim)\
**Post date:** [June 8, 2021, 1:22am UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/1 "2021-06-08T01:22:58Z")

</div>

Hi communities,  
I tried to regroup the pathway into kegg pathway by following command.

humann\_regroup\_table -i merged\_path.tsv -o ./path\_kegg.tsv -g uniref90\_ko

However, there was only unintegrated pathway in the output file.  
Even when I tried to regroup into go pathway, there was the same issue.

How can I regroup the pathways with other databases…?

Thanks,  
MinJi

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [June 9, 2021, 7:40pm UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/2 "2021-06-09T19:40:27Z")

</div>

You can regroup from UniRefs (gene families) to KOs (broader gene families), which is what the `-g uniref90_ko` argument is asking for (but it would require a genefamilies.tsv input file rather than pathways). We don’t currently support regrouping pathways with the built-in mapping options, and it would be challenging to regroup from MetaCyc pathways to KEGG pathways. You would be better off computing KOs from your gene families and then trying to compute KEGG pathways based on the KOs you found.

---

<div class="post-metadata">

**Author:** ![MinJi\_Kim](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/minji_kim/32/782_2.png) [@MinJi\_Kim](https://forum.biobakery.org/u/MinJi_Kim)\
**Post date:** [June 10, 2021, 4:28am UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/3 "2021-06-10T04:28:25Z")

</div>

Thank you so much for replying me.  
Do you have any recommend packages or softwares for computing KEGG pathways easily…?  
It seems difficult to compute KEGG pathways from gene families one by one.

Thank you,  
MinJi

---

<div class="post-metadata">

**Author:** ![Dhrati\_Patangia](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/dhrati_patangia/32/786_2.png) [@Dhrati\_Patangia](https://forum.biobakery.org/u/Dhrati_Patangia)\
**Post date:** [August 12, 2021, 11:26am UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/4 "2021-08-12T11:26:52Z")

</div>

@franzosa,  
Hi, I am using humann2 and I wish to regroup HUMAnN2 gene abundance table using a mapping of GO terms. Basically I wish to categorise them in different metabolic process groups. I couldn’t find much online. I tried the following but it gives 0 entries renamed: I also tried go, metacyc\_pwy instead of kegg\_pathway but nothing seems to work.  
humann2\_renorm\_table -i test\_genefamilies.tsv -u relab -p -o test.ra.tsv  
humann2\_regroup\_table -i test.ra.tsv -o test.tsv -g uniref90\_rxn -e 6

humann2\_rename\_table -i test.tsv -o test.ko.tsv -n kegg-pathway

Any help would be appreciated. Thank you in advance  
Best  
DP

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [August 12, 2021, 3:38pm UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/5 "2021-08-12T15:38:25Z")

</div>

You want to be regrouping to GO (or the Informative GO terms, `infogo1000`) bundled with HUMAnN in the second command. After that you’ll be able to rename them with GO descriptions in the third command. If you don’t have GO as an option for your `regroup_table` command you need to install the HUMAnN utility mapping database using the `database` script.

---

<div class="post-metadata">

**Author:** ![Dhrati\_Patangia](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/dhrati_patangia/32/786_2.png) [@Dhrati\_Patangia](https://forum.biobakery.org/u/Dhrati_Patangia)\
**Post date:** [August 12, 2021, 3:58pm UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/6 "2021-08-12T15:58:40Z")

</div>

Hi Eric,  
Thank you very much for your quick response. I will try that, however is there a way to group these into specific metabolic processes? For example to group uniref families into cellular amino acid metabolic process, carbohydrate metabolic processes, lipid metabolic processes and xenobiotics metabolic processes.

Thank you  
DP

---

<div class="post-metadata">

**Author:** ![Dhrati\_Patangia](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/dhrati_patangia/32/786_2.png) [@Dhrati\_Patangia](https://forum.biobakery.org/u/Dhrati_Patangia)\
**Post date:** [August 12, 2021, 4:47pm UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/7 "2021-08-12T16:47:01Z")

</div>

@franzosa  
Hi, sorry I don’t think I was able to place the question properly.  
Basically, Is there a mapping file for metacyc pathways that could be used for regrouping? And then renaming using metacy-name-pathway file?  
Would that be the approach here?  
Any help would be appreciated

Thank you in advance  
DP

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [August 16, 2021, 8:41pm UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/8 "2021-08-16T20:41:12Z")

</div>

For your first question, the best bet for grouping UniRefs really broadly would probably be to group them to GO terms (using the file we supply) and then “bubble up” more specific GO terms to broader terms based on the GO hierarchy. HUMAnN doesn’t have any embedded tools for doing this, however.

For your second question, we don’t have any options for regrouping MetaCyc pathways into broader categories bundled with HUMAnN. MetaCyc _does_ maintain its own hierarchy with broader pathway categories, and there might be an old version of that file floating around on the forum, but it’s not something we specifically updated for the latest HUMAnN release.

---

<div class="post-metadata">

**Author:** ![Dhrati\_Patangia](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/dhrati_patangia/32/786_2.png) [@Dhrati\_Patangia](https://forum.biobakery.org/u/Dhrati_Patangia)\
**Post date:** [August 19, 2021, 9:22am UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/10 "2021-08-19T09:22:07Z")

</div>

Hi @franzosa , thank you I will try this approach. So basically there is no mapping file to use for regrouping to metacyc? I thought there would be one as there is a metacyc-pathway-name.txt file. Or is there a mapping file which is not part of the utility mapping files folder?  
Thank you

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [August 19, 2021, 7:18pm UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/11 "2021-08-19T19:18:20Z")

</div>

Correct, we don’t bundle mapping files for regrouping MetaCyc pathways into other entities. The main idea of regrouping is to collapse large numbers of highly specific UniRef gene families into smaller numbers of broader molecular functions to simplify analysis and interpretation of a dataset (we compute pathways from gene families for the same reason, albeit by other means).

---

<div class="post-metadata">

**Author:** ![Dhrati\_Patangia](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/dhrati_patangia/32/786_2.png) [@Dhrati\_Patangia](https://forum.biobakery.org/u/Dhrati_Patangia)\
**Post date:** [August 20, 2021, 2:04pm UTC](https://forum.biobakery.org/t/cannot-regroup-into-kegg-pathway-in-humann3/2213/12 "2021-08-20T14:04:15Z")

</div>

Thank you very much, greatly appreciated.
