Skip to content

Commit edacf53

Browse files
authored
Allow flexible installation location of long-to-linked-pe (#128)
* Allow flexible installation location of long-to-linked-pe * If already found on the PATH, use that path, else in src dir * Also remove unneeded btllib version restriction in requirements.txt * Remove hard-coded path to tigmint-make in run_tigmint_demo.sh * Update CI * Change python version for CI * Use mamba for all CI
1 parent 0dc2a72 commit edacf53

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

azure-pipelines.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ jobs:
1414
displayName: Create Anaconda environment
1515
- script: |
1616
source activate tigmint_CI
17-
conda install --yes --quiet --name tigmint_CI -c conda-forge -c bioconda pytest bedtools bwa samtools=1.9 minimap2 pylint 'btllib<=1.4.10' compilers ntlink
18-
conda install --yes --quiet --name tigmint_CI -c conda-forge -c bioconda --file requirements.txt
17+
conda install --yes --quiet --name tigmint_CI -c conda-forge -c bioconda mamba python=3.8
18+
mamba install --yes --quiet -c conda-forge -c bioconda pytest bedtools bwa samtools=1.9 minimap2 pylint btllib compilers ntlink
19+
mamba install --yes --quiet -c conda-forge -c bioconda --file requirements.txt
1920
displayName: Install Anaconda packages
2021
- script: |
2122
source activate tigmint_CI
2223
make -C src all
2324
displayName: Compile C++ executables
2425
- script: |
2526
source activate tigmint_CI
26-
conda install --yes -c bioconda -c conda-forge clang clang-tools
27+
mamba install --yes -c bioconda -c conda-forge clang clang-tools
2728
make -C src lint
2829
displayName: Run clang-format and clang-tidy
2930
- script: |
@@ -34,6 +35,7 @@ jobs:
3435
displayName: Run pylint
3536
- script: |
3637
source activate tigmint_CI
38+
export PATH=$(pwd)/bin:$PATH
3739
cd tests
3840
pytest -vs tigmint_test.py
3941
displayName: Run pytests

bin/tigmint-make

+7-1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ ifdef bin
127127
PATH:=$(bin):$(PATH)
128128
endif
129129

130+
# Determine path to long-to-linked-pe script
131+
src_path=$(bin)/../src
132+
ifneq ($(shell command -v long-to-linked-pe),)
133+
src_path=$(shell dirname $(shell command -v long-to-linked-pe))
134+
endif
135+
130136
# Use pigz or bgzip for parallel compression if available.
131137
ifneq ($(shell command -v pigz),)
132138
gzip=pigz -p$t
@@ -302,7 +308,7 @@ endif
302308
ifeq ($(mapping), ntLink)
303309
$(gtime) $(bin)/tigmint-ntlink-map --bed $@ -k$(ntLink_k) -w$(ntLink_w) -t$t --path $(bin) -m$(minsize) --span $(span) $(draft) $<
304310
else
305-
$(gtime) sh -c '$(bin)/../src/long-to-linked-pe -l $(cut) -m$(minsize) -g$G -s -b $(reads).barcode-multiplicity.tsv --bx -t$t --fasta -f $(reads).tigmint-long.params.tsv $< | \
311+
$(gtime) sh -c '$(src_path)/long-to-linked-pe -l $(cut) -m$(minsize) -g$G -s -b $(reads).barcode-multiplicity.tsv --bx -t$t --fasta -f $(reads).tigmint-long.params.tsv $< | \
306312
minimap2 -y -t$t -x map-$(longmap) --secondary=no $(draft).fa - | \
307313
$(bin)/tigmint_molecule_paf.py -q$(mapq) -s$(minsize) $(dist_options) - | sort -k1,1 -k2,2n -k3,3n $(SORT_OPTS) > $@'
308314
endif

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ intervaltree
22
pybedtools
33
pysam
44
numpy
5-
btllib <=1.4.10
5+
btllib
+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#!/bin/bash
22

3+
echo "Please ensure that tigmint-make is in your PATH!"
4+
35
echo "Running tigmint with linked reads..."
46

5-
../../bin/tigmint-make -B tigmint draft=test_contig reads=test_linkedreads
7+
tigmint-make -B tigmint draft=test_contig reads=test_linkedreads
68

79
echo "Running tigmint with long reads..."
810

9-
../../bin/tigmint-make -B tigmint-long draft=test_contig_long reads=test_longreads span=10 G=7000 dist=auto
11+
tigmint-make -B tigmint-long draft=test_contig_long reads=test_longreads span=10 G=7000 dist=auto
1012

1113
echo "Done! Compare your output files to those in the 'expected_outputs' directory to ensure that the run was successful."

0 commit comments

Comments
 (0)