Skip to main content

MetaCoAG: Binning Metagenomic Contigs via Composition, Coverage and Assembly Graphs

Project description

MetaCoAG logo

MetaCoAG: Binning Metagenomic Contigs via Composition, Coverage and Assembly Graphs

DOI DOI install with bioconda Conda Conda PyPI version Downloads CI Coverage Status GitHub Code style: black CodeQL Documentation Status

MetaCoAG is a metagenomic contig binning tool that makes use of the connectivity information found in assembly graphs, apart from the composition and coverage information. MetaCoAG makes use of single-copy marker genes along with a graph matching technique and a label propagation technique to bin contigs. MetaCoAG is tested on contigs obtained from next-generation sequencing (NGS) data. Currently, MetaCoAG supports contigs assembled using metaSPAdes and MEGAHIT, and recently we have added support for Flye assemblies (has not been tested extensively).

For detailed instructions on installation, usage and visualisation, please refer to the documentation hosted at Read the Docs.

NEW: MetaCoAG is now available on bioconda at https://anaconda.org/bioconda/metacoag and on PyPI at https://pypi.org/project/metacoag/.

Dependencies

MetaCoAG installation requires Python 3.7 or above. You will need the following python dependencies to run MetaCoAG and related support scripts. The latest tested versions of the dependencies are listed as well.

MetaCoAG uses the following tools to scan for single-copy marker genes. These tools have been tested on the following versions.

Installing MetaCoAG using conda

We recommend that you use conda to run MetaCoAG.

You can install MetaCoAG from bioconda.

# add channels
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

# create conda environment and install metacoag
conda create -n metacoag -c bioconda metacoag

# activate metacoag environment
conda activate metacoag

# check metacoag installation
metacoag -h

Setting up MetaCoAG for development

Downloading MetaCoAG

You can clone the MetaCoAG repository to your machine.

git clone https://github.com/Vini2/MetaCoAG.git

Now go into the MetaCoAG folder using the command

cd MetaCoAG/

Using conda

Once you have installed conda, make sure you are in the MetaCoAG folder. Now run the following commands to create a conda environment and activate it to run MetaCoAG.

conda env create -f environment.yml
conda activate metacoag

Using pip

You can run the following command to install MetaCoAG using pip. Make sure you are in the MetaCoAG folder.

pip install .

Using flit

You can run the following command to install MetaCoAG using flit. Make sure you are in the MetaCoAG folder.

flit install

Note: If you use pip or flit to setup MetaCoAG for development, you will have to install FragGeneScan and HMMER manually and add them to your system path.

Test the setup

After setting up, run the following command to ensure that metacoag is working.

metacoag --help

Example Usage

metacoag --assembler spades --graph /path/to/graph_file.gfa --contigs /path/to/contigs.fasta --paths /path/to/paths_file.paths --abundance /path/to/abundance.tsv --output /path/to/output_folder
metacoag --assembler megahit --graph /path/to/graph_file.gfa --contigs /path/to/contigs.fasta --abundance /path/to/abundance.tsv --output /path/to/output_folder
metacoag --assembler flye --graph /path/to/assembly_graph.gfa --contigs /path/to/assembly.fasta --paths /path/to/assembly_info.txt --abundance /path/to/abundance.tsv --output /path/to/output_folder

Citation

MetaCoAG has been accepted at RECOMB 2022 and is published in Lecture Notes in Computer Science at https://doi.org/10.1007/978-3-031-04749-7_5.

Mallawaarachchi, V., Lin, Y. (2022). MetaCoAG: Binning Metagenomic Contigs via Composition, Coverage and Assembly Graphs. In: Pe'er, I. (eds) Research in Computational Molecular Biology. RECOMB 2022. Lecture Notes in Computer Science(), vol 13278. Springer, Cham. DOI: https://doi.org/10.1007/978-3-031-04749-7_5

A journal extension of MetaCoAG is published in the Journal of Computational Biology at https://www.liebertpub.com/doi/10.1089/cmb.2022.0262.

Vijini Mallawaarachchi and Yu Lin. Accurate Binning of Metagenomic Contigs Using Composition, Coverage, and Assembly Graphs. Journal of Computational Biology 2022 29:12, 1357-1376. DOI: https://doi.org/10.1089/cmb.2022.0262

If you use MetaCoAG in your work, please cite the following publications.

