# StrainPhlAn

**URL:** https://forum.biobakery.org/c/microbial-community-profiling/strainphlan/26.md

[Latest](https://forum.biobakery.org/latest.md) · [Categories](https://forum.biobakery.org/categories.md)

---

## [About the StrainPhlAn category](https://forum.biobakery.org/t/about-the-strainphlan-category/47)

<div class="topic-metadata">

**Author:** [@sagunmaharjann](https://forum.biobakery.org/u/sagunmaharjann)\
**Replies:** 0

</div>

Name: StrainPhlAn User manual || Tutorial Description: StrainPhlAn is a tool for strain-level resolution of species across large sample sets, based on single nucleotide polymorphisms (SNPs) within conserved and uni…

---

## [Strainphlan sample2markers.py ERROR](https://forum.biobakery.org/t/strainphlan-sample2markers-py-error/8650)

<div class="topic-metadata">

**Author:** [@LEEzhu0110](https://forum.biobakery.org/u/LEEzhu0110)\
**Replies:** 10\
**Last updated:** [August 21, 2026, 3:32pm UTC](https://forum.biobakery.org/t/strainphlan-sample2markers-py-error/8650 "2026-08-21T15:32:06Z")

</div>

Dear developers, I met a problem when running strainphlan(under metaphlan version=4.2.4) with command ”sample2markers.py -i vdb3.sam -f sam -o consensus\_markers2 -n 1 -d /mpa\_vOct22\_CHOCOPhlAnSGB\_202403.pkl”.It shows:\[E…

---

## [StrainPhlAn Reference Genomes](https://forum.biobakery.org/t/strainphlan-reference-genomes/8556)

<div class="topic-metadata">

**Author:** [@silvtal](https://forum.biobakery.org/u/silvtal)\
**Replies:** 1\
**Last updated:** [August 4, 2026, 10:26am UTC](https://forum.biobakery.org/t/strainphlan-reference-genomes/8556 "2026-08-04T10:26:13Z")

</div>

Hello BioBakery community, I’m currently trying to run a strain-level analysis using StrainPhlAn 4.0 on a large metagenomic dataset of mouse gut samples, previously processed with KneadData and MetaPhlAn (ChocoPhlAn Jun…

---

## [Reference genome for strainphlan](https://forum.biobakery.org/t/reference-genome-for-strainphlan/9015)

<div class="topic-metadata">

**Author:** [@HAZEL\_ANNA\_SEBASTIAN](https://forum.biobakery.org/u/HAZEL_ANNA_SEBASTIAN)\
**Replies:** 0\
**Last updated:** [July 29, 2026, 2:32pm UTC](https://forum.biobakery.org/t/reference-genome-for-strainphlan/9015 "2026-07-29T14:32:32Z")

</div>

Hello There, I was trying out strainphlan and had a small doubt, below is my command:- strainphlan -s /data/HC\_Analysis\_LVPEI/LVPEI/170\_Healthy\_Control/Strainphlan/Sam\_files/consensus\_marker/E1-10.pkl \\ -m /data/HC\_Ana…

---

## [StrainPhlAn for detection of known strains in mixed-strain samples](https://forum.biobakery.org/t/strainphlan-for-detection-of-known-strains-in-mixed-strain-samples/8850)

<div class="topic-metadata">

**Author:** [@ttmgr](https://forum.biobakery.org/u/ttmgr)\
**Replies:** 0\
**Last updated:** [March 31, 2026, 5:26pm UTC](https://forum.biobakery.org/t/strainphlan-for-detection-of-known-strains-in-mixed-strain-samples/8850 "2026-03-31T17:26:55Z")

</div>

Hi, I have nanopore metagenomic samples and I am looking to detect the presence of 4 known L. monocytogenes strains (reference genomes available). I have seen it suggested to: Use a single reference genome for mappin…

---

## [Inquiry regarding the compatible ChocoPhlAn database version for MetaPhlAn 4.2.4 and StrainPhlAn 4.1](https://forum.biobakery.org/t/inquiry-regarding-the-compatible-chocophlan-database-version-for-metaphlan-4-2-4-and-strainphlan-4-1/8844)

<div class="topic-metadata">

**Author:** [@TiffCho](https://forum.biobakery.org/u/TiffCho)\
**Replies:** 0\
**Last updated:** [March 27, 2026, 1:57pm UTC](https://forum.biobakery.org/t/inquiry-regarding-the-compatible-chocophlan-database-version-for-metaphlan-4-2-4-and-strainphlan-4-1/8844 "2026-03-27T13:57:34Z")

</div>

Hi, I am a graduate student researching the human microbiome. I am currently using MetaPhlAn 4.2.4 and StrainPhlAn 4.1 on a high-performance computing cluster without direct internet connection. I would like to clarify…

---

## [StrainPhlAn \`print\_clades\_only\` produces no clades in file](https://forum.biobakery.org/t/strainphlan-print-clades-only-produces-no-clades-in-file/8494)

<div class="topic-metadata">

**Author:** [@ktmbiome-niaid](https://forum.biobakery.org/u/ktmbiome-niaid)\
**Replies:** 2\
**Last updated:** [September 15, 2025, 6:34pm UTC](https://forum.biobakery.org/t/strainphlan-print-clades-only-produces-no-clades-in-file/8494 "2025-09-15T18:34:00Z")

</div>

Hello! I’ve been having issues with StrainPhlAn when I try to print the set of clades that work for my samples through the --print\_clades\_only option. I am currently trying to run it on the sample set provided in the tu…

---

## [How to explain Strainphlan treeshrink parameter output](https://forum.biobakery.org/t/how-to-explain-strainphlan-treeshrink-parameter-output/8449)

<div class="topic-metadata">

**Author:** [@lsy7173741](https://forum.biobakery.org/u/lsy7173741)\
**Replies:** 0\
**Last updated:** [August 28, 2025, 10:53am UTC](https://forum.biobakery.org/t/how-to-explain-strainphlan-treeshrink-parameter-output/8449 "2025-08-28T10:53:58Z")

</div>

Hello, I’m using strainphlan with –treeshrink parameter. I found that this parameter create a treeshrink folder. I suppose the file with suffix TreeShrink.tre in the folder is the final output. But when I open it in R ,…

---

## [StrainPhlan tutorial typo](https://forum.biobakery.org/t/strainphlan-tutorial-typo/8186)

<div class="topic-metadata">

**Author:** [@imchelo](https://forum.biobakery.org/u/imchelo)\
**Replies:** 0\
**Last updated:** [June 26, 2025, 2:28pm UTC](https://forum.biobakery.org/t/strainphlan-tutorial-typo/8186 "2025-06-26T14:28:30Z")

</div>

Hello, I believe that, in the StrainPhlan tutorial, in step 5, the first part of the strainphlan command should be : " strainphlan -s consensus\_markers/\*.json.bz2… and not strainphlan -s consensus\_markers/\*.json. Otherw…

---

## [StrainPhlan tutorial error - cannot add metadata to tree](https://forum.biobakery.org/t/strainphlan-tutorial-error-cannot-add-metadata-to-tree/8154)

<div class="topic-metadata">

**Author:** [@lfreund](https://forum.biobakery.org/u/lfreund)\
**Replies:** 0\
**Last updated:** [June 18, 2025, 5:51pm UTC](https://forum.biobakery.org/t/strainphlan-tutorial-error-cannot-add-metadata-to-tree/8154 "2025-06-18T17:51:13Z")

</div>

I was following the StrainPhlan tutorial found here and received an error trying to run the script add\_metadata\_tree.py. The error is shown in this screenshot. I just wanted to let the developers know of this issue. Than…

---

## [Strainphlan strain transmission tutorial](https://forum.biobakery.org/t/strainphlan-strain-transmission-tutorial/7991)

<div class="topic-metadata">

**Author:** [@alexlong](https://forum.biobakery.org/u/alexlong)\
**Replies:** 0\
**Last updated:** [April 10, 2025, 4:26pm UTC](https://forum.biobakery.org/t/strainphlan-strain-transmission-tutorial/7991 "2025-04-10T16:26:45Z")

</div>

dear strainphlan developers, i’ve been trying to replicate the results from the strain transmission tutorial using the provided files, but the number of transmission events and the threshold I get from the provided tree…

---

## [Using strainphlan with long reads?](https://forum.biobakery.org/t/using-strainphlan-with-long-reads/7937)

<div class="topic-metadata">

**Author:** [@Ge0rges](https://forum.biobakery.org/u/Ge0rges)\
**Replies:** 1\
**Last updated:** [March 18, 2025, 2:41pm UTC](https://forum.biobakery.org/t/using-strainphlan-with-long-reads/7937 "2025-03-18T14:41:06Z")

</div>

Hello, I was wondering whether strainphlan will work with a long read dataset? Is there a way to use minimap2 for mapping to the metaphlan database? Thank you

---

## [Filtering settings StrainPhlAn 4.1](https://forum.biobakery.org/t/filtering-settings-strainphlan-4-1/7833)

<div class="topic-metadata">

**Author:** [@Lapo\_Ragionieri](https://forum.biobakery.org/u/Lapo_Ragionieri)\
**Replies:** 8\
**Last updated:** [February 26, 2025, 2:15pm UTC](https://forum.biobakery.org/t/filtering-settings-strainphlan-4-1/7833 "2025-02-26T14:15:49Z")

</div>

Hi, I am running MetaPhlAn/StrainPhlAn 4.1 on two different data. I use an approach similar to the one shown in the tutorial. In one dataset (dataset1) the results are perfect, while in the second dataset (dataset2) bas…

---

## [Multiple reference genomes not in the output tree](https://forum.biobakery.org/t/multiple-reference-genomes-not-in-the-output-tree/1859)

<div class="topic-metadata">

**Author:** [@Taichi](https://forum.biobakery.org/u/Taichi)\
**Replies:** 4\
**Last updated:** [March 26, 2021, 4:32pm UTC](https://forum.biobakery.org/t/multiple-reference-genomes-not-in-the-output-tree/1859 "2021-03-26T16:32:49Z")

</div>

Hello, I am using Strainphlan3 and would like to add multiple reference genomes as outgroups. But I am having trouble adding more than one reference genome to a tree (a single reference genome can be added). For exampl…

---

## [Sample2markers don't generate any pkl files, but instead generate json.bz2 files](https://forum.biobakery.org/t/sample2markers-dont-generate-any-pkl-files-but-instead-generate-json-bz2-files/6864)

<div class="topic-metadata">

**Author:** [@zn\_Zhu](https://forum.biobakery.org/u/zn_Zhu)\
**Replies:** 6\
**Last updated:** [February 14, 2025, 6:58pm UTC](https://forum.biobakery.org/t/sample2markers-dont-generate-any-pkl-files-but-instead-generate-json-bz2-files/6864 "2025-02-14T18:58:24Z")

</div>

I am going to strainphlan4 to abtain strain level data from mgs data, but when I use command sample2markers.py -i sams/\*.sam.bz2 -o consensus\_markers -n 8, I don’t get any pkl files, but json.bz2 files. I don’t know how …

---

## [How to get strainphlan4 corresponding image installation mode?](https://forum.biobakery.org/t/how-to-get-strainphlan4-corresponding-image-installation-mode/7793)

<div class="topic-metadata">

**Author:** [@jianxi](https://forum.biobakery.org/u/jianxi)\
**Replies:** 0\
**Last updated:** [February 6, 2025, 7:05pm UTC](https://forum.biobakery.org/t/how-to-get-strainphlan4-corresponding-image-installation-mode/7793 "2025-02-06T19:05:49Z")

</div>

Hi, How to get strainphlan4 corresponding image installation mode? Best, JianXiZhang

---

## [Understanding strain\_transmission.py output and "list index out of range" error](https://forum.biobakery.org/t/understanding-strain-transmission-py-output-and-list-index-out-of-range-error/7767)

<div class="topic-metadata">

**Author:** [@Laura](https://forum.biobakery.org/u/Laura)\
**Replies:** 0\
**Last updated:** [January 23, 2025, 4:43pm UTC](https://forum.biobakery.org/t/understanding-strain-transmission-py-output-and-list-index-out-of-range-error/7767 "2025-01-23T16:43:02Z")

</div>

Thank you for making MetaPhlAn 4.1.1. I have an FMT dataset with 79 longitudinal samples and 3 donors. When I run strain\_transmission.py I encounter several issues: I found a bug where some of the output files were b…

---

## [Samples2markers.py: MarkerXX not in the metaphlan database](https://forum.biobakery.org/t/samples2markers-py-markerxx-not-in-the-metaphlan-database/7515)

<div class="topic-metadata">

**Author:** [@Joe](https://forum.biobakery.org/u/Joe)\
**Replies:** 2\
**Last updated:** [November 5, 2024, 10:16am UTC](https://forum.biobakery.org/t/samples2markers-py-markerxx-not-in-the-metaphlan-database/7515 "2024-11-05T10:16:00Z")

</div>

I have met the a problem, and my steps are same as the tutorial in git hub. \> Marker UniRef90\_A0A1N4W9S2|5\_\_8|SGB16955 not in the metaphlan database My sam files look like \> FP180000019BRL1C015R02000021589/1\_\_1.92 16 …

---

## [Sample2markers.py faced Error](https://forum.biobakery.org/t/sample2markers-py-faced-error/7147)

<div class="topic-metadata">

**Author:** [@StickHu](https://forum.biobakery.org/u/StickHu)\
**Replies:** 1\
**Last updated:** [October 24, 2024, 6:01am UTC](https://forum.biobakery.org/t/sample2markers-py-faced-error/7147 "2024-10-24T06:01:38Z")

</div>

Hi, While I was using the Metaphlan4.1.1 sample2markers.py to extract each sample’s marker to the consensus marker directory. The problem occurred. Could you please help me solve that. The database is the latest version…

---

## [Inquiry regarding change of default parameters in StrainPhlAn](https://forum.biobakery.org/t/inquiry-regarding-change-of-default-parameters-in-strainphlan/7261)

<div class="topic-metadata">

**Author:** [@jylee](https://forum.biobakery.org/u/jylee)\
**Replies:** 1\
**Last updated:** [September 23, 2024, 1:43pm UTC](https://forum.biobakery.org/t/inquiry-regarding-change-of-default-parameters-in-strainphlan/7261 "2024-09-23T13:43:51Z")

</div>

Hello, I would like to express my sincere gratitude for your continuous efforts in developing and maintaining bioBakery tools. Currently, I have been analyzing metagenome data through StrainPhlAn (v4.0.6 with vOct22\_CH…

---

## [StrainPhlan clade "s\_\_Akkermansia\_muciniphila" not accepted and should provide in SGB format](https://forum.biobakery.org/t/strainphlan-clade-s-akkermansia-muciniphila-not-accepted-and-should-provide-in-sgb-format/4722)

<div class="topic-metadata">

**Author:** [@raminka](https://forum.biobakery.org/u/raminka)\
**Replies:** 5\
**Last updated:** [September 23, 2024, 1:31pm UTC](https://forum.biobakery.org/t/strainphlan-clade-s-akkermansia-muciniphila-not-accepted-and-should-provide-in-sgb-format/4722 "2024-09-23T13:31:13Z")

</div>

I want to run strainphlan4 on my metagenomics data to get the strains of the “s\_\_Akkermansia\_muciniphila”. However, following the tutorial for strainohlan4 pipeline, the clades are specified in SGB format. So I cannot p…

---

## [StrainPhlan sample2markers.py loading database](https://forum.biobakery.org/t/strainphlan-sample2markers-py-loading-database/7257)

<div class="topic-metadata">

**Author:** [@StickHu](https://forum.biobakery.org/u/StickHu)\
**Replies:** 1\
**Last updated:** [September 23, 2024, 1:18pm UTC](https://forum.biobakery.org/t/strainphlan-sample2markers-py-loading-database/7257 "2024-09-23T13:18:38Z")

</div>

Hi, I find that the process of loading the database is consuming a significant amount of time when running a script like sample2markers.py , and I wish to prevent the database from being reloaded with each function call…

---

## [Strainphlan consensus markers](https://forum.biobakery.org/t/strainphlan-consensus-markers/7443)

<div class="topic-metadata">

**Author:** [@sjangi](https://forum.biobakery.org/u/sjangi)\
**Replies:** 1\
**Last updated:** [September 23, 2024, 1:10pm UTC](https://forum.biobakery.org/t/strainphlan-consensus-markers/7443 "2024-09-23T13:10:53Z")

</div>

Hi there, I am using Strainphlan 4, and am able to make Sam files. However, when I try to make consensus markers I get the following error: \[Error\] Parallel execution fails: Compressed file ended before the end-of-stre…

---

## [StrainPhlAn Tutorial Error](https://forum.biobakery.org/t/strainphlan-tutorial-error/7401)

<div class="topic-metadata">

**Author:** [@cliffbueno](https://forum.biobakery.org/u/cliffbueno)\
**Replies:** 0\
**Last updated:** [August 25, 2024, 4:13am UTC](https://forum.biobakery.org/t/strainphlan-tutorial-error/7401 "2024-08-25T04:13:23Z")

</div>

Hello, I was running the StrainPhlAn tutorial. Things were working fine until I got to the consensus markers step. I ran the code: sample2markers.py -i sams/\*.sam.bz2 -o consensus\_markers -n 8 And it yielded the foll…

---

## [Problem running StrainPhlan](https://forum.biobakery.org/t/problem-running-strainphlan/1904)

<div class="topic-metadata">

**Author:** [@sinkko](https://forum.biobakery.org/u/sinkko)\
**Replies:** 6\
**Last updated:** [August 21, 2024, 7:40am UTC](https://forum.biobakery.org/t/problem-running-strainphlan/1904 "2024-08-21T07:40:39Z")

</div>

Dear Help I have been running Strainphlan for the first time and followed the tutorial and manual. The first steps were successful until when I calling strainphlan to build the multiple sequence alignment and the phylog…

---

## [StrainPhLan4 and GTDB](https://forum.biobakery.org/t/strainphlan4-and-gtdb/7272)

<div class="topic-metadata">

**Author:** [@atyakhtmpg](https://forum.biobakery.org/u/atyakhtmpg)\
**Replies:** 0\
**Last updated:** [July 15, 2024, 2:57pm UTC](https://forum.biobakery.org/t/strainphlan4-and-gtdb/7272 "2024-07-15T14:57:15Z")

</div>

Hello! Is it possible to run the tool for a GTDB species rather than for an SGB?

---

## [Samfile error when applying strainphlan to output .bz2 files of metaphlan](https://forum.biobakery.org/t/samfile-error-when-applying-strainphlan-to-output-bz2-files-of-metaphlan/6653)

<div class="topic-metadata">

**Author:** [@burdungy](https://forum.biobakery.org/u/burdungy)\
**Replies:** 2\
**Last updated:** [July 3, 2024, 1:22pm UTC](https://forum.biobakery.org/t/samfile-error-when-applying-strainphlan-to-output-bz2-files-of-metaphlan/6653 "2024-07-03T13:22:52Z")

</div>

Hi, I am trying to use strainphlan to build a phylogenetic tree, but when I apply sample2markers.py to the out put of metaphlan, I got errors: Processing sample: /mnt/vstor/CSE\_CSDS\_VXC204/rxl761/consensus\_markers/tmpx…

---

## [Strain\_transmission.py not detecting transmission events](https://forum.biobakery.org/t/strain-transmission-py-not-detecting-transmission-events/5735)

<div class="topic-metadata">

**Author:** [@mattea.allert](https://forum.biobakery.org/u/mattea.allert)\
**Replies:** 10\
**Last updated:** [June 5, 2024, 3:31am UTC](https://forum.biobakery.org/t/strain-transmission-py-not-detecting-transmission-events/5735 "2024-06-05T03:31:35Z")

</div>

I am having issues detecting strain sharing events using strain\_transmission.py. For your reference I am using 4.0.6 version of MetaPhlAn and the following code, strain\_transmission.py -t “${prefix}.tre” -m metadata -o “…

---

## [The number of "samples" in strainphlan's result file exceeded the number of my macro gene sequencing samples](https://forum.biobakery.org/t/the-number-of-samples-in-strainphlans-result-file-exceeded-the-number-of-my-macro-gene-sequencing-samples/7027)

<div class="topic-metadata">

**Author:** [@LuXX](https://forum.biobakery.org/u/LuXX)\
**Replies:** 1\
**Last updated:** [June 4, 2024, 11:33am UTC](https://forum.biobakery.org/t/the-number-of-samples-in-strainphlans-result-file-exceeded-the-number-of-my-macro-gene-sequencing-samples/7027 "2024-06-04T11:33:09Z")

</div>

strainphlan -s \*json.bz2 --print\_clades\_only -o ./strainphlan\_result --nproc 10 --marker\_in\_n\_samples\_perc 20 \> clades.txt Fri May 10 16:59:17 2024: Start StrainPhlAn 4.1.0 execution Fri May 10 16:59:17 2024: Loading…

---

## [Error occuring at Phylophlan execution while running Strainphlan 4](https://forum.biobakery.org/t/error-occuring-at-phylophlan-execution-while-running-strainphlan-4/6418)

<div class="topic-metadata">

**Author:** [@Faheem\_Raziq](https://forum.biobakery.org/u/Faheem_Raziq)\
**Replies:** 3\
**Last updated:** [June 4, 2024, 11:26am UTC](https://forum.biobakery.org/t/error-occuring-at-phylophlan-execution-while-running-strainphlan-4/6418 "2024-06-04T11:26:19Z")

</div>

Greetings! I am using StrainPhlAn version 4.0.6 (1 Mar 2023) for strains diversity profilling. I am following the (StrainPhlAn 4 · biobakery/MetaPhlAn Wiki · GitHub) tutorial and had completed the tutorial till step 4 b…

[Next page](https://forum.biobakery.org/c/microbial-community-profiling/strainphlan/26.md?page=1)
