Skip to content

Commit

Permalink
GIT: Merge branch 'main' of https://github.com/Vini2/gbintk
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Apr 23, 2024
2 parents 80e308d + 61438c5 commit 14988d5
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# GraphBin-Tk: Assembly graph-based metagenomic binning toolkit

![GitHub License](https://img.shields.io/github/license/metagentools/gbintk)
[![CI](https://github.com/metagentools/gbintk/actions/workflows/testing_python_app.yml/badge.svg)](https://github.com/metagentools/gbintk/actions/workflows/testing_python_app.yml)
[![codecov](https://codecov.io/gh/metagentools/gbintk/graph/badge.svg?token=r5sniGexZG)](https://codecov.io/gh/metagentools/gbintk)
[![CodeQL](https://github.com/metagentools/gbintk/actions/workflows/codeql.yml/badge.svg)](https://github.com/metagentools/gbintk/actions/workflows/codeql.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ dependencies = ["click",
"scipy",
"numpy",
"pandas",
"tqdm"]
"tqdm",
"graphbin"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
Expand Down
61 changes: 61 additions & 0 deletions src/gbintk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,68 @@ def graphbin(
"""GraphBin: Refined Binning of Metagenomic Contigs using Assembly Graphs"""

print("Run GraphBin...")
from graphbin.utils import (
graphbin_Canu,
graphbin_Flye,
graphbin_MEGAHIT,
graphbin_Miniasm,
graphbin_SGA,
graphbin_SPAdes,
)

class ArgsObj:
def __init__(
self,
assembler,
graph,
contigs,
paths,
binned,
output,
prefix,
max_iteration,
diff_threshold,
delimiter,
):
self.assembler = assembler
self.graph = graph
self.contigs = contigs
self.paths = paths
self.binned = binned
self.output = output
self.prefix = prefix
self.max_iteration = max_iteration
self.diff_threshold = diff_threshold
self.delimiter = delimiter

# Make args object
args = ArgsObj(
assembler,
graph,
contigs,
paths,
binned,
output,
prefix,
max_iteration,
diff_threshold,
delimiter,
)

# Run GraphBin
# ---------------------------------------------------
if assembler.lower() == "canu":
graphbin_Canu.main(args)
if assembler.lower() == "flye":
graphbin_Flye.main(args)
if assembler.lower() == "megahit":
graphbin_MEGAHIT.main(args)
if assembler.lower() == "miniasm":
graphbin_Miniasm.main(args)
if assembler.lower() == "sga":
graphbin_SGA.main(args)
if assembler.lower() == "spades":
graphbin_SPAdes.main(args)

# Main GraphBin2
# -------------------------------------------------------------------
Expand Down

0 comments on commit 14988d5

Please sign in to comment.