# MetaPhlAn 4.1.0: SAM not generated when using --samout with --input\_type bowtie2out

**URL:** https://forum.biobakery.org/t/metaphlan-4-1-0-sam-not-generated-when-using-samout-with-input-type-bowtie2out/8339
**Category:** MetaPhlAn
**Created:** [August 4, 2025, 7:09am UTC](https://forum.biobakery.org/t/metaphlan-4-1-0-sam-not-generated-when-using-samout-with-input-type-bowtie2out/8339 "2025-08-04T07:09:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jihen](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jihen/32/3342_2.png) [@jihen](https://forum.biobakery.org/u/jihen)
#### Post date: [August 4, 2025, 7:09am UTC](https://forum.biobakery.org/t/metaphlan-4-1-0-sam-not-generated-when-using-samout-with-input-type-bowtie2out/8339/1 "2025-08-04T07:09:39Z")

</div>

# Issue

I’m trying to regenerate a SAM file from a previously generated `--bowtie2out` file in MetaPhlAn.

## Command

```  
metaphlan A4.bowtie2.bz2  
–input\_type bowtie2out  
–index mpa\_vJun23\_CHOCOPhlAnSGB\_202307  
–bowtie2db /metaphlan\_analysis/bt2db/  
–nproc 8  
–samout A4\_metaphlan.sam  
-o A4\_profile\_abs.txt  
```

## Observation

No SAM file is created when I run this command.

## Question

Is this expected behaviour when `--input_type bowtie2out` is used?  
Does MetaPhlAn need raw reads as input in order to generate a SAM file with `--samout`?

Any clarification on whether this is possible without re‑running MetaPhlAn on the raw reads would be appreciated.

---

<div class="post-metadata">

### Author: ![Claudia\_Mengoni](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/claudia_mengoni/32/2871_2.png) [@Claudia\_Mengoni](https://forum.biobakery.org/u/Claudia_Mengoni)
#### Post date: [September 11, 2025, 10:21am UTC](https://forum.biobakery.org/t/metaphlan-4-1-0-sam-not-generated-when-using-samout-with-input-type-bowtie2out/8339/2 "2025-09-11T10:21:30Z")

</div>

Hi @jihen

Yes, this is expected. The bowtie2out file is a summary of the sam file and contains a subset of the mapping information, it is a simple tab separated file with reads and markers that mapped against it. For this reason if you require the full sam file you should rerun the mapping from the raw reads.
