Sign inSign up

sphong/metaphlan

By sphong

•Updated over 2 years ago

Image
0

174

sphong/metaphlan repository overview

⁠docker-metaphlan

Docker image for MetaPhlAn

⁠Introduction

⁠Quick Start

⁠Download the MetaPhlAn database

The database required to execute MetaPhlAn is not included in the image. You need to download the database before using MetaPhlAn analysis commands. You can download the database onto your local storage and mount it with -v option.

You need to download the database only once.

Step 1. Pull the image

docker pull sphong/metaphlan

Step 2. Download the database

  • Edit download_databash.sh file.
  • Download the database by executing the script.
./download_database.sh
⁠Execute analysis
⁠Interactive analysis

Step 1. Run a Docker container

  • Mount directories
    • MetaPhlAn database (<your_local_directory>)
    • Working directory with input files (<your_local_directory>)
$ docker run -it --rm -v <your_local_directory>:/database -v <your_analysis_directory>:/data sphong/metaphlan /bin/bash

Step 2. Execute metaphlan commands

  • ⚠ Use --bowtie2db /database argument to set up the MetaPhlAn database.
  • ⚠ The working directory will be mounted to /data, designated as the Docker container's working directory.
⁠Script based analysis

MetaPhaAn can be executed as a command line script. Refer to the following example.

docker run -it --rm \
    -v "/data/database/MetaPhlAn/vJun23:/database" \
    -v "$PWD:/data" \
    -e USER_ID=$(id -u)\
    -e GROUP_ID=$(id -g)\
    sphong/metaphlan /bin/bash -c "metaphlan input/SRS014476-Supragingival_plaque.fasta.gz --input_type fasta --bowtie2db /database > profile.txt"
  • In the above example the script was written as a string as the special character for redirection > cannot be sent as an input argument, and /bin/bash -c command was used to execute the script in the container.
  • Further, the example shows how to specify a user, ensuring the generated files are owned by the user instead of root, which facilitate easier file processing.
  • USER_ID and GROUP_ID were delivered as environmental argument. (cf. Do not attempt to use --user)

⁠Prerequisite

  • docker
  • Over 15Gb memory
  • Over 7Gb of space (size of the image)

⁠License

  • MIT License

⁠Maintainers

  • Seungpyo Hong at Jeonbuk National University

⁠Acknowledgements

  • MetaPhlAn

Tag summary

Content type

Image

Digest

sha256:5d72ce8f4…

Size

2.7 GB

Last updated

over 2 years ago

docker pull sphong/metaphlan