Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/metagentools/MetaCoAG in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
Vini2 committed Aug 24, 2023
2 parents 7be8a9d + 483cdd2 commit 7301c70
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
File renamed without changes.
45 changes: 45 additions & 0 deletions .github/workflows/testing_python_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI conda

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]


jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -el {0}

strategy:
matrix:
os: [macos-12, ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: "actions/checkout@v3"
with:
fetch-depth: 0

# Setup conda env
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: metacoag
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: "Setup graphbin on ${{ matrix.os }} for Python ${{ matrix.python-version }}"
run: |
python -m pip install --upgrade pip
pip install .
- name: "Generate coverage report on ${{ matrix.os }} for Python ${{ matrix.python-version }}"
run: |
pip install pytest pytest-cov
pytest --cov=graphbin --cov-report=xml --cov-append
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![PyPI version](https://badge.fury.io/py/metacoag.svg)](https://badge.fury.io/py/metacoag)
[![Anaconda-Server Badge](https://anaconda.org/bioconda/metacoag/badges/downloads.svg)](https://anaconda.org/bioconda/metacoag)

[![CI](https://github.com/metagentools/MetaCoAG/actions/workflows/testing.yml/badge.svg)](https://github.com/metagentools/MetaCoAG/actions/workflows/testing.yml)
[![CI](https://github.com/metagentools/MetaCoAG/actions/workflows/testing_python.yml/badge.svg)](https://github.com/metagentools/MetaCoAG/actions/workflows/testing_python.yml)
![GitHub](https://img.shields.io/github/license/Vini2/MetaCoAG)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![CodeQL](https://github.com/metagentools/MetaCoAG/actions/workflows/codeql.yml/badge.svg)](https://github.com/metagentools/MetaCoAG/actions/workflows/codeql.yml)
Expand Down
1 change: 1 addition & 0 deletions docs/citation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ 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. }
}
```
12 changes: 11 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,14 @@ metacoag --assembler megahit --graph /path/to/graph_file.gfa --contigs /path/to/

```
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
```
```

# Output

The output of MetaCoAG will contain the following main files and folders.

* `contig_to_bin.tsv` containing the comma separated records of `contig id, bin number`
* `bins` containing the identified bins (FASTA file for each bin)
* `low_quality_bins` containing the identified low-quality bins, i.e., having a fraction of marker genes lower than `bin_mg_threshold` (FASTA file for each bin)
* `*.frag.faa`, `*.frag.ffn` and `*.frag.gff` files containing FragGeneScan output
* `*.hmmout` containing HMMER output

0 comments on commit 7301c70

Please sign in to comment.