Combine metaphlan and humann

Hi,

I’m new to BioBakery and would really appreciate some guidance.

I’m currently working with paired-end reads and looking to integrate MetaPhlAn and HUMAnN in my workflow. To optimize time and computational resources, I was wondering:
Is it possible to use the SAM output from MetaPhlAn as input for HUMAnN, while still preserving the accuracy and integrity of the results?

Thank you in advance for your help and insights!

===
version

  • Metaphlan 3.6.1
  • Humann 4.1.1

example of code:

metaphlan \
	--input_type fastq \
	--read_min_len 50 \
	--bowtie2db ${metaphlan_reffolder} \
	--index ${metaphlan_refname} \
	--bowtie2out bowtie2.log \
	--samout samout.bz2 \
	-t rel_ab_w_read_stats \
	--nproc ${threads} \
	-o tmp_metaphlan_profile.tsv \
	${R1},${R2}

### - decompress alignment file 
bunzip2 samout.bz2

### - run humann using metaphlan alignment file
	humann \
	-i   samout \
	--threads ${threads} \
	--taxonomic-profile tmp_metaphlan_profile.tsv \
	--memory-use  maximum \
	--nucleotide-database ${humann_nucleotidedb} \
	--protein-database ${humann_proteindb} \
	--output-format tsv \
	--output-basename test \
	--output tmp.out

If you’re running MetaPhlAn outside of HUMAnN you can pass the resulting taxonomic profile to HUMAnN via the --taxonomic-profile flag. While HUMAnN can read SAM results, you would not want to start from the MetaPhlAn SAM, as those would only contain alignments of reads to marker genes.

Sounds good. Thanks for the clear answer and the explanation!