---
name: "strainphlan"
section: "1"
platform: "linux"
package: "metaphlan"
version: "4.0.4+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/strainphlan"
---

# strainphlan(1)

METAgenomic PHyLogenetic ANalysis for metagenomic taxonomic profiling (strainer)

## NAME

metaphlan2\_strainer - METAgenomic PHyLogenetic ANalysis for metagenomic taxonomic profiling (strainer)

## SYNOPSIS

**metaphlan2\_strainer.py** \[-h\] **--ifn\_samples** IFN\_SAMPLES \[IFN\_SAMPLES ...\] **--mpa\_pkl** MPA\_PKL **--output\_dir** OUTPUT\_DIR \[--ifn\_markers IFN\_MARKERS\] \[--nprocs\_main NPROCS\_MAIN\] \[--nprocs\_load\_samples NPROCS\_LOAD\_SAMPLES\] \[--nprocs\_align\_clean NPROCS\_ALIGN\_CLEAN\] \[--nprocs\_raxml NPROCS\_RAXML\] \[--bootstrap\_raxml BOOTSTRAP\_RAXML\] \[--ifn\_ref\_genomes IFN\_REF\_GENOMES \[IFN\_REF\_GENOMES ...\]\] \[--N\_in\_marker N\_IN\_MARKER\] \[--marker\_strip\_length MARKER\_STRIP\_LENGTH\] \[--marker\_in\_clade MARKER\_IN\_CLADE\] \[--sample\_in\_clade SAMPLE\_IN\_CLADE\] \[--sample\_in\_marker SAMPLE\_IN\_MARKER\] \[--gap\_in\_trailing\_col GAP\_IN\_TRAILING\_COL\] \[--gap\_trailing\_col\_limit GAP\_TRAILING\_COL\_LIMIT\] \[--gap\_in\_internal\_col GAP\_IN\_INTERNAL\_COL\] \[--gap\_in\_sample GAP\_IN\_SAMPLE\] \[--N\_col N\_COL\] \[--N\_count N\_COUNT\] \[--long\_gap\_length LONG\_GAP\_LENGTH\] \[--long\_gap\_percentage LONG\_GAP\_PERCENTAGE\] \[--p\_value P\_VALUE\] \[--clades CLADES \[CLADES ...\]\] \[--marker\_list\_fn MARKER\_LIST\_FN\] \[--print\_clades\_only\] \[--alignment\_program {muscle,mafft}\] \[--relaxed\_parameters\] \[--relaxed\_parameters2\] \[--keep\_alignment\_files\] \[--keep\_full\_alignment\_files\] \[--save\_sample2fullfreq\] \[--use\_threads\]

## DESCRIPTION

Metaphlan2\_strainer is a computational tool for tracking individual strains across large set of samples. The input of metaphlan2\_strainer is a set of metagenomic samples and the output is a set of phylogenetic. For each sample, metaphlan2\_strainer extracts the strain of a specific species by merging and concatenating all reads mapped against that species markers in the MetaPhlAn2 database.

## OPTIONS

### optional arguments

- **-h**, **--help**

  show this help message and exit

- **--ifn\_samples** IFN\_SAMPLES \[IFN\_SAMPLES ...\]

  The list of sample files (space separated).The wildcard can also be used.

- **--mpa\_pkl** MPA\_PKL

  The database of metaphlan3.py.

- **--output\_dir** OUTPUT\_DIR

  The output directory.

- **--ifn\_markers** IFN\_MARKERS

  The marker file in fasta format.

- **--nprocs\_main** NPROCS\_MAIN

  The number of processors are used for the main threads. Default 1.

- **--nprocs\_load\_samples** NPROCS\_LOAD\_SAMPLES

  The number of processors are used for loading samples. Default nprocs\_main.

- **--nprocs\_align\_clean** NPROCS\_ALIGN\_CLEAN

  The number of processors are used for aligning and cleaning markers. Default nprocs\_main.

- **--nprocs\_raxml** NPROCS\_RAXML

  The number of processors are used for running raxml. Default nprocs\_main.

- **--bootstrap\_raxml** BOOTSTRAP\_RAXML

  The number of runs for bootstraping when building the tree. Default 0.

- **--ifn\_ref\_genomes** IFN\_REF\_GENOMES \[IFN\_REF\_GENOMES ...\]

  The reference genome file names. They are separated by spaces.

