{"id":28628034,"url":"https://github.com/franciscozorrilla/metagem","last_synced_at":"2025-06-25T08:06:41.834Z","repository":{"id":41176566,"uuid":"137376259","full_name":"franciscozorrilla/metaGEM","owner":"franciscozorrilla","description":":gem: An easy-to-use workflow for generating context specific genome-scale metabolic models and predicting metabolic interactions within microbial communities directly from metagenomic data","archived":false,"fork":false,"pushed_at":"2024-07-27T16:02:11.000Z","size":275136,"stargazers_count":240,"open_issues_count":13,"forks_count":46,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-12T10:11:25.845Z","etag":null,"topics":["bioinformatics","computational-biology","flux-balance-analysis","genome-scale-metabolic-model","gut-microbiome","mags","metabolic-modeling","metabolic-models","metabolism","metagenome-assembled-genomes","metagenomics","microbial-ecology","microbiome","snakemake","systems-biology"],"latest_commit_sha":null,"homepage":"https://franciscozorrilla.github.io/metaGEM/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/franciscozorrilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-14T15:26:05.000Z","updated_at":"2025-06-10T06:46:30.000Z","dependencies_parsed_at":"2023-02-15T11:01:32.858Z","dependency_job_id":"e4ccf3b7-db1a-453f-a383-cb6133d4ba85","html_url":"https://github.com/franciscozorrilla/metaGEM","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/franciscozorrilla/metaGEM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscozorrilla%2FmetaGEM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscozorrilla%2FmetaGEM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscozorrilla%2FmetaGEM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscozorrilla%2FmetaGEM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franciscozorrilla","download_url":"https://codeload.github.com/franciscozorrilla/metaGEM/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscozorrilla%2FmetaGEM/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261832677,"owners_count":23216497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","computational-biology","flux-balance-analysis","genome-scale-metabolic-model","gut-microbiome","mags","metabolic-modeling","metabolic-models","metabolism","metagenome-assembled-genomes","metagenomics","microbial-ecology","microbiome","snakemake","systems-biology"],"created_at":"2025-06-12T10:11:02.712Z","updated_at":"2025-06-25T08:06:41.815Z","avatar_url":"https://github.com/franciscozorrilla.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💎 `metaGEM`\n\u003e **Note** \n\u003e An easy-to-use workflow for generating context specific genome-scale metabolic models and predicting metabolic interactions within microbial communities directly from metagenomic data.\n\n[![Nucleic Acids Research](https://img.shields.io/badge/Nucleic%20Acids%20Research-10.1093%2Fnar%2Fgkab815-critical)](https://academic.oup.com/nar/advance-article/doi/10.1093/nar/gkab815/6382386)\n[![bioRxiv](https://img.shields.io/badge/bioRxiv-10.1101%2F2020.12.31.424982%20-B31B1B)](https://www.biorxiv.org/content/10.1101/2020.12.31.424982v2.full)\n[![Build Status](https://app.travis-ci.com/franciscozorrilla/metaGEM.svg?branch=master)](https://app.travis-ci.com/github/franciscozorrilla/metaGEM)\n[![GitHub license](https://img.shields.io/github/license/franciscozorrilla/metaGEM)](https://github.com/franciscozorrilla/metaGEM/blob/master/LICENSE)\n[![Snakemake](https://img.shields.io/badge/Snakemake-\u003e=5.10.0,\u003c5.31.1-green)](https://snakemake.readthedocs.io/en/stable/project_info/history.html#id407)\n[![Anaconda-Server Badge](https://anaconda.org/bioconda/metagem/badges/downloads.svg)](https://anaconda.org/bioconda/metagem)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/metaGEM/community)\n[![DOI](https://img.shields.io/badge/Zenodo-10.5281%2F4707723-blue)](https://zenodo.org/badge/latestdoi/137376259)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1I1S8AoGuJ9Oc2292vqAGTDmZcbnolbuj#scrollTo=awiAaVwSF5Fz)\n[![Anaconda-Server Badge](https://anaconda.org/bioconda/metagem/badges/version.svg)](https://anaconda.org/bioconda/metagem)\n[![Anaconda-Server Badge](https://anaconda.org/bioconda/metagem/badges/latest_release_date.svg)](https://anaconda.org/bioconda/metagem)\n\n![metawrapfigs_final4 001](https://user-images.githubusercontent.com/35606471/116543667-0d0f8f00-a8e6-11eb-835c-bc1fe935f43e.png)\n\n`metaGEM` is a Snakemake workflow that integrates an array of existing bioinformatics and metabolic modeling tools, for the purpose of predicting metabolic interactions within bacterial communities of microbiomes. From whole metagenome shotgun datasets, metagenome assembled genomes (MAGs) are reconstructed, which are then converted into genome-scale metabolic models (GEMs) for *in silico* simulations. Additional outputs include abundance estimates, taxonomic assignment, growth rate estimation, pangenome analysis, and eukaryotic MAG identification.\n\n## ⚙️ Installation\n\nYou can start using `metaGEM` on your cluster with just one line of code with the [mamba package manager](https://github.com/mamba-org/mamba)\n\n```\nmamba create -n metagem -c bioconda metagem\n```\n\nThis will create an environment called `metagem` and start installing dependencies. Please consult the `config/README.md` page for more detailed setup instructions.\n\n[![installation](https://img.shields.io/badge/metaGEM-config-%2331a354)](https://github.com/franciscozorrilla/metaGEM/tree/master/config)\n\n## 🔧 Usage\n\nClone this repo\n\n```\ngit clone https://github.com/franciscozorrilla/metaGEM.git \u0026\u0026 cd metaGEM/workflow\n```\n\nRun `metaGEM` without any arguments to see usage instructions:\n\n```\nbash metaGEM.sh\n```\n```\nUsage: bash metaGEM.sh [-t|--task TASK] \n                       [-j|--nJobs NUMBER OF JOBS] \n                       [-c|--cores NUMBER OF CORES] \n                       [-m|--mem GB RAM] \n                       [-h|--hours MAX RUNTIME]\n                       [-l|--local]\n                       \n Options:\n  -t, --task        Specify task to complete:\n\n                        SETUP\n                            createFolders\n                            downloadToy\n                            organizeData\n                            check\n\n                        CORE WORKFLOW\n                            fastp \n                            megahit \n                            crossMapSeries\n                            kallistoIndex\n                            crossMapParallel\n                            kallisto2concoct \n                            concoct \n                            metabat\n                            maxbin \n                            binRefine \n                            binReassemble \n                            extractProteinBins\n                            carveme\n                            memote\n                            organizeGEMs\n                            smetana\n                            extractDnaBins\n                            gtdbtk\n                            abundance\n\n                        BONUS\n                            grid\n                            prokka\n                            roary\n                            eukrep\n                            eukcc\n\n                        VISUALIZATION (in development)\n                            stats\n                            qfilterVis\n                            assemblyVis\n                            binningVis\n                            taxonomyVis\n                            modelVis\n                            interactionVis\n                            growthVis\n\n  -j, --nJobs       Specify number of jobs to run in parallel\n  -c, --nCores      Specify number of cores per job\n  -m, --mem         Specify memory in GB required for job\n  -h, --hours       Specify number of hours to allocated to job runtime\n  -l, --local       Run jobs on local machine for non-cluster usage\n```\n\n## 🧉 Try it now\n\nYou can set up and use `metaGEM` on the cloud by following along the google colab notebook. \n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1I1S8AoGuJ9Oc2292vqAGTDmZcbnolbuj#scrollTo=awiAaVwSF5Fz)\n\nPlease note that google colab does not provide the computational resources necessary to fully run `metaGEM` on a real dataset. This notebook demonstrates how to set up and use `metaGEM` by perfoming the first steps in the workflow on a toy dataset.\n\n## 💩 Tutorials\n\n`metaGEM` can be used to explore your own gut microbiome sequencing data from at-home-test-kit services such as [unseen bio](https://unseenbio.com/). The following tutorial showcases the `metaGEM` workflow on two unseenbio samples.\n\n[![Tutorial](https://img.shields.io/badge/metaGEM-Tutorial-%23d8b365)](https://github.com/franciscozorrilla/unseenbio_metaGEM)\n\nFor an introductory metabolic modeling tutorial, refer to the resources compiled for the [EMBOMicroCom: Metabolite and species dynamics in microbial communities](https://www.embl.org/about/info/course-and-conference-office/events/mcd22-01/) workshop in 2022.\n\n[![Tutorial3](https://img.shields.io/badge/MicroCom-Tutorial-green)](https://github.com/franciscozorrilla/EMBOMicroCom)\n\nFor a more advanced tutorial, check out the resources we put together for the [SymbNET: from metagenomics to metabolic interactions](https://www.ebi.ac.uk/training/events/symbnet-2022/) course in 2022.\n\n[![Tutorial2](https://img.shields.io/badge/SymbNET-Tutorial-red)](https://github.com/franciscozorrilla/SymbNET)\n\n## 🏛️ Wiki\n\nRefer to the wiki for additional usage tips, frequently asked questions, and implementation details.\n\n[![wiki](https://img.shields.io/badge/metaGEM-Wiki-blue)](https://github.com/franciscozorrilla/metaGEM/wiki)\n\n## 📦 Datasets\n\n* You can access the metaGEM-generated results for the publication [here](https://github.com/franciscozorrilla/metaGEM_paper).\n```\n    🧪 Small communities of gut microbes from lab cultures\n    💩 Real gut microbiome samples from Swedish diabetes paper\n    🪴 Plant-associated soil samples from Chinese rhizobiome study\n    🌏 Bulk-soil samples from Australian biodiversity analysis\n    🌊 Ocean water samples from global TARA Oceans expeditions\n```\n* Additionally, you can access metaGEM-generated results from a reanalysis of recently published ancient metagenomes [here](https://zenodo.org/record/7414438#.Y5HSFYLP3bs).\n\n## 🐍 Workflow\n\n### Core\n\n1. Quality filter reads with [fastp](https://github.com/OpenGene/fastp)\n2. Assembly with [megahit](https://github.com/voutcn/megahit)\n3. Draft bin sets with [CONCOCT](https://github.com/BinPro/CONCOCT), [MaxBin2](https://sourceforge.net/projects/maxbin2/), and [MetaBAT2](https://sourceforge.net/projects/maxbin2/)\n4. Refine \u0026 reassemble bins with [metaWRAP](https://github.com/bxlab/metaWRAP)\n5. Taxonomic assignment with [GTDB-tk](https://github.com/Ecogenomics/GTDBTk)\n6. Relative abundances with [bwa](https://github.com/lh3/bwa) and [samtools](https://github.com/samtools/samtools)\n7. Reconstruct \u0026 evaluate genome-scale metabolic models with [CarveMe](https://github.com/cdanielmachado/carveme) and [memote](https://github.com/opencobra/memote)\n8. Species metabolic coupling analysis with [SMETANA](https://github.com/cdanielmachado/smetana)\n\n### Bonus\n\n9. Growth rate estimation with [GRiD](https://github.com/ohlab/GRiD), [SMEG](https://github.com/ohlab/SMEG) or [CoPTR](https://github.com/tyjo/coptr)\n10. Pangenome analysis with [roary](https://github.com/sanger-pathogens/Roary)\n11. Eukaryotic draft bins with [EukRep](https://github.com/patrickwest/EukRep) and [EukCC](https://github.com/Finn-Lab/EukCC)\n\n## 🏗️ Active Development\n\nIf you want to see any new additional or alternative tools incorporated into the `metaGEM` workflow please raise an issue or create a pull request. Snakemake allows workflows to be very flexible, so adding new rules is as easy as filling out the following template and adding it to the Snakefile:\n\n```\nrule package-name:\n    input:\n        rules.rulename.output\n    output:\n        f'{config[\"path\"][\"root\"]}/{config[\"folder\"][\"X\"]}/{{IDs}}/output.file'\n    message:\n        \"\"\"\n        Helpful and descriptive message detailing goal of this rule/package.\n        \"\"\"\n    shell:\n        \"\"\"\n        # Well documented command line instructions go here\n        \n        # Load conda environment \n        set +u;source activate {config[envs][package]};set -u;\n\n        # Run tool\n        package-name -i {input} -o {output}\n        \"\"\"\n```\n\n## 🖇️ Publications\n\nThe `metaGEM` workflow has been used in multiple studies, including the following non-exhaustive list:\n\n```\nPlastic-degrading potential across the global microbiome correlates with recent pollution trends\nJ Zrimec, M Kokina, S Jonasson, F Zorrilla, A Zelezniak\nMBio, 2021\n```\n\n```\nCompetition-cooperation in the chemoautotrophic ecosystem of Movile Cave: first metagenomic approach on sediments\nChiciudean, I., Russo, G., Bogdan, D.F. et al. \nEnvironmental Microbiome, 2022\n```\n\n```\nThe National Ecological Observatory Network’s soil metagenomes: assembly and basic analysis\nWerbin ZR, Hackos B, Lopez-Nava J et al. \nF1000Research, 2022\n```\n\n```\nMicrobial interactions shape cheese flavour formation\nMelkonian, C., Zorrilla, F., Kjærbølling, I. et al.\nNature Communications, 2023\n```\n\n## 🍾 Please cite\n\n```\nmetaGEM: reconstruction of genome scale metabolic models directly from metagenomes\nFrancisco Zorrilla, Filip Buric, Kiran R Patil, Aleksej Zelezniak\nNucleic Acids Research, 2021; gkab815, https://doi.org/10.1093/nar/gkab815\n``` \n\n[![Nucleic Acids Research](https://img.shields.io/badge/Nucleic%20Acids%20Research-10.1093%2Fnar%2Fgkab815-critical)](https://academic.oup.com/nar/advance-article/doi/10.1093/nar/gkab815/6382386)\n\n## ⭐ Star History\n\n\u003ca href=\"https://star-history.com/#franciscozorrilla/metaGEM\u0026Date\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=franciscozorrilla/metaGEM\u0026type=Date\u0026theme=dark\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=franciscozorrilla/metaGEM\u0026type=Date\" /\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=franciscozorrilla/metaGEM\u0026type=Date\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n## 📲 Contact\n\nPlease reach out with any comments, concerns, or discussions regarding `metaGEM`.\n\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/metaGEM/community)\n[![Twitter](https://img.shields.io/badge/Twitter-%40metagenomez-lightblue)](https://twitter.com/metagenomez)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-fzorrilla94-blue)](https://www.linkedin.com/in/fzorrilla94/)\n[![email](https://img.shields.io/badge/email-fz274%40cam.ac.uk-%23a6bddb)](fz274@cam.ac.uk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranciscozorrilla%2Fmetagem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranciscozorrilla%2Fmetagem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranciscozorrilla%2Fmetagem/lists"}