Skip to content

Commit

Permalink
DEV: Add graphbin as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
anuradhawick committed Apr 21, 2024
1 parent 7d1c09c commit 61438c5
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
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 61438c5

Please sign in to comment.