- **--N\_in\_marker** N\_IN\_MARKER

  The consensus markers with the rate of N nucleotides greater than this threshold are removed. Default 0.2.

- **--marker\_strip\_length** MARKER\_STRIP\_LENGTH

  The number of nucleotides will be deleted from each of two ends of a marker. Default 50.

- **--marker\_in\_clade** MARKER\_IN\_CLADE

  In each sample, the clades with the rate of present markers less than this threshold are removed. Default 0.8.

- **--sample\_in\_clade** SAMPLE\_IN\_CLADE

  Only clades present in at least sample\_in\_clade samples are kept. Default 2.

- **--sample\_in\_marker** SAMPLE\_IN\_MARKER

  If the percentage of samples that a marker present in is less than this threshold, that marker is removed. Default 0.8.

- **--gap\_in\_trailing\_col** GAP\_IN\_TRAILING\_COL

  If the number of the trailing nucleotide columns in aligned markers with the percentage of gaps greater than gap\_in\_trailing\_col is less than gap\_trailing\_col\_limit, these columns will be removed. Default 0.2.

- **--gap\_trailing\_col\_limit** GAP\_TRAILING\_COL\_LIMIT

  If the number of the trailing nucleotide columns in aligned markers with the percentage of gaps greater than gap\_in\_trailing\_col is less than gap\_trailing\_col\_limit, these columns will be removed. Default 101.

- **--gap\_in\_internal\_col** GAP\_IN\_INTERNAL\_COL

  The internal nucleotide columns in aligned markers with the percentage of gaps greater than gap\_in\_internal\_col will be removed. Default 0.3.

- **--gap\_in\_sample** GAP\_IN\_SAMPLE

  The samples with full sequences from all markers and having the percentage of gaps greater than this threshold will be removed. Default 0.2.

- **--N\_col** N\_COL

  In aligned markers, if the percentage of nucleotide columns containing more than N\_count Ns less than this threshold, these columns will be removed. Default 0.8.

- **--N\_count** N\_COUNT

  In aligned markers, if the percentage of nucleotide columns containing more than N\_count Ns less than N\_col threshold, these columns will be removed. Default 0.

- **--long\_gap\_length** LONG\_GAP\_LENGTH

  In each concatenated sequence of a sample, sequential gap positions is a gap group. A gap group with length greater than this threshold is considered as a long gap group. If the ratio between the number of unique positions in all long gap groups and the concatenated sequence length is less than long\_gap\_percentage, these positions will be removed from all concatenated sequences. Default 2.

- **--long\_gap\_percentage** LONG\_GAP\_PERCENTAGE

  Combining this threshold with long\_gap\_length to removed long gaps. Default 0.8.

- **--p\_value** P\_VALUE

  The p\_value to reject a non-polymorphic site.Default 0.05.

- **--clades** CLADES \[CLADES ...\]

  The clades (space separated) for which the script will compute the marker alignments in fasta format and the phylogenetic trees. If a file name is specified, the clade list in that file where each clade name is on a line will be read.Default "automatically identify all clades".

- **--marker\_list\_fn** MARKER\_LIST\_FN

  The file name containing the list of considered markers. The other markers will be discarded. Default "None".

- **--print\_clades\_only**

  Only print the potential clades and stop without building any tree. This option is useful when you want to check quickly all possible clades and rerun only for some specific ones. Default "False".

- **--alignment\_program** {muscle,mafft}

  The alignment program. Default "muscle".

- **--relaxed\_parameters**

  Set marker\_in\_clade=0.5, sample\_in\_marker=0.5, N\_in\_marker=0.5, gap\_in\_sample=0.5. Default "False".

- **--relaxed\_parameters2**

  Set marker\_in\_clade=0.2, sample\_in\_marker=0.2, N\_in\_marker=0.8, gap\_in\_sample=0.8. Default "False".

- **--keep\_alignment\_files**

  Keep the alignment files of all markers before cleaning step.

- **--keep\_full\_alignment\_files**

  Keep the alignment files of all markers before truncating the starting and ending parts, and cleaning step. This is equivalent to **--keep\_alignment\_files** **--marker\_strip\_length** 0

- **--save\_sample2fullfreq**

  Save sample2fullfreq to a msgpack file sample2fullfreq.msgpack.

- **--use\_threads**

  Use multithreading. Default "Use multiprocessing".

## AUTHOR

This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
