Skip to content

Commit 75131da

Browse files
authored
Remove packaged btllib, make it a dependency (#90)
* Remove packaged btllib, make it a dependency * Update README.md
1 parent a62b241 commit 75131da

1,326 files changed

Lines changed: 38 additions & 336537 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,21 @@ ntJoin assemble target=my_scaffolds.fa target_weight=1 reference_config=config_f
122122
* 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`
123123

124124
## Installation Instructions
125-
#### Installing ntJoin using Brew
126-
ntJoin can be installed using [Homebrew](https://brew.sh) on macOS or [Linuxbrew](http://linuxbrew.sh) on Linux:
125+
126+
#### Installing ntJoin using Conda
127127
```sh
128-
brew install brewsci/bio/ntjoin
128+
conda install -c bioconda -c conda-forge ntjoin=1.1.0
129129
```
130130

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

136137
#### Installing ntJoin from the source code
137138
```sh
138-
git clone https://github.com/bcgsc/ntJoin.git
139-
cd ntJoin/src
140-
make
139+
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
141140
```
142141

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

150150
Python dependencies can be installed with:
151151
```sh

azure-pipelines.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ jobs:
3030
pylint ntjoin_assemble.py read_fasta.py ntjoin_utils.py
3131
cd ..
3232
displayName: Run pylint
33-
- script: make -C src all
34-
displayName: Compile C++ executables
35-
- script: make -C src check
36-
displayName: Test C++ executables
3733
- script: |
3834
source activate ntjoin_CI
3935
conda install --yes --quiet --name ntjoin_CI -c conda-forge -c bioconda pytest bedtools samtools
@@ -45,7 +41,20 @@ jobs:
4541
pool:
4642
vmImage: macOS-latest
4743
steps:
48-
- script: make -C src all
49-
displayName: Compile C++ executables with clang
50-
- script: make -C src check
51-
displayName: Test C++ executables
44+
- script: echo "##vso[task.prependpath]$CONDA/bin"
45+
displayName: Add conda to PATH
46+
47+
- script: conda create --yes --quiet --name ntjoin_CI
48+
displayName: Create Anaconda environment
49+
50+
- script: |
51+
source activate ntjoin_CI
52+
conda install --yes --quiet --name ntjoin_CI -c conda-forge -c bioconda python=3.9 pylint samtools=1.14
53+
conda install --yes --quiet --name ntjoin_CI -c conda-forge -c bioconda --file requirements.txt
54+
displayName: Install Anaconda packages
55+
- script: |
56+
source activate ntjoin_CI
57+
conda install --yes --quiet --name ntjoin_CI -c conda-forge -c bioconda pytest bedtools samtools
58+
cd tests
59+
pytest -vs ntjoin_test.py
60+
displayName: Run pytests

ntJoin

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ else
112112
gzip=gzip -f
113113
endif
114114

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

118116
help:
119117
@echo ""
@@ -189,12 +187,20 @@ version:
189187
@echo "ntJoin v1.1.0"
190188
@echo "Written by Lauren Coombe (lcoombe@bcgsc.ca)"
191189

192-
.PHONY: help all version analysis assemble check_params jupiter
190+
check_install:
191+
ifeq ($(shell command -v indexlr),)
192+
$(error ERROR: indexlr not found. Please ensure btllib is installed)
193+
endif
194+
ifneq ($(shell command -v 'python3 -c "import btllib"'),)
195+
$(error ERROR: btllib not found. Please ensure btllib is installed)
196+
endif
197+
198+
.PHONY: help all version analysis assemble check_params jupiter check_install
193199
.DELETE_ON_ERROR: $(prefix).n$(n).mx.dot
194200
.SECONDARY:
195201

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

199205
%.fai: %
200206
$(log_time) samtools faidx $<
@@ -218,7 +224,7 @@ ifeq ($(overlap), True)
218224
endif
219225

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

224230
$(target).k$(k).w$(w).n$(n).unassigned.scaffolds.fa: $(target).k$(k).w$(w).n$(n).assigned.scaffolds.fa

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
python-igraph
22
pybedtools
3-
pymannkendall
3+
pymannkendall
4+
btllib

src/.clang-format

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Makefile

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/btllib/.clang-format

Lines changed: 0 additions & 178 deletions
This file was deleted.

src/btllib/.clang-format-ignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)