# Metaphlan 3 runs, but does not produce output files

**URL:** <https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689>\
**Category:** MetaPhlAn\
**Created:** [June 6, 2022, 9:55pm UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689 "2022-06-06T21:55:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ewissel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/ewissel/32/568_2.png) [@ewissel](https://forum.biobakery.org/u/ewissel)\
**Post date:** [June 6, 2022, 9:55pm UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/1 "2022-06-06T21:55:04Z")

</div>

Hi biob help team,

I am getting a weird issue that I am not sure how to solve. I have conda installed metaphlan3. The tool appears to run like normal (takes time to process, produces bowtie intermediate files), but there is no output file created. I am also unable to get the taxonomic info in stout if I don’t specify the `-o` flag.

Here is the command:  
`metaphlan /home/ewissel/proj_angst/check_proc_qual/inputs/E0683-1-VagM1_1.fastq /home/ewissel/proj_angst/check_proc_qual/inputs/E0683-1-VagM1_1.fastq.bowtie2out.txt --input_type fastq --add_viruses -o /home/ewissel/proj_angst/check_proc_qual/meta3_out/E0683-1-VagM1_meta3_out.txt --nproc 3 --bowtie2db /home/kjijakl/biobakery_db/metaphlan_db/ --force`

Other users on our server who are using the same conda-install version of metaphlan do not have this issue, and there are no obvious differences in how we are running the command. Note that the pipeline also does not produce the output directory `meta3_out` and I have all permissions to read/write files that are in use here . Any clues?

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [June 7, 2022, 12:41pm UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/2 "2022-06-07T12:41:35Z")

</div>

Hi @ewissel  
By what you are reporting, I think your problem is due to the missing `/home/ewissel/proj_angst/check_proc_qual/meta3_out` directory. MetaPhlAn will expect that directory already exists and it won’t create it if it is not present. Try to manually create the output directory first and then run metaphlan.

---

<div class="post-metadata">

**Author:** ![ewissel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/ewissel/32/568_2.png) [@ewissel](https://forum.biobakery.org/u/ewissel)\
**Post date:** [June 7, 2022, 4:04pm UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/3 "2022-06-07T16:04:45Z")

</div>

Thanks for the suggestion!

When I manually create the directory and try to run metaphlan, I still don’t get any output. The bowtie2out files are created, and `WARNING: The metagenome profile contains clades that represent multiple species merged into a single representant. An additional column listing the merged species is added to the MetaPhlAn output.` is spit in the console, but no `*_profile.txt` files are created.

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [June 8, 2022, 7:38am UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/4 "2022-06-08T07:38:42Z")

</div>

I was rechecking the command you are using and I think I found out the problem.

> metaphlan /home/ewissel/proj\_angst/check\_proc\_qual/inputs/E0683-1-VagM1\_1.fastq **/home/ewissel/proj\_angst/check\_proc\_qual/inputs/E0683-1-VagM1\_1.fastq.bowtie2out.txt** --input\_type fastq --add\_viruses -o /home/ewissel/proj\_angst/check\_proc\_qual/meta3\_out/E0683-1-VagM1\_meta3\_out.txt --nproc 3 --bowtie2db /home/kjijakl/biobakery\_db/metaphlan\_db/ --force

You are specifying the \*_.bowtie2out.txt_ file as the second argument instead as the `--bowtie2out` parameter. As a second argument is being specified, metaphlan is storing the results there instead. Try changing the command to:  
metaphlan /home/ewissel/proj\_angst/check\_proc\_qual/inputs/E0683-1-VagM1\_1.fastq **–bowtie2out** /home/ewissel/proj\_angst/check\_proc\_qual/inputs/E0683-1-VagM1\_1.fastq.bowtie2out.txt --input\_type fastq --add\_viruses -o /home/ewissel/proj\_angst/check\_proc\_qual/meta3\_out/E0683-1-VagM1\_meta3\_out.txt --nproc 3 --bowtie2db /home/kjijakl/biobakery\_db/metaphlan\_db/ --force

---

<div class="post-metadata">

**Author:** ![ewissel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/ewissel/32/568_2.png) [@ewissel](https://forum.biobakery.org/u/ewissel)\
**Post date:** [June 20, 2022, 3:47pm UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/5 "2022-06-20T15:47:22Z")

</div>

Thanks! I fixed the command and still had the same issue. Upon closer inspection, I found that the metaphlan3 output was overriding the R2 fastq with the results. I’m not sure why because I always make sure I specify the output name to specifically avoid this type of problem. I have the fastqs backed up so it’s not an issue for me, but I’m not sure how this happened!

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [June 21, 2022, 7:11am UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/6 "2022-06-21T07:11:15Z")

</div>

Hi @ewissel  
In the command you shared you only runned metaphlan on the R1. How is the command adding also R2? Is it like:  
`metaphlan /home/ewissel/proj_angst/check_proc_qual/inputs/E0683-1-VagM1_1.fastq /home/ewissel/proj_angst/check_proc_qual/inputs/E0683-1-VagM1_2.fastq –bowtie2out /home/ewissel/proj_angst/check_proc_qual/inputs/E0683-1-VagM1.fastq.bowtie2out.txt --input_type fastq --add_viruses -o /home/ewissel/proj_angst/check_proc_qual/meta3_out/E0683-1-VagM1_meta3_out.txt --nproc 3 --bowtie2db /home/kjijakl/biobakery_db/metaphlan_db/ --force`  
In that case, you should change it to:  
`metaphlan /home/ewissel/proj_angst/check_proc_qual/inputs/E0683-1-VagM1_1.fastq,/home/ewissel/proj_angst/check_proc_qual/inputs/E0683-1-VagM1_2.fastq –bowtie2out /home/ewissel/proj_angst/check_proc_qual/inputs/E0683-1-VagM1.fastq.bowtie2out.txt --input_type fastq --add_viruses -o /home/ewissel/proj_angst/check_proc_qual/meta3_out/E0683-1-VagM1_meta3_out.txt --nproc 3 --bowtie2db /home/kjijakl/biobakery_db/metaphlan_db/ --force`  
For the same reason as with the bowtie2out, the R1 and R2 should be separated by comma or the second argument will be detected as the output file

---

<div class="post-metadata">

**Author:** ![ewissel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/ewissel/32/568_2.png) [@ewissel](https://forum.biobakery.org/u/ewissel)\
**Post date:** [June 21, 2022, 1:20pm UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/7 "2022-06-21T13:20:58Z")

</div>

Ah I see what the error is. I didn’t use a comma to separate R1 and R2, I used a space so it thought the R2 file was the output. Good to know!! Did I miss this in the documentation?

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [June 21, 2022, 3:20pm UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/8 "2022-06-21T15:20:41Z")

</div>

You might have missed it: [MetaPhlAn 3.0 · biobakery/MetaPhlAn Wiki · GitHub](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.0#basic-usage)

> MetaPhlAn can also natively **handle paired-end metagenomes** (but does not use the paired-end information), and, more generally, metagenomes stored in multiple files (but you need to specify the --bowtie2out parameter):  
> `$ metaphlan metagenome_1.fastq,metagenome_2.fastq --bowtie2out metagenome.bowtie2.bz2 --nproc 5 --input_type fastq -o profiled_metagenome.txt`

---

<div class="post-metadata">

**Author:** ![ewissel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/ewissel/32/568_2.png) [@ewissel](https://forum.biobakery.org/u/ewissel)\
**Post date:** [June 21, 2022, 3:42pm UTC](https://forum.biobakery.org/t/metaphlan-3-runs-but-does-not-produce-output-files/3689/9 "2022-06-21T15:42:03Z")

</div>

thank you for linking, i see it now!
