.TH METAPHLAN2 "1" "July 2016" "metaphlan2 2.5.0" "User Commands" .SH NAME metaphlan2 \- METAgenomic PHyLogenetic ANalysis for metagenomic taxonomic profiling .SH SYNOPSIS .B metaphlan2 \fB\-\-input_type\fR {fastq,fasta,multifasta,multifastq,bowtie2out,sam} [\-\-mpa_pkl MPA_PKL] [\-\-bowtie2db METAPHLAN_BOWTIE2_DB] [\-\-bt2_ps BowTie2 presets] [\-\-bowtie2_exe BOWTIE2_EXE] [\-\-bowtie2out FILE_NAME] [\-\-no_map] [\-\-tmp_dir] [\-\-tax_lev TAXONOMIC_LEVEL] [\-\-min_cu_len] [\-\-min_alignment_len] [\-\-ignore_viruses] [\-\-ignore_eukaryotes] [\-\-ignore_bacteria] [\-\-ignore_archaea] [\-\-stat_q] [\-\-ignore_markers IGNORE_MARKERS] [\-\-avoid_disqm] [\-\-stat] [\-t ANALYSIS TYPE] [\-\-nreads NUMBER_OF_READS] [\-\-pres_th PRESENCE_THRESHOLD] [\-\-clade] [\-\-min_ab] [\-h] [\-o output file] [\-\-sample_id_key name] [\-\-sample_id value] [\-s sam_output_file] [\-\-biom biom_output] [\-\-mdelim mdelim] [\-\-nproc N] [\-v] [INPUT_FILE] [OUTPUT_FILE] .SH DESCRIPTION .SS MetaPhlAn 2 clade\-abundance estimation .PP The basic usage of MetaPhlAn 2 consists in the identification of the clades (from phyla to species and strains in particular cases) present in the metagenome obtained from a microbiome sample and their relative abundance. This correspond to the default analysis type (\fB\-\-analysis_type\fR rel_ab). .IP * Profiling a metagenome from raw reads: .IP metaphlan2 metagenome.fastq \fB\-\-input_type\fR fastq .IP * You can take advantage of multiple CPUs and save the intermediate BowTie2 output for re\-running .IP MetaPhlAn extremely quickly: .br metaphlan2 metagenome.fastq \fB\-\-bowtie2out\fR metagenome.bowtie2.bz2 \fB\-\-nproc\fR 5 \fB\-\-input_type\fR fastq .IP * If you already mapped your metagenome against the marker DB (using a previous MetaPhlAn run), you can obtain the results in few seconds by using the previously saved \fB\-\-bowtie2out\fR file and specifying the input (\fB\-\-input_type\fR bowtie2out): .IP metaphlan2 metagenome.bowtie2.bz2 \fB\-\-nproc\fR 5 \fB\-\-input_type\fR bowtie2out .IP * You can also provide an externally BowTie2\-mapped SAM if you specify this format with \fB\-\-input_type\fR. Two steps: first apply BowTie2 and then feed MetaPhlAn2 with the obtained sam: .IP bowtie2 \fB\-\-sam\-no\-hd\fR \fB\-\-sam\-no\-sq\fR \fB\-\-no\-unal\fR \fB\-\-very\-sensitive\fR \fB\-S\fR metagenome.sam \fB\-x\fR /usr/share/metaphlan2/db_v20/mpa_v20_m200 \fB\-U\fR metagenome.fastq metaphlan2 metagenome.sam \fB\-\-input_type\fR sam > profiled_metagenome.txt .IP * Multiple alternative ways to pass the input are also available: .IP cat metagenome.fastq | metaphlan2 \fB\-\-input_type\fR fastq .br tar xjf metagenome.tar.bz2 \fB\-\-to\-stdout\fR | metaphlan2 \fB\-\-input_type\fR fastq .br metaphlan2 \fB\-\-input_type\fR fastq < metagenome.fastq .br metaphlan2 \fB\-\-input_type\fR fastq <(bzcat metagenome.fastq.bz2) .br metaphlan2 \fB\-\-input_type\fR fastq <(zcat metagenome_1.fastq.gz metagenome_2.fastq.gz) .IP * We can also natively handle paired\-end metagenomes, and, more generally, metagenomes stored in multiple files (but you need to specify the \fB\-\-bowtie2out\fR parameter): .IP metaphlan2 metagenome_1.fastq,metagenome_2.fastq \fB\-\-bowtie2out\fR metagenome.bowtie2.bz2 \fB\-\-nproc\fR 5 \fB\-\-input_type\fR fastq .SS MetaPhlAn 2 strain tracking .PP MetaPhlAn 2 introduces the capability of charachterizing organisms at the strain level using non aggregated marker information. Such capability comes with several slightly different flavours and are a way to perform strain tracking and comparison across multiple samples. Usually, MetaPhlAn 2 is first ran with the default \fB\-\-analysis_type\fR to profile the species present in the community, and then a strain\-level profiling can be performed to zoom\-in into specific species of interest. This operation can be performed quickly as it exploits the \fB\-\-bowtie2out\fR intermediate file saved during the execution of the default analysis type. .IP * The following command will output the abundance of each marker with a RPK (reads per kil\-base) higher 0.0. (we are assuming that metagenome_outfmt.bz2 has been generated before as shown above). .IP metaphlan2 \fB\-t\fR marker_ab_table metagenome_outfmt.bz2 \fB\-\-input_type\fR bowtie2out > marker_abundance_table.txt .IP The obtained RPK can be optionally normalized by the total number of reads in the metagenome to guarantee fair comparisons of abundances across samples. The number of reads in the metagenome needs to be passed with the '\-\-nreads' argument .IP * The list of markers present in the sample can be obtained with '\-t marker_pres_table' .IP metaphlan2 \fB\-t\fR marker_pres_table metagenome_outfmt.bz2 \fB\-\-input_type\fR bowtie2out > marker_abundance_table.txt .IP The \fB\-\-pres_th\fR argument (default 1.0) set the minimum RPK value to consider a marker present .IP * The list '\-t clade_profiles' analysis type reports the same information of '\-t marker_ab_table' but the markers are reported on a clade\-by\-clade basis. .IP metaphlan2 \fB\-t\fR clade_profiles metagenome_outfmt.bz2 \fB\-\-input_type\fR bowtie2out > marker_abundance_table.txt .IP * Finally, to obtain all markers present for a specific clade and all its subclades, the \&'\-t clade_specific_strain_tracker' should be used. For example, the following command is reporting the presence/absence of the markers for the B. fragulis species and its strains the optional argument \fB\-\-min_ab\fR specifies the minimum clade abundance for reporting the markers .IP $ metaphlan2 \fB\-t\fR clade_specific_strain_tracker \fB\-\-clade\fR s__Bacteroides_fragilis metagenome_outfmt.bz2 \fB\-\-input_type\fR bowtie2out > marker_abundance_table.txt .PP .SH OPTIONS .SS positional arguments .TP INPUT_FILE the input file can be: .IP * a fastq file containing metagenomic reads .IP OR .IP * a BowTie2 produced SAM file. .IP OR .IP * an intermediary mapping file of the metagenome generated by a previous MetaPhlAn run .IP If the input file is missing, the script assumes that the input is provided using the standard input, or named pipes. IMPORTANT: the type of input needs to be specified with \fB\-\-input_type\fR .TP OUTPUT_FILE the tab\-separated output file of the predicted taxon relative abundances [stdout if not present] .SS Required arguments .TP \fB\-\-input_type\fR {fastq,fasta,multifasta,multifastq,bowtie2out,sam} set whether the input is the multifasta file of metagenomic reads or the SAM file of the mapping of the reads against the MetaPhlAn db. [default 'automatic', i.e. the script will try to guess the input format] .SS "Mapping arguments:" .TP \fB\-\-mpa_pkl\fR MPA_PKL the metadata pickled MetaPhlAn file .TP \fB\-\-bowtie2db\fR METAPHLAN_BOWTIE2_DB The BowTie2 database file of the MetaPhlAn database. Used if \fB\-\-input_type\fR is fastq, fasta, multifasta, or multifastq .TP \fB\-\-bt2_ps\fR BowTie2 presets presets options for BowTie2 (applied only when a multifasta file is provided) The choices enabled in MetaPhlAn are: .IP * sensitive .IP * very\-sensitive .IP * sensitive\-local .IP * very\-sensitive\-local .IP [default very\-sensitive] .TP \fB\-\-bowtie2_exe\fR BOWTIE2_EXE Full path and name of the BowTie2 executable. This option allows MetaPhlAn to reach the executable even when it is not in the system PATH or the system PATH is unreachable .TP \fB\-\-bowtie2out\fR FILE_NAME The file for saving the output of BowTie2 .TP \fB\-\-no_map\fR Avoid storing the \fB\-\-bowtie2out\fR map file .TP \fB\-\-tmp_dir\fR the folder used to store temporary files [default is the OS dependent tmp dir] .SS Post-mapping arguments .TP \fB\-\-tax_lev\fR TAXONOMIC_LEVEL The taxonomic level for the relative abundance output: .br \&'a' : all taxonomic levels .br \&'k' : kingdoms .br \&'p' : phyla only .br \&'c' : classes only .br \&'o' : orders only .br \&'f' : families only .br \&'g' : genera only .br \&'s' : species only .br [default 'a'] .TP \fB\-\-min_cu_len\fR minimum total nucleotide length for the markers in a clade for estimating the abundance without considering sub\-clade abundances [default 2000] .TP \fB\-\-min_alignment_len\fR The sam records for aligned reads with the longest subalignment length smaller than this threshold will be discarded. [default None] .TP \fB\-\-ignore_viruses\fR Do not profile viral organisms .TP \fB\-\-ignore_eukaryotes\fR Do not profile eukaryotic organisms .TP \fB\-\-ignore_bacteria\fR Do not profile bacterial organisms .TP \fB\-\-ignore_archaea\fR Do not profile archeal organisms .TP \fB\-\-stat_q\fR Quantile value for the robust average [default 0.1] .TP \fB\-\-ignore_markers\fR IGNORE_MARKERS File containing a list of markers to ignore. .TP \fB\-\-avoid_disqm\fR Deactivate the procedure of disambiguating the quasi\-markers based on the marker abundance pattern found in the sample. It is generally recommended too keep the disambiguation procedure in order to minimize false positives .TP \fB\-\-stat\fR EXPERIMENTAL! Statistical approach for converting marker abundances into clade abundances .br \&'avg_g' : clade global (i.e. normalizing all markers together) average .br \&'avg_l' : average of length\-normalized marker counts .br \&'tavg_g' : truncated clade global average at \fB\-\-stat_q\fR quantile .br \&'tavg_l' : trunated average of length\-normalized marker counts (at \fB\-\-stat_q\fR) .br \&'wavg_g' : winsorized clade global average (at \fB\-\-stat_q\fR) .br \&'wavg_l' : winsorized average of length\-normalized marker counts (at \fB\-\-stat_q\fR) .br \&'med' : median of length\-normalized marker counts .br [default tavg_g] .SS Additional analysis types and arguments .TP \fB\-t\fR ANALYSIS TYPE Type of analysis to perform: .IP * rel_ab: profiling a metagenomes in terms of relative abundances .IP * rel_ab_w_read_stats: profiling a metagenomes in terms of relative abundances and estimate the number of reads coming from each clade. .IP * reads_map: mapping from reads to clades (only reads hitting a marker) .IP * clade_profiles: normalized marker counts for clades with at least a non\-null marker .IP * marker_ab_table: normalized marker counts (only when > 0.0 and normalized by metagenome size if \fB\-\-nreads\fR is specified) .IP * marker_counts: non\-normalized marker counts [use with extreme caution] .IP * marker_pres_table: list of markers present in the sample (threshold at 1.0 if not differently specified with \fB\-\-pres_th\fR .IP [default 'rel_ab'] .TP \fB\-\-nreads\fR NUMBER_OF_READS The total number of reads in the original metagenome. It is used only when \fB\-t\fR marker_table is specified for normalizing the length\-normalized counts with the metagenome size as well. No normalization applied if \fB\-\-nreads\fR is not specified .TP \fB\-\-pres_th\fR PRESENCE_THRESHOLD Threshold for calling a marker present by the \fB\-t\fR marker_pres_table option .TP \fB\-\-clade\fR The clade for clade_specific_strain_tracker analysis .TP \fB\-\-min_ab\fR The minimum percentage abundace for the clade in the clade_specific_strain_tracker analysis .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS Output arguments .TP \fB\-o\fR output file, \fB\-\-output_file\fR output file The output file (if not specified as positional argument) .TP \fB\-\-sample_id_key\fR name Specify the sample ID key for this analysis. Defaults to '#SampleID'. .TP \fB\-\-sample_id\fR value Specify the sample ID for this analysis. Defaults to 'Metaphlan2_Analysis'. .TP \fB\-s\fR sam_output_file, \fB\-\-samout\fR sam_output_file The sam output file .TP \fB\-\-biom\fR biom_output, \fB\-\-biom_output_file\fR biom_output If requesting biom file output: The name of the output file in biom format .TP \fB\-\-mdelim\fR mdelim, \fB\-\-metadata_delimiter_char\fR mdelim Delimiter for bug metadata: \- defaults to pipe. e.g. the pipe in k__Bacteria|p__Proteobacteria .SS Other arguments .TP \fB\-\-nproc\fR N The number of CPUs to use for parallelizing the mapping [default 1, i.e. no parallelism] .TP \fB\-v\fR, \fB\-\-version\fR Prints the current MetaPhlAn version and exit .SH AUTHOR The code of MetaPhlAn was rwitten by Nicola Segata (nicola.segata@unitn.it), Duy Tin Truong (duytin.truong@unitn.it). .P This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.