Skip to content

Commit

Permalink
GIT: merge changes from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Aug 19, 2024
2 parents f247f76 + 032f2e8 commit 3387865
Show file tree
Hide file tree
Showing 43 changed files with 3,131 additions and 277 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 }}
5 changes: 5 additions & 0 deletions .github/workflows/testing_python_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ jobs:

strategy:
matrix:
<<<<<<< HEAD
os: [macos-12, ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]
=======
os: [macos-latest, ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
>>>>>>> develop

steps:
- uses: "actions/checkout@v3"
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/testing_python_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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-latest, 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@v3
with:
activate-environment: graphbin
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
Binary file added GraphBin_logo_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GraphBin_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions MANIFEST.in

This file was deleted.

16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<p align="center">
<img src="https://raw.githubusercontent.com/metagentools/GraphBin/master/GraphBin_logo.png" width="400" title="GraphBin logo" alt="GraphBin logo">
<img src="https://raw.githubusercontent.com/metagentools/GraphBin/develop/GraphBin_logo_light.png#gh-light-mode-only" width="400" title="GraphBin logo" alt="GraphBin logo">
<img src="https://raw.githubusercontent.com/metagentools/GraphBin/develop/GraphBin_logo_dark.png#gh-dark-mode-only" width="400" title="GraphBin logo" alt="GraphBin logo">
</p>

# GraphBin: Refined Binning of Metagenomic Contigs using Assembly Graphs

[![DOI](https://img.shields.io/badge/DOI-10.1093/bioinformatics/btaa180-informational)](https://doi.org/10.1093/bioinformatics/btaa180)
[![Anaconda-Server Badge](https://anaconda.org/bioconda/graphbin/badges/version.svg)](https://anaconda.org/bioconda/graphbin)
[![Anaconda-Server Badge](https://anaconda.org/bioconda/graphbin/badges/downloads.svg)](https://anaconda.org/bioconda/graphbin)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/graphbin/README.html)
[![Conda](https://img.shields.io/conda/v/bioconda/graphbin)](https://anaconda.org/bioconda/graphbin)
[![Conda](https://img.shields.io/conda/dn/bioconda/graphbin)](https://anaconda.org/bioconda/graphbin)
[![PyPI version](https://badge.fury.io/py/graphbin.svg)](https://badge.fury.io/py/graphbin)
[![Downloads](https://static.pepy.tech/badge/graphbin)](https://pepy.tech/project/graphbin)

[![CI](https://github.com/metagentools/GraphBin/actions/workflows/testing_python_app.yml/badge.svg)](https://github.com/metagentools/GraphBin/actions/workflows/testing_python_app.yml)
[![codecov](https://codecov.io/gh/metagentools/GraphBin/branch/develop/graph/badge.svg?token=0S310F6QXJ)](https://codecov.io/gh/metagentools/GraphBin)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
Expand All @@ -26,6 +27,7 @@ GraphBin installation requires python 3 to run. The following dependencies are r
* [python-igraph](https://igraph.org/python/)
* [cogent3](https://cogent3.org/)
* [cairocffi](https://pypi.org/project/cairocffi/)
* [click](https://click.palletsprojects.com/)

## Installing GraphBin

Expand Down Expand Up @@ -121,7 +123,7 @@ graphbin --assembler megahit --graph /path/to/graph_file.gfa --contigs /path/to/
## Citation
If you use GraphBin in your work, please cite GraphBin as,

Vijini Mallawaarachchi, Anuradha Wickramarachchi, Yu Lin. GraphBin: Refined binning of metagenomic contigs using assembly graphs. Bioinformatics, Volume 36, Issue 11, June 2020, Pages 3307–3313, DOI: [10.1093/bioinformatics/btaa180](http://dx.doi.org/10.1093/bioinformatics/btaa180)
> Vijini Mallawaarachchi, Anuradha Wickramarachchi, Yu Lin. GraphBin: Refined binning of metagenomic contigs using assembly graphs. Bioinformatics, Volume 36, Issue 11, June 2020, Pages 3307–3313, DOI: [https://doi.org/10.1093/bioinformatics/btaa180](https://doi.org/10.1093/bioinformatics/btaa180)
```bibtex
@article{10.1093/bioinformatics/btaa180,
Expand All @@ -143,8 +145,8 @@ Vijini Mallawaarachchi, Anuradha Wickramarachchi, Yu Lin. GraphBin: Refined binn

## Funding

GraphBin is funded by a [Essential Open Source Software for Science Grant](https://chanzuckerberg.com/eoss/proposals/cogent3-python-apis-for-iq-tree-and-graphbin-via-a-plug-in-architecture/) from the Chan Zuckerberg Initiative.
GraphBin is funded by an [Essential Open Source Software for Science Grant](https://chanzuckerberg.com/eoss/proposals/cogent3-python-apis-for-iq-tree-and-graphbin-via-a-plug-in-architecture/) from the Chan Zuckerberg Initiative.

<p align="left">
<img src="https://raw.githubusercontent.com/metagentools/GraphBin/master/images/czi-logo.png" width="300">
<img src="https://chanzuckerberg.com/wp-content/themes/czi/img/logo.svg" width="300">
</p>
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jinja2==3.0.3
jinja2==3.1.4
mkdocs>=1.3.1
babel>=2.9.0
click>=7.0
Expand Down
36 changes: 34 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Options:
For the SPAdes version, `graphbin` takes in 3 files as inputs (required).

* Assembly graph file (in `.gfa` format)
* Contigs file (in FASTA format)
* Paths of contigs (in `.paths` format)
* Contigs file (`contigs.fasta` file in FASTA format)
* Paths of contigs (`contigs.paths` file)
* Binning output from an existing tool (in `.csv` format)

For the SGA version, `graphbin` takes in 2 files as inputs (required).
Expand All @@ -57,6 +57,13 @@ For the MEGAHIT version, `graphbin` takes in 3 files as inputs (required).
* Contigs file (in FASTA format)
* Binning output from an existing tool (in `.csv` format)

For the Flye version, `graphbin` takes in 3 files as inputs (required).

* Assembly graph file (in `.gfa` format)
* Contigs file (`assembly.fasta` file in FASTA format)
* Paths of contigs (`assembly_info.txt` file)
* Binning output from an existing tool (in `.csv` format)

**Note:** Make sure that the initial binning result consists of contigs belonging to only one bin. GraphBin is designed to handle initial contigs which belong to only one bin. Multiple bins for the initial contigs are not supported.

**Note:** You can specify the delimiter for the initial binning result file and the final output file using the delimiter paramter. Enter the following values for different delimiters; `,` for a comma, `;` for a semicolon, `$'\t'` for a tab, `" "` for a space and `|` for a pipe.
Expand Down Expand Up @@ -90,19 +97,44 @@ k99_18709,bin_1
k99_15596,bin_2
...
```
Example Flye binned input
```
contig_1,bin_1
contig_2,bin_1
contig_3,bin_2
contig_4,bin_1
contig_5,bin_2
...
```

Make sure to follow the steps provided in the [preprocessing section](https://graphbin.readthedocs.io/en/latest/preprocess/) to prepare the initial binning result.

## Example Usage

```
# metaSPAdes assembly
graphbin --assembler spades --graph /path/to/graph_file.gfa --contigs /path/to/contigs.fasta --paths /path/to/paths_file.paths --binned /path/to/binning_result.csv --output /path/to/output_folder
```
```
# SGA assembly
graphbin --assembler sga --graph /path/to/graph_file.asqg --contigs /path/to/contigs.fa --binned /path/to/binning_result.csv --output /path/to/output_folder
```
```
# MEGAHIT assembly
graphbin --assembler megahit --graph /path/to/graph_file.gfa --contigs /path/to/contigs.fa --binned /path/to/binning_result.csv --output /path/to/output_folder
```
```
# metaFlye assembly
graphbin --assembler flye --graph /path/to/assembly_graph.gfa --contigs /path/to/assembly.fasta --paths /path/to/assembly_info.txt --binned /path/to/binning_result.csv --output /path/to/output_folder
```
```
# Canu assembly
graphbin --assembler canu --graph /path/to/assembly.contigs.gfa --contigs /path/to/assembly.contigs.fasta --binned /path/to/binning_result.csv --output /path/to/output_folder
```
```
# Miniasm assembly
graphbin --assembler miniasm --graph /path/to/reads.gfa --contigs /path/to/unitigs.fasta --binned /path/to/binning_result.csv --output /path/to/output_folder
```

## Output

Expand Down
12 changes: 7 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: graphbin
channels:
- bioconda
- defaults
- conda-forge
- anaconda
dependencies:
- python>=3.7.1
- flit
- cairocffi
- python-igraph
- click
- pip
- pip:
- cogent3
- cairocffi
- python-igraph>=0.7.1
- cogent3
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ build-backend = "flit_core.buildapi"
[project]
name = "graphbin"
authors = [
{ name = "Vijini Mallawaarachchi", email = "Vijini.Mallawaarachchi@anu.edu.au"},
{ name = "Anuradha Wickramarachchi", email = "Anuradha.Wickramarachchi@anu.edu.au"},
{ name = "Vijini Mallawaarachchi", email = "viji.mallawaarachchi@gmail.com"},
{ name = "Anuradha Wickramarachchi", email = "anuradhawick@gmail.com"},
{ name = "Yu Lin", email = "yu.lin@anu.edu.au"},
]
keywords = ["genomics", "bioinformatics"]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.7"
dependencies = ["python-igraph", "cogent3", "cairocffi"]
dependencies = ["igraph", "cogent3", "cairocffi", "click"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
Expand All @@ -32,7 +32,7 @@ Documentation = "https://graphbin.readthedocs.io/en/latest/"
"Source Code" = "https://github.com/metagentools/GraphBin/"

[project.scripts]
graphbin = "graphbin:main"
graphbin = "graphbin.cli:main"

[project.optional-dependencies]
test = [
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cogent3
python-igraph>=0.7.1
cairocffi
igraph>=0.7.1
cairocffi
click
Loading

0 comments on commit 3387865

Please sign in to comment.