Run HUMAnN 3 for producing Metaphlan 4's outputs

Dear developers

Hello, I appreciate developing great tools.

Now, I just tested my code for HUMAnN with the demo.fastq 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

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 :sweat_smile:?

Humann [3.7]
Metaphlan [4.0.6]
demo.log.tsv (34.0 KB)

Thank you for your help in advance
Gihyeon.

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.

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!

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.

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.

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.

1 Like

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.

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.

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.