Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anuradhawick committed May 30, 2023
1 parent 9b2bee3 commit a5c3a1f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM continuumio/miniconda3
LABEL maintainer="anruadhawick@gmail.com"

RUN conda install -y pytorch cudatoolkit=11.3 -c pytorch
RUN conda install -c conda-forge biopython
RUN conda install -y tqdm tabulate
RUN conda install -y -c anaconda scikit-learn
RUN conda install -y numpy scipy seaborn h5py hdbscan gcc openmp tqdm biopython fraggenescan hmmer tabulate pytorch pytorch-cuda=11.7 -c pytorch -c nvidia -c bioconda c conda-forge biopython
RUN apt-get update && \
apt-get -y install g++ bzip2 lzma-dev zlib1g-dev libbz2-dev && \
apt-get -y install libcurl4-openssl-dev libpthread-stubs0-dev liblzma-dev libomp-dev
Expand All @@ -17,7 +14,7 @@ RUN ["bash", "docker_build.sh"]

ENV PATH="/usr/LRBinner/:${PATH}"

ENTRYPOINT ["LRBinner"]
ENTRYPOINT ["lrbinner.py"]
CMD ["--help"]

# docker build -t anuradhawick/lrbinner .
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
![GitHub](https://img.shields.io/github/license/anuradhawick/LRBinner)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/anuradhawick/LRBinner)

## Use Docker!
## Docker pathway

`Dockerfile` is now available. (If you're familiar deploying a docker file, No Image pushed yet)

## Dependencies
LRBinner is coded purely using C++ (v9+) and Python 3.10. To run LRBinner, you will need to install the following python and C++ modules.

A possible conda environment to work (credits [Calum Walsh](https://github.com/cazzlewazzle89))
A possible conda/mamba environment to work (credits [Calum Walsh](https://github.com/cazzlewazzle89))

```sh
conda create -n lrbinner -y python=3.10 numpy scipy seaborn h5py hdbscan gcc openmp tqdm biopython fraggenescan hmmer tabulate pytorch pytorch-cuda=11.7 -c pytorch -c nvidia
conda create -n lrbinner -y python=3.10 numpy scipy seaborn h5py hdbscan gcc openmp tqdm biopython fraggenescan hmmer tabulate pytorch pytorch-cuda=11.7 -c pytorch -c nvidia -c bioconda
```

### Python dependencies
Expand Down Expand Up @@ -232,7 +232,7 @@ optional arguments:

## Citation

If you use LRBinner please cite using the the following bibtex files
If you use LRBinner please cite using the following bibtex entries.

```bibtex
@InProceedings{wickramarachchi_et_al:LIPIcs.WABI.2021.11,
Expand Down Expand Up @@ -273,6 +273,4 @@ If you use LRBinner please cite using the the following bibtex files
```

> More updates to come!
> Get in touch [anuradhawick.com](https://anuradhawick.com)
Get in touch and connect at [anuradhawick.com](https://anuradhawick.com) or email [info@anuradhawick.com](mailto:info@anuradhawick.com)
6 changes: 6 additions & 0 deletions lrbinner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import sys
import time
import logging
import shutil

from mbcclr_utils import pipelines

Expand Down Expand Up @@ -110,6 +111,8 @@ def main():

# running mode
mode = args.mode
# is resuming
resume = args.resume

reads_path = args.reads_path
threads = args.threads
Expand All @@ -120,6 +123,9 @@ def main():
logger = logging.getLogger('LRBinner')
logger.setLevel(logging.DEBUG)

if not resume and os.path.isdir(f"{output}"):
shutil.rmtree(output)

formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
consoleHeader = logging.StreamHandler()
consoleHeader.setFormatter(formatter)
Expand Down
8 changes: 0 additions & 8 deletions mbcclr_utils/pipelines.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import pickle
import os
import logging
import sys
from collections import defaultdict
from Bio import SeqIO
import numpy as np
import random
import shutil

from mbcclr_utils.runners_utils import *
from mbcclr_utils import ae_utils
Expand Down Expand Up @@ -34,8 +30,6 @@ def run_contig_binning(args):
checkpoints_path = f"{output}/checkpoints"

if not resume:
if os.path.isdir(f"{output}"):
shutil.rmtree(f"{output}")
checkpoint = Checkpointer(checkpoints_path)
else:
logger.info("Resuming the program from previous checkpoints")
Expand Down Expand Up @@ -265,8 +259,6 @@ def run_reads_binning(args):
checkpoints_path = f"{output}/checkpoints"

if not resume:
if os.path.isdir(f"{output}"):
shutil.rmtree(f"{output}")
checkpoint = Checkpointer(checkpoints_path)
else:
logger.info("Resuming the program from previous checkpoints")
Expand Down

0 comments on commit a5c3a1f

Please sign in to comment.