# Run HUMAnN 3 for producing Metaphlan 4's outputs

**URL:** <https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385>\
**Category:** HUMAnN\
**Created:** [June 5, 2023, 5:22am UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385 "2023-06-05T05:22:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kim-Gihyeon](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kim-gihyeon/32/2182_2.png) [@Kim-Gihyeon](https://forum.biobakery.org/u/Kim-Gihyeon)\
**Post date:** [June 5, 2023, 5:22am UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/1 "2023-06-05T05:22:02Z")

</div>

Dear developers

Hello, I appreciate developing great tools.

Now, I just tested my code for HUMAnN with the [demo.fastq](https://github.com/biobakery/humann/tree/master/examples) file.

As HUMAnN is executable with Metaphlan on its own running with “–metaphlan-options” option, I have tried to make sam output, taxonomic profile, and bowtie file, which are made by Metaphlan.

However, only sam output file was made, whereas the taxonomic profile and bowtie file were not made.

Actually, HUMAnN may make those files in temp\* folder, I would run HUMAnN with --remove-tem–output  
because too large temp files will be made when dealing with real data.

The code I ran is

```auto
humann -i demo.fastq -o result --thread 75 --input-format fastq --metaphlan-options "-s demo.sam.bz2 --output_file demo_sample_profile.tsv --bowtie2out demo_bowtie2.bz2".

```

As a result,  
demo.sam.bz2 was made.  
demo\_sample\_profile.tsv and demo\_bowtie2.bz2 were not made (which I wanna make).  
(genefamiles.tsv, pathabudnacne.tsv, and pathcoverage.tsv were also made well)

So, do you have any suggestions for me?  
Should I do Huamann and Metaphlan separately 😅?

Humann [3.7]  
Metaphlan [4.0.6]  
[demo.log.tsv](https://forum.biobakery.org/uploads/short-url/lCsGCw3IoCMbd2CLF5JTz4FfZaz.tsv) (34.0 KB)

Thank you for your help in advance  
Gihyeon.

---

<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 11, 2023, 2:51pm UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/2 "2023-06-11T14:51:02Z")

</div>

You can use `--metaphlan-options` to change things like mapping stringency or to manually specify a database path, but if you use it to change the locations of MetaPhlAn output files that HUMAnN needs then HUMAnN won’t be able to find them and you’ll get an error. If you don’t want to keep the full HUMAnN temp folder then yes, I would recommend running MetaPhlAn first, saving whatever you need, and then pass the taxonomic profile to HUMAnN using the `--taxonomic-profile` flag.

---

<div class="post-metadata">

**Author:** ![Kim-Gihyeon](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kim-gihyeon/32/2182_2.png) [@Kim-Gihyeon](https://forum.biobakery.org/u/Kim-Gihyeon)\
**Post date:** [June 13, 2023, 12:13am UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/3 "2023-06-13T00:13:15Z")

</div>

As I understood, `--metaphlan-options` is not working for all options of MetaPhlAn, only useful for things like mapping stringency…

I will try to run MetaPhlAn first, and then HUMAnN as you recommended.

Thank you for your response!

---

<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 23, 2023, 6:09pm UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/4 "2023-06-23T18:09:01Z")

</div>

Confirmed. In particular doing anything to change the locations of MetaPhlAn output files by manipulating `--metaphlan-options` would cause a problem because HUMAnN wouldn’t know where to find them.

---

<div class="post-metadata">

**Author:** ![Kim-Gihyeon](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kim-gihyeon/32/2182_2.png) [@Kim-Gihyeon](https://forum.biobakery.org/u/Kim-Gihyeon)\
**Post date:** [July 5, 2023, 7:48am UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/5 "2023-07-05T07:48:47Z")

</div>

I got it.  
I just wondered that Is there any method of saving outputs, that I want to save, without saving temp. files to cut down the storage.  
I’ll try to find the best way for it.

Thank you for your help.

---

<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:** [July 7, 2023, 6:39pm UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/6 "2023-07-07T18:39:54Z")

</div>

You could selectively move certain files you want to keep out of `temp/` and then remove `temp/`. I often do this to save the MetaPhlAn profile + log file and then remove the rest. Notably we are making these files default files rather than temp files in HUMAnN 4 so that it’s even safer to just remove `temp/` after the run.

---

<div class="post-metadata">

**Author:** ![Kim-Gihyeon](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kim-gihyeon/32/2182_2.png) [@Kim-Gihyeon](https://forum.biobakery.org/u/Kim-Gihyeon)\
**Post date:** [July 10, 2023, 12:11am UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/7 "2023-07-10T00:11:33Z")

</div>

Yes, You’re right. The simplest way is to move certain files from the temporary folder and remove the others in the temporary folder.  
I just wondered about HUMAnA 3 can make taxa profiles in a specific folder where I want to save to. (as well as bowtie 2 outputs).  
And, it sounds great you are trying to develop HUMAaN 3 to make some files (maybe taxa profiles?) default.  
I really appreciate your help.  
I’ll keep checking on updates!

Best regards,  
Gihyeon.

---

<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:** [July 13, 2023, 8:00pm UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/8 "2023-07-13T20:00:35Z")

</div>

If you just want to save the taxonomic profile, you can generate it outside of HUMAnN with MetaPhlAn, save it wherever you’d like, and then pass it to HUMAnN via the `--taxonomic-profile` flag.

---

<div class="post-metadata">

**Author:** ![Kim-Gihyeon](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kim-gihyeon/32/2182_2.png) [@Kim-Gihyeon](https://forum.biobakery.org/u/Kim-Gihyeon)\
**Post date:** [August 1, 2023, 7:27am UTC](https://forum.biobakery.org/t/run-humann-3-for-producing-metaphlan-4s-outputs/5385/9 "2023-08-01T07:27:03Z")

</div>

Sorry for the late response !!

Thank you @franzosa for your kind responses.  
I agree with your suggestion, that is the best and simplest way for what I wanted.

Thank you again!

Best regards,  
Gihyeon.