@InProceedings{10.1007/978-3-031-04749-7_5,
  author="Mallawaarachchi, Vijini and Lin, Yu",
  editor="Pe'er, Itsik",
  title="MetaCoAG: Binning Metagenomic Contigs via Composition, Coverage and Assembly Graphs",
  booktitle="Research in Computational Molecular Biology",
  year="2022",
  publisher="Springer International Publishing",
  address="Cham",
  pages="70--85",
  abstract="Metagenomics has allowed us to obtain various genetic material from different species and gain valuable insights into microbial communities. Binning plays an important role in the early stages of metagenomic analysis pipelines. A typical pipeline in metagenomics binning is to assemble short reads into longer contigs and then bin into groups representing different species in the metagenomic sample. While existing binning tools bin metagenomic contigs, they do not make use of the assembly graphs that produce such assemblies. Here we propose MetaCoAG, a tool that utilizes assembly graphs with the composition and coverage information to bin metagenomic contigs. MetaCoAG uses single-copy marker genes to estimate the number of initial bins, assigns contigs into bins iteratively and adjusts the number of bins dynamically throughout the binning process. Experimental results on simulated and real datasets demonstrate that MetaCoAG significantly outperforms state-of-the-art binning tools, producing similar or more high-quality bins than the second-best tool. To the best of our knowledge, MetaCoAG is the first stand-alone contig-binning tool to make direct use of the assembly graph information.",
  isbn="978-3-031-04749-7"
}

@Article{doi:10.1089/cmb.2022.0262,
author = {Mallawaarachchi, Vijini and Lin, Yu},
title = {Accurate Binning of Metagenomic Contigs Using Composition, Coverage, and Assembly Graphs},
journal = {Journal of Computational Biology},
volume = {29},
number = {12},
pages = {1357--1376},
year = {2022},
doi = {10.1089/cmb.2022.0262},
note ={PMID: 36367700},
URL = {https://doi.org/10.1089/cmb.2022.0262},
eprint = {https://doi.org/10.1089/cmb.2022.0262},
abstract = { Metagenomics enables the recovery of various genetic materials from different species, thus providing valuable insights into microbial communities. Metagenomic binning group sequences belong to different organisms, which is an important step in the early stages of metagenomic analysis pipelines. The classic pipeline followed in metagenomic binning is to assemble short reads into longer contigs and then bin these resulting contigs into groups representing different taxonomic groups in the metagenomic sample. Most of the currently available binning tools are designed to bin metagenomic contigs, but they do not make use of the assembly graphs that produce such assemblies. In this study, we propose MetaCoAG, a metagenomic binning tool that uses assembly graphs with the composition and coverage information of contigs. MetaCoAG estimates the number of initial bins using single-copy marker genes, assigns contigs into bins iteratively, and adjusts the number of bins dynamically throughout the binning process. We show that MetaCoAG significantly outperforms state-of-the-art binning tools by producing similar or more high-quality bins than the second-best binning tool on both simulated and real datasets. To the best of our knowledge, MetaCoAG is the first stand-alone contig-binning tool that directly makes use of the assembly graph information along with other features of the contigs. }
}

Funding

MetaCoAG is funded by an Essential Open Source Software for Science Grant from the Chan Zuckerberg Initiative.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metacoag-1.2.2.tar.gz (4.0 MB view details)

Uploaded Source

Built Distribution

metacoag-1.2.2-py3-none-any.whl (2.9 MB view details)

Uploaded Python 3

File details

Details for the file metacoag-1.2.2.tar.gz.

File metadata

  • Download URL: metacoag-1.2.2.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for metacoag-1.2.2.tar.gz
Algorithm Hash digest
SHA256 b6a7cf9c303e7a01f57ec57bc5a76c306903b5a105bc39492b9d378d5c41adda
MD5 9ba49ec6c2b102465da20893644c49a9
BLAKE2b-256 cc0e4965e010d1aebd2192e3776e48a024d537bf8f7cf2b7021b1b99d4b14fee

See more details on using hashes here.

File details

Details for the file metacoag-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: metacoag-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for metacoag-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 22c5a1ec7aa2829242908bee8134a0b647c989472d2318c6cd2c903b42d95737
MD5 8460afae1c787511b1859fd93decf286
BLAKE2b-256 f5404a6da0a182461b4c5ade6f3d0c50269c6239a242b454cdbd3871063de435

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page