Skip to content

Commit

Permalink
Remove packaged btllib, make it a dependency (#90)
Browse files Browse the repository at this point in the history
* Remove packaged btllib, make it a dependency

* Update README.md
  • Loading branch information
lcoombe authored Jul 22, 2022
1 parent a62b241 commit 75131da
Show file tree
Hide file tree
Showing 1,326 changed files with 38 additions and 336,537 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,21 @@ ntJoin assemble target=my_scaffolds.fa target_weight=1 reference_config=config_f
* As of version 1.1.0, ntJoin can detect and trim overlaps between joined sequences. This feature is controlled by the `overlap` parameter, and is on `overlap=True` by default. To turn this behaviour off, specify `overlap=False`

## Installation Instructions
#### Installing ntJoin using Brew
ntJoin can be installed using [Homebrew](https://brew.sh) on macOS or [Linuxbrew](http://linuxbrew.sh) on Linux:

#### Installing ntJoin using Conda
```sh
brew install brewsci/bio/ntjoin
conda install -c bioconda -c conda-forge ntjoin=1.1.0
```

#### Installing ntJoin using Conda
#### Installing ntJoin using Brew
ntJoin can be installed using [Homebrew](https://brew.sh) on macOS or [Linuxbrew](http://linuxbrew.sh) on Linux:
```sh
conda install -c bioconda -c conda-forge ntjoin=1.0.8
brew install brewsci/bio/ntjoin
```

#### Installing ntJoin from the source code
```sh
git clone https://github.com/bcgsc/ntJoin.git
cd ntJoin/src
make
curl -L --output ntJoin-1.1.0.tar.gz https://github.com/bcgsc/ntJoin/releases/download/v1.1.0/ntJoin-1.1.0.tar.gz && tar xvzf ntJoin-1.1.0.tar.gz
```

## Dependencies
Expand All @@ -146,6 +145,7 @@ make
* [bedtools v2.29.2+](https://bedtools.readthedocs.io/en/latest/)
* [samtools](https://github.com/samtools/samtools)
* [zlib](https://www.zlib.net/)
* [btllib](https://github.com/bcgsc/btllib)

Python dependencies can be installed with:
```sh
Expand Down
25 changes: 17 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jobs:
pylint ntjoin_assemble.py read_fasta.py ntjoin_utils.py
cd ..
displayName: Run pylint
- script: make -C src all
displayName: Compile C++ executables
- script: make -C src check
displayName: Test C++ executables
- script: |
source activate ntjoin_CI
conda install --yes --quiet --name ntjoin_CI -c conda-forge -c bioconda pytest bedtools samtools
Expand All @@ -45,7 +41,20 @@ jobs:
pool:
vmImage: macOS-latest
steps:
- script: make -C src all
displayName: Compile C++ executables with clang
- script: make -C src check
displayName: Test C++ executables
- script: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH

- script: conda create --yes --quiet --name ntjoin_CI
displayName: Create Anaconda environment

- script: |
source activate ntjoin_CI
conda install --yes --quiet --name ntjoin_CI -c conda-forge -c bioconda python=3.9 pylint samtools=1.14
conda install --yes --quiet --name ntjoin_CI -c conda-forge -c bioconda --file requirements.txt
displayName: Install Anaconda packages
- script: |
source activate ntjoin_CI
conda install --yes --quiet --name ntjoin_CI -c conda-forge -c bioconda pytest bedtools samtools
cd tests
pytest -vs ntjoin_test.py
displayName: Run pytests
16 changes: 11 additions & 5 deletions ntJoin
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ else
gzip=gzip -f
endif

# Set-up PYTHON PATH
PYTHONPATH=$(assemble_path)/src/btllib/install/lib/btllib/python

help:
@echo ""
Expand Down Expand Up @@ -189,12 +187,20 @@ version:
@echo "ntJoin v1.1.0"
@echo "Written by Lauren Coombe ([email protected])"

.PHONY: help all version analysis assemble check_params jupiter
check_install:
ifeq ($(shell command -v indexlr),)
$(error ERROR: indexlr not found. Please ensure btllib is installed)
endif
ifneq ($(shell command -v 'python3 -c "import btllib"'),)
$(error ERROR: btllib not found. Please ensure btllib is installed)
endif

.PHONY: help all version analysis assemble check_params jupiter check_install
.DELETE_ON_ERROR: $(prefix).n$(n).mx.dot
.SECONDARY:

%.k$(k).w$(w).tsv: %
$(log_time) $(assemble_path)/src/indexlr --long --pos -k $(k) -w $(w) -t $(t) $< > $@
$(log_time) indexlr --long --pos -k $(k) -w $(w) -t $(t) $< > $@

%.fai: %
$(log_time) samtools faidx $<
Expand All @@ -218,7 +224,7 @@ ifeq ($(overlap), True)
endif

$(target).k$(k).w$(w).n$(n).assigned.scaffolds.fa: $(target).k$(k).w$(w).tsv $(min_ref_targets)
PYTHONPATH=$(PYTHONPATH) $(log_time) $(assemble_path)/bin/ntjoin_assemble.py -p $(prefix) -n $(n) -s $< -l $(target_weight) \
$(log_time) $(assemble_path)/bin/ntjoin_assemble.py -p $(prefix) -n $(n) -s $< -l $(target_weight) \
-r "$(reference_weights_list)" -k $(k) -g $(g) -G $(G) -t $(assemble_t) $(ntjoin_assembly_opts) $(min_ref_targets)

$(target).k$(k).w$(w).n$(n).unassigned.scaffolds.fa: $(target).k$(k).w$(w).n$(n).assigned.scaffolds.fa
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
python-igraph
pybedtools
pymannkendall
pymannkendall
btllib
9 changes: 0 additions & 9 deletions src/.clang-format

This file was deleted.

1 change: 0 additions & 1 deletion src/.gitignore

This file was deleted.

27 changes: 0 additions & 27 deletions src/Makefile

This file was deleted.

178 changes: 0 additions & 178 deletions src/btllib/.clang-format

This file was deleted.

4 changes: 0 additions & 4 deletions src/btllib/.clang-format-ignore

This file was deleted.

Loading

0 comments on commit 75131da

Please sign in to comment.