Skip to content

Commit

Permalink
Entrypoint setup
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreLamurias committed Dec 14, 2021
1 parent b38cd28 commit a9026fe
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 14 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# GraphMB
# GraphMB: Assembly Graph Metagenomic Binner

# Introduction

GraphMB is a metagenomics binner developed for long-read assemblies, that takes advantage of graph machine learning
GraphMB is a Metagenomic Binner developed for long-read assemblies, that takes advantage of graph machine learning
algorithms and the assembly graph generated during assembly. It has been tested on (meta)flye assemblies.

## Dependencies
Expand Down Expand Up @@ -76,6 +76,8 @@ You can also run on CPU and limit the number of threads to use:
python src/graphmb/main.py --assembly data/strong100/ --numcores 4
```

If installed with pip, you can also use `graphmb` instead of `python src/graphmb/main.py`.

## Typical workflow
Our workflows are available [here](https://github.com/AndreLamurias/binning_workflows).
On this section we present an overview of how to get your data ready for GraphMB.
Expand Down
9 changes: 7 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = graphmb-andrelamurias
version = 0.1.1
version = 0.1.2
author = Andre Lamurias
author_email = [email protected]
description = Binner based on deep learning and assembly graph embeddings
Expand All @@ -21,7 +21,7 @@ package_dir =
packages = find:
python_requires = >=3.7
install_requires =
vamb @ git+ssh://git@github.com/AndreLamurias/vamb.git
vamb @ git+git://github.com/AndreLamurias/vamb.git
networkx==2.6.2
#torch==1.7.1
scikit-learn==0.24.2
Expand All @@ -33,3 +33,8 @@ include_package_data = True
[options.packages.find]
where = src

[options.entry_points]
console_scripts =
graphmb = graphmb:main.main


7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@

setup(
name="graphmb",
version="0.1.1",
version="0.1.2",
packages=["graphmb"],
package_dir={"": "src"},
setup_requires=["setuptools~=58.0", "wheel"],
install_requires=[
"wheel",
"requests",
"setuptools>57.5.0" 'importlib; python_version == "3.7"',
"vamb @ git+https://github.com/AndreLamurias/vamb",
"vamb @ git+git://github.com/AndreLamurias/vamb",
"networkx==2.6.2",
# torch==1.7.1
"scikit-learn==0.24.2",
"dgl==0.6.1",
"tqdm==4.61.2",
],
entry_points={
"console_scripts": ["graphmb=graphmb.main:main"],
},
)
5 changes: 4 additions & 1 deletion src/graphmb/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@

from . import contigsdataset
from . import graph_functions
from . import evaluate
from . import graphsage_unsupervised
2 changes: 1 addition & 1 deletion src/graphmb/contigsdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import networkx as nx
from dgl.data import DGLDataset
from dgl.data.utils import makedirs, save_info, load_info
from graph_functions import read_reads_mapping_sam, count_kmers, get_kmer_to_id
from graphmb.graph_functions import read_reads_mapping_sam, count_kmers, get_kmer_to_id


class ContigsDataset(DGLDataset):
Expand Down
2 changes: 1 addition & 1 deletion src/graphmb/graph_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import dgl
import random

from evaluate import read_contig_genes, read_marker_gene_sets, evaluate_contig_sets
from graphmb.evaluate import read_contig_genes, read_marker_gene_sets, evaluate_contig_sets
import torch

SEED = 0
Expand Down
2 changes: 1 addition & 1 deletion src/graphmb/graphsage_unsupervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import copy
import sklearn

from graph_functions import cluster_eval, set_seed
from graphmb.graph_functions import cluster_eval, set_seed

# Based on this implemention: https://github.com/dmlc/dgl/blob/master/examples/pytorch/graphsage/train_sampling_unsupervised.py

Expand Down
8 changes: 4 additions & 4 deletions src/graphmb/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@


import os
from contigsdataset import ContigsDataset
from graphmb.contigsdataset import ContigsDataset
from pathlib import Path
import scipy.stats as stats
from evaluate import read_marker_gene_sets, read_contig_genes, evaluate_contig_sets, get_markers_to_contigs
from graphsage_unsupervised import train_graphsage, SAGE
from graph_functions import (
from graphmb.evaluate import read_marker_gene_sets, read_contig_genes, evaluate_contig_sets, get_markers_to_contigs
from graphmb.graphsage_unsupervised import train_graphsage, SAGE
from graphmb.graph_functions import (
plot_embs,
cluster_embs,
evaluate_binning,
Expand Down

0 comments on commit a9026fe

Please sign in to comment.