# Humann in two steps

**URL:** https://forum.biobakery.org/t/humann-in-two-steps/3753
**Category:** HUMAnN
**Created:** [June 21, 2022, 7:27am UTC](https://forum.biobakery.org/t/humann-in-two-steps/3753 "2022-06-21T07:27:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![imontero](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/imontero/32/3411_2.png) [@imontero](https://forum.biobakery.org/u/imontero)
#### Post date: [June 21, 2022, 7:27am UTC](https://forum.biobakery.org/t/humann-in-two-steps/3753/1 "2022-06-21T07:27:47Z")

</div>

Hello:

I tried to run biobakery workflows and it worked with kneadData and MetaPhlAn. HUMAnN gave me an error inside workflows, so I tried to run the program separately.

When I used MetaPhlAn sam and tsv files I received all UNMAPED.

> humann --input EC1\_bowtie2.sam --taxonomic-profile EC1\_taxonomic\_profile.tsv --output /media/microviable/e/EC1/humann --threads 4 --o-log /media/microviable/e/EC1/humann/EC1.log  
> Creating output directory: /media/microviable/e/EC1/humann  
> Output files will be written to: /media/microviable/e/EC1/humann  
> Process the sam mapping results …  
> Computing gene families …  
> Computing pathways abundance and coverage …  
> Output files created:  
> /media/microviable/e/EC1/humann/EC1\_bowtie2\_genefamilies.tsv  
> /media/microviable/e/EC1/humann/EC1\_bowtie2\_pathabundance.tsv  
> /media/microviable/e/EC1/humann/EC1\_bowtie2\_pathcoverage.tsv

When I use kneadData fastq, I received another error

> humann --input EC1.fastq --output /media/microviable/e/EC1/humann --threads 4 --o-log /media/microviable/e/EC1/humann/EC1.log  
> Output files will be written to: /media/microviable/e/EC1/humann  
> Running metaphlan …  
> Found g\_\_Lachnospiraceae\_unclassified.s\_\_Eubacterium\_rectale : 34.83% of mapped reads  
> …  
> Total species selected from prescreen: 71  
> Selected species explain 99.94% of predicted community composition  
> Creating custom ChocoPhlAn database …  
> Running bowtie2-build …  
> Running bowtie2 …  
> Total bugs from nucleotide alignment: 71  
> g\_\_Roseburia.s\_\_Roseburia\_intestinalis: 81376 hits  
> …  
> Total gene families from nucleotide alignment: 145662  
> Unaligned reads after nucleotide alignment: 45.3554444501 %  
> Running diamond …  
> Aligning to reference database: uniref90\_201901b\_full.dmnd  
> CRITICAL ERROR: Error executing: /home/microviable/miniconda3/envs/humann3/bin/diamond blastx --query /media/microviable/e/EC1/humann/EC1\_humann\_temp/EC1\_bowtie2\_unaligned.fa --evalue 1.0 --threads 4 --top 1 --outfmt 6 --db /media/microviable/e/biobakery\_workflows\_databases/humann/uniref/uniref90\_201901b\_full --out /media/microviable/e/EC1/humann/EC1\_humann\_temp/tmpo2hu4iuj/diamond\_m8\_4nfyskk2 --tmpdir /media/microviable/e/EC1/humann/EC1\_humann\_temp/tmpo2hu4iuj  
> Error message returned from diamond :  
> diamond v0.9.36.137 (C) Max Planck Society for the Advancement of Science  
> Documentation, support and updates available at [http://www.diamondsearch.org](http://www.diamondsearch.org)  
> #CPU threads: 4  
> Scoring parameters: (Matrix=BLOSUM62 Lambda=0.267 K=0.041 Penalties=11/1)  
> Temporary directory: /media/microviable/e/EC1/humann/EC1\_humann\_temp/tmpo2hu4iuj  
> Opening the database… [0.562s]  
> Percentage range of top alignment score to report hits: 1  
> Reference = /media/microviable/e/biobakery\_workflows\_databases/humann/uniref/uniref90\_201901b\_full.dmnd  
> Sequences = 87296736  
> Letters = 29247941583  
> Block size = 2000000000  
> Opening the input file… [0.33s]  
> Opening the output file… [0.001s]  
> Loading query sequences… [16.939s]  
> Masking queries… [23.073s]  
> Building query seed set… [0.057s]  
> Algorithm: Double-indexed  
> Building query histograms… [6.458s]  
> Allocating buffers… [0s]  
> Loading reference sequences… [0s]  
> Error: Unexpected end of input.

So I tried to use sam and tsv files from this process and it worked.

I don’t know what is the problem.

Any 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: [June 28, 2022, 8:05pm UTC](https://forum.biobakery.org/t/humann-in-two-steps/3753/2 "2022-06-28T20:05:17Z")

</div>

The first process you’re describing, i.e. using the MetaPhlAn SAM output as input to HUMAnN, is not going to do what you want. The MetaPhlAn SAM output only includes mappings of reads to MetaPhlAn marker genes, but for HUMAnN you want to be starting with a SAM file that covers ALL your reads (assuming you are starting HUMAnN with SAM input, which is mostly for 1. restarting a HUMAnN run that already finished mapping your reads to pangenomes or 2. using HUMAnN to process the alignment output of another program - both atypical use cases).

The second run (starting from FASTQ) looks OK in principle though. Are you sure the input file is OK / not corrupted? Are you able to run the HUMAnN demo successfully? The latter would be a good test that your software installation is working OK.

---

<div class="post-metadata">

### Author: ![imontero](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/imontero/32/3411_2.png) [@imontero](https://forum.biobakery.org/u/imontero)
#### Post date: [July 4, 2022, 8:44am UTC](https://forum.biobakery.org/t/humann-in-two-steps/3753/3 "2022-07-04T08:44:43Z")

</div>

demo gives me the same error:

humann -i demo.fastq.gz -o sample\_results  
Creating output directory: /media/microviable/e/Bike/sample\_results  
Output files will be written to: /media/microviable/e/Bike/sample\_results  
Decompressing gzipped file …

Running metaphlan …

Found g\_\_Bacteroides.s\_\_Bacteroides\_dorei : 57.96% of mapped reads  
Found g\_\_Bacteroides.s\_\_Bacteroides\_vulgatus : 42.04% of mapped reads

Total species selected from prescreen: 2

Selected species explain 100.00% of predicted community composition

Creating custom ChocoPhlAn database …

Running bowtie2-build …

Running bowtie2 …

Total bugs from nucleotide alignment: 2  
g\_\_Bacteroides.s\_\_Bacteroides\_vulgatus: 1274 hits  
g\_\_Bacteroides.s\_\_Bacteroides\_dorei: 1318 hits

Total gene families from nucleotide alignment: 548

Unaligned reads after nucleotide alignment: 87.6571428571 %

Running diamond …

Aligning to reference database: uniref90\_201901b\_full.dmnd

CRITICAL ERROR: Error executing: /home/microviable/miniconda3/envs/humann3/bin/diamond blastx --query /media/microviable/e/Bike/sample\_results/demo\_humann\_temp/demo\_bowtie2\_unaligned.fa --evalue 1.0 --threads 1 --top 1 --outfmt 6 --db /media/microviable/e/biobakery\_workflows\_databases/humann/uniref/uniref90\_201901b\_full --out /media/microviable/e/Bike/sample\_results/demo\_humann\_temp/tmpy1jh\_2do/diamond\_m8\_4pm0nhda --tmpdir /media/microviable/e/Bike/sample\_results/demo\_humann\_temp/tmpy1jh\_2do

Error message returned from diamond :  
diamond v0.9.36.137 (C) Max Planck Society for the Advancement of Science  
Documentation, support and updates available at [http://www.diamondsearch.org](http://www.diamondsearch.org)

#CPU threads: 1  
Scoring parameters: (Matrix=BLOSUM62 Lambda=0.267 K=0.041 Penalties=11/1)  
Temporary directory: /media/microviable/e/Bike/sample\_results/demo\_humann\_temp/tmpy1jh\_2do  
Opening the database… [0.554s]  
Percentage range of top alignment score to report hits: 1  
Reference = /media/microviable/e/biobakery\_workflows\_databases/humann/uniref/uniref90\_201901b\_full.dmnd  
Sequences = 87296736  
Letters = 29247941583  
Block size = 2000000000  
Opening the input file… [0.003s]  
Opening the output file… [0s]  
Loading query sequences… [0.018s]  
Masking queries… [0.159s]  
Building query seed set… [0.011s]  
Algorithm: Double-indexed  
Building query histograms… [0.029s]  
Allocating buffers… [0s]  
Loading reference sequences… [0s]  
Error: Unexpected end of input.
