Skip to content

Commit

Permalink
Remove packaged btllib, make a dependency (#56)
Browse files Browse the repository at this point in the history
* Remove packaged btllib from ntLink, add packaged dependency

* Remove full path to indexlr
  • Loading branch information
lcoombe authored Jul 5, 2022
1 parent 5ffbb4f commit 2e7d60c
Show file tree
Hide file tree
Showing 1,326 changed files with 25 additions and 336,554 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ See the wiki page for more details.

Installing from source code:
```
git clone https://github.com/bcgsc/ntLink.git
cd src
make
curl -L --output ntLink-1.3.1.tar.gz https://github.com/bcgsc/ntLink/releases/download/v1.3.1/ntLink-1.3.1.tar.gz && tar xvzf ntLink-1.3.1.tar.gz
```

#### Testing your installation
Expand All @@ -121,13 +119,14 @@ The expected output files can be found in: `tests/expected_outputs`

## Dependencies
* Python 3.7+ ([Numpy](https://numpy.org/), [Python-igraph](https://igraph.org/python/))
* [btllib](https://github.com/bcgsc/btllib)
* [ABySS v2.3.0+](https://github.com/bcgsc/abyss)
* GCC 6+ or Clang 5+ with OpenMP
* [zlib](https://zlib.net/)

Python dependencies can be installed with:
```
pip3 install -r requirements.txt
conda install -c bioconda --file requirements.txt
```

## License
Expand Down
33 changes: 14 additions & 19 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ jobs:

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

- script: |
curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-11 main"
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang-format clang-tidy
displayName: Install clang-format and clang-tidy
- script: |
source activate ntlink_CI
conda install --yes --quiet --name ntlink_CI -c conda-forge -c bioconda python pylint pytest pandas abyss=2.3.1
Expand All @@ -30,14 +23,6 @@ jobs:
pylint ntlink_pair.py ntlink_utils.py ntlink_stitch_paths.py ntlink_overlap_sequences.py ntlink_filter_sequences.py
cd ..
displayName: Run pylint
- script: |
source activate ntlink_CI
make -C src all
displayName: Compile C++ executables
- script: |
source activate ntlink_CI
make -C src check
displayName: Test C++ executables
- script: |
source activate ntlink_CI
cd tests
Expand All @@ -48,7 +33,17 @@ 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 ntlink_CI
displayName: Create Anaconda environment
- script: |
source activate ntlink_CI
conda install --yes --quiet --name ntlink_CI -c conda-forge -c bioconda python pylint pytest pandas abyss=2.3.1
conda install --yes --quiet --name ntlink_CI -c conda-forge -c bioconda --file requirements.txt
displayName: Install Anaconda packages
- script: |
source activate ntlink_CI
cd tests
pytest -vs ntlink_pytest.py
displayName: Run pytests
15 changes: 6 additions & 9 deletions ntLink
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ else
gzip=gzip -f
endif

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

help:
@echo ""
@echo "ntLink: Scaffolding assemblies using long reads"
Expand Down Expand Up @@ -164,20 +161,20 @@ version:
.SECONDARY:

%.k$(k).w$(w).tsv: %
$(ntLink_time) $(ntlink_path)/src/indexlr --long --pos --strand -k $(k) -w $(w) -t $(t) $< > $@
$(ntLink_time) indexlr --long --pos --strand -k $(k) -w $(w) -t $(t) $< > $@

%.fa.gz: %.fa
$(ntLink_time) $(gzip) $<

$(prefix).n$(n).scaffold.dot: $(target).k$(k).w$(w).tsv $(reads)
ifeq ($(verbose), True)
$(ntLink_time) sh -c '$(gzip) -cd $(reads) | \
$(ntlink_path)/src/indexlr --long --pos --strand -k $(k) -w $(w) -t $(t) - | \
indexlr --long --pos --strand -k $(k) -w $(w) -t $(t) - | \
$(ntlink_path)/bin/ntlink_pair.py -p $(prefix) -n $(n) -m $< -s $(target) \
-k $(k) -a $(a) -z $(z) -f $(f) -x $(x) --verbose -'
else
$(ntLink_time) sh -c '$(gzip) -cd $(reads) | \
$(ntlink_path)/src/indexlr --long --pos --strand -k $(k) -w $(w) -t $(t) - | \
indexlr --long --pos --strand -k $(k) -w $(w) -t $(t) - | \
$(ntlink_path)/bin/ntlink_pair.py -p $(prefix) -n $(n) -m $< -s $(target) \
-k $(k) -a $(a) -z $(z) -f $(f) -x $(x) -'
endif
Expand All @@ -199,12 +196,12 @@ endif
rm -f $(prefix).n*.abyss-scaffold.path $(prefix).n*.abyss-scaffold.path.sterr

$(target).k$(small_k).w$(small_w).tsv: $(target)
$(ntLink_time) $(ntlink_path)/src/indexlr --long --pos -k $(small_k) -w $(small_w) -t $(t) $< > $@
$(ntLink_time) indexlr --long --pos -k $(small_k) -w $(small_w) -t $(t) $< > $@

$(prefix).trimmed_scafs.fa: $(prefix).stitch.path $(prefix).n$(n).scaffold.dot $(target)
$(ntLink_time) sh -c '$(ntlink_path)/bin/ntlink_filter_sequences.py --fasta $(target) \
--dot $(prefix).n$(n).scaffold.dot --path $< -k $(small_k) -g $g |\
$(ntlink_path)/src/indexlr --long --pos -k $(small_k) -w $(small_w) -t $(t) - |\
indexlr --long --pos -k $(small_k) -w $(small_w) -t $(t) - |\
$(ntlink_path)/bin/ntlink_overlap_sequences.py -m - --path $< \
-s $(target) -d $(prefix).n$(n).scaffold.dot -p $(prefix) -g $(g) -k $(small_k) --outgap $(merge_gap) --trim_info'

Expand All @@ -220,6 +217,6 @@ clean: abyss_scaffold
rm -f $(prefix).n*.abyss-scaffold.path $(prefix).n*.abyss-scaffold.path.sterr

$(target).k$(k).w$(w).z$(z).ntLink.scaffolds.gap_fill.fa: $(target) $(prefix).n$(n).scaffold.dot $(prefix).trimmed_scafs.fa
PYTHONPATH=$(PYTHONPATH_ntlink) $(ntLink_time) $(ntlink_path)/bin/ntlink_patch_gaps.py --path $(prefix).trimmed_scafs.path \
$(ntLink_time) $(ntlink_path)/bin/ntlink_patch_gaps.py --path $(prefix).trimmed_scafs.path \
--mappings $(prefix).verbose_mapping.tsv -s $< --reads $(reads) -o $@ --large_k $(k) --min_gap 1 \
--trims $(prefix).trimmed_scafs.tsv -k $(gap_k) -w $(gap_w)
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
numpy
python-igraph
python-igraph
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.

33 changes: 0 additions & 33 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 2e7d60c

Please sign in to comment